Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
eternity007
Posts: 7
Joined: 19 Aug 2011, 08:47

Problem in switching ZTE631

Post by eternity007 » 19 Aug 2011, 08:58

Hi,
I need to run usb_modeswitch on an ARM based embedded device.
Where I installed usb-modeswitch-1.1.9-jimsh.tar.bz2 along with the usb-modeswitch-data package.

Now when, I put my dongle (ZTE631 Modem), it fails to switch.

I have enabled log, which looks like:

Code: Select all




USB_ModeSwitch log from Thu Aug  18 12:26:18 UTC 2011

Raw args from udev: 1-1:1.0/1-1:1.0 {}

Using global config file: /etc/usb_modeswitch.conf
----------------
USB values from sysfs:
  manufacturer	ZTE,Incorporated
  product	ZTE WCDMA Technologies MSM
  serial	MF6310ZTED010000
----------------
bNumConfigurations is 1 - don't check for active configuration
SCSI attributes not needed, moving on
checking config: /usr/share/usb_modeswitch/19d2:2000
! matched, now switching
 (running command: /usr/sbin/usb_modeswitch -I -W -c /usr/share/usb_modeswitch/19d2:2000)

Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are expected in the process)
--------------------------------

Reading config file: /usr/share/usb_modeswitch/19d2:2000

 * usb_modeswitch: handle USB devices with multiple modes
 * Version 1.1.9 (C) Josua Dietze 2011
 * Based on libusb0 (0.1.12 and above)

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x19d2
DefaultProduct= 0x2000
TargetVendor=   0x19d2
TargetProduct=  not set
TargetClass=    not set
TargetProductList="0001,0002,0015,0016,0017,0031,0037,0052,0055,0063,0064,0066,0091,0108,0117,0128,2002"

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint=  not set
MessageContent="5553424312345678000000000000061e000000000000000000000000000000"
MessageContent2="5553424312345679000000000000061b000000020000000000000000000000"
MessageContent3="55534243123456702000000080000c85010101180101010101000000000000"
NeedResponse=1
ResponseEndpoint= not set
Interface=0x00

InquireDevice disabled
Success check enabled, max. wait time 20 seconds
System integration mode enabled


Looking for target devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 0424:2514
  searching devices, found USB ID 0000:0000
 No devices in target mode or class found
Looking for default devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
   found matching product ID
   adding device
  searching devices, found USB ID 0424:2514
  searching devices, found USB ID 0000:0000
 Found devices in default mode, class or configuration (1)
Accessing device 007 on bus 001 ...
Skipping the check for the current configuration
Using endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: ZTE,Incorporated
     Product: ZTE WCDMA Technologies MSM
  Serial No.: MF6310ZTED010000
-------------------------
Looking for active driver ...
 OK, driver found ("usb-storage")
 OK, driver "usb-storage" detached
Setting up communication with interface 0
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
 OK, message successfully sent
Reading the response to message 1 (CSW) ...
 OK, response successfully read (13 bytes).
Trying to send message 2 to endpoint 0x01 ...
 OK, message successfully sent
Reading the response to message 2 (CSW) ...
 OK, response successfully read (13 bytes).
Trying to send message 3 to endpoint 0x01 ...
 OK, message successfully sent
Reading the response to message 3 (CSW) ...
 OK, response successfully read (0 bytes).
Resetting response endpoint 0x81
Resetting message endpoint 0x01

Checking for mode switch (max. 20 times, once per second) ...
 Searching for target devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 0424:2514
  searching devices, found USB ID 0000:0000
 Searching for target devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2003
   found matching vendor ID
  searching devices, found USB ID 0424:2514
  searching devices, found USB ID 0000:0000
 Searching for target devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2003
   found matching vendor ID
  searching devices, found USB ID 0424:2514
  searching devices, found USB ID 0000:0000
 Searching for target devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2003
   found matching vendor ID
  searching devices, found USB ID 0424:2514
  searching devices, found USB ID 0000:0000
 Searching for target devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2003
   found matching vendor ID
  searching devices, found USB ID 0424:2514
  searching devices, found USB ID 0000:0000
 Searching for target devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2003
   found matching vendor ID
  searching devices, found USB ID 0424:2514
  searching devices, found USB ID 0000:0000
 Searching for target devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2003
   found matching vendor ID
  searching devices, found USB ID 0424:2514
  searching devices, found USB ID 0000:0000
 Searching for target devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2003
   found matching vendor ID
  searching devices, found USB ID 0424:2514
  searching devices, found USB ID 0000:0000
 Searching for target devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2003
   found matching vendor ID
  searching devices, found USB ID 0424:2514
  searching devices, found USB ID 0000:0000
 Searching for target devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2003
   found matching vendor ID
  searching devices, found USB ID 0424:2514
  searching devices, found USB ID 0000:0000
 Searching for target devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2003
   found matching vendor ID
  searching devices, found USB ID 0424:2514
  searching devices, found USB ID 0000:0000
 Searching for target devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2003
   found matching vendor ID
  searching devices, found USB ID 0424:2514
  searching devices, found USB ID 0000:0000
 Searching for target devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2003
   found matching vendor ID
  searching devices, found USB ID 0424:2514
  searching devices, found USB ID 0000:0000
 Searching for target devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2003
   found matching vendor ID
  searching devices, found USB ID 0424:2514
  searching devices, found USB ID 0000:0000
 Searching for target devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2003
   found matching vendor ID
  searching devices, found USB ID 0424:2514
  searching devices, found USB ID 0000:0000
 Searching for target devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2003
   found matching vendor ID
  searching devices, found USB ID 0424:2514
  searching devices, found USB ID 0000:0000
 Searching for target devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2003
   found matching vendor ID
  searching devices, found USB ID 0424:2514
  searching devices, found USB ID 0000:0000
 Searching for target devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2003
   found matching vendor ID
  searching devices, found USB ID 0424:2514
  searching devices, found USB ID 0000:0000
 Searching for target devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2003
   found matching vendor ID
  searching devices, found USB ID 0424:2514
  searching devices, found USB ID 0000:0000
 Searching for target devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2003
   found matching vendor ID
  searching devices, found USB ID 0424:2514
  searching devices, found USB ID 0000:0000
 No new devices in target mode or class found

Mode switch has failed. Bye.

fail:
--------------------------------
(end of usb_modeswitch output)


All done, exiting
Somebody please help me why this failure comes?
I tried manually too, usb_modeswitch -c /usr/share/usb_modeswitch/19d2:2000 also with same result.

Any help would be appreciated. Thanks in advance

NOTE: my device target product id is 2003 which is not present in TargetProductList of config file. Is it the cause? if so, what shall I add to support my device? I have tried adding 2003 in TargetProductList also, but with same result.

Josh
Site Admin
Posts: 6593
Joined: 03 Nov 2007, 00:30

Post by Josh » 19 Aug 2011, 13:12

The mode switching did in fact happen, but your guess is right, the "2003" is missing in the TargetProductList.

What does the log say when you have added your ID?


eternity007
Posts: 7
Joined: 19 Aug 2011, 08:47

Post by eternity007 » 22 Aug 2011, 08:50

Josh wrote:
What does the log say when you have added your ID?
Hi Josh,
Thanks for your reply. Yes, I had mistaken last time, this time after putting 2003 in the list switch happens perfectly.
(though I an still facing some connection issue, but that another story)

There is one thing I want to know, what all I want to switch USB manually? As per my understanding,

1. libusb
2. usb_modeswitch binary (this I can get by compiling usb_modeswitch.c on my board)
3. the config file for certain modem (like 19d2:2000 in my case)

Is this enough to execute "usb_modeswitch -c path/to/config/file" successfully?

Please let me know this, as my board space is restrictive, need to thin down almost each an everthing.
Thanks in advance.

eternity007
Posts: 7
Joined: 19 Aug 2011, 08:47

Post by eternity007 » 24 Aug 2011, 19:41

Hi,

In addition to my last post, I have done some steps and faced some problem. Need some suggestion to get out of it.

I have libusb installed, then I compiled usb_modeswitch.c in my board and made the executable.

Now, I have the configuration file same as 19d2:2000 (with added 2003 in targetlist).

So, my steps to connect is:

Code: Select all

1. modprobe usbserial vendor=0x19d2 product=0x2003
2. usb_modeswitch -c /home/me/config/19d2\:2000
3. pppd call gprs
Now, I see all process goes fine in /var/messegs but I do not get internet. (ping google.com fails)

Any sequence or step I missed or any other possible reason for this problem???
it seems weird to me as I could not see any error for this.


Note: gprs(for pppd) script is tested with usb-modeswitch-1.1.9-jimsh and usb-modeswitch-data and found to be working for same modem on same board.

Josh
Site Admin
Posts: 6593
Joined: 03 Nov 2007, 00:30

Post by Josh » 25 Aug 2011, 08:13

I must have missed your last post somehow ...

To answer your first question: your assumptions are correct. You need only the binary and libusb plus the modem configuration. If you are counting every single byte, then you might save some using the command line parameters of usb_modeswitch instead of a config file.

Regarding your connection problems: if you are issued an IP address it might be a routing problem; if not, it might be a ppp parameter problem. Did you add "debug" to your pppd option file ?


Post Reply