Author Message

<  Device Information  ~  Haier CE100 (vendor=201e product=2009)

PostPosted: Thu Feb 17, 2011 10:04 pm Reply with quote
Site Admin Posts: 6469 Joined: Sat Nov 03, 2007 12:30 am
The error messages can be safely ignored. They are a consequence of the device having already switched which means it is not accessible anymore. This is always a good sign.

Some devices or systems need an explicit endpoint reset before finally switching. USB_ModeSwitch tries to do that everytime to achieve some generalization. The resetting error is reported for informational purposes but does not have any consequences.

The -I option is to avoid querying the storage device for SCSI identification strings. So there is actually less to do for usb_modeswitch than if you leave it away.
Some devices switch better if the storage device is accessed briefly before sending the command; in that case the -I parameter might be wrong. But if things work with it, all the better.



Offline
PostPosted: Wed Apr 27, 2011 12:41 pm Reply with quote
Posts: 15 Joined: Fri Dec 31, 2010 1:58 pm
Hi Josh,
Once again i have query regarding this Haier modem.
Sometimes i get , its usb_modeswitch command gets hanged.
usb_ms -v 0x201e -p 0x2009 -C 0xff -M 5553424312345678000000000000061e000000000000000000000000000000 -2 5553424312345679000000000000061b000000020000000000000000000000

I straced on its pid. It looks it gets in infinite loop in some ioctl command. Below is lines from strace.
ioctl(3, USBDEVFS_REAPURBNDELAY, 0xbffe62f8) = -1 EAGAIN (Resource temporarily unavailable)
select(4, NULL, [], NULL, {0, 1000}) = 0 (Timeout)
ioctl(3, USBDEVFS_REAPURBNDELAY, 0xbffe62f8) = -1 EAGAIN (Resource temporarily unavailable)
select(4, NULL, [], NULL, {0, 1000}

And above logs continuously coming. Then i have to kill manually.

Below is output of modeswitch command.
Looking for target devices ...
No devices in target mode or class found
Looking for default devices ...
Found devices in default mode, class or configuration (1)
Accessing device 003 on bus 001 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using endpoints 0x07 (out) and 0x86 (in)
Using endpoints 0x07 (out) and 0x86 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found ("option")
OK, driver "option" detached
Program cancelled by system. Bye.


So i am not getting idea, why sometimes it gets stucked. Sometimes works perfectly.
Can you have any idea or solution regarding this ?? Could it be a problem of not using "-I" option ?? Because in next step is use -I then it didnt get hang.

I appended -I in modeswitch command. Then it didnt get in loop but didnt get switched.
# usb_ms -v 0x201e -p 0x2009 -C 0xff -M 5553424312345678000000000000061e000000000000000000000000000000 -2 5553424312345679000000000000061b000000020000000000000000000000 -I -W
Taking all parameters from the command line


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

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x201e
DefaultProduct= 0x2009
TargetVendor= not set
TargetProduct= not set
TargetClass= 0xff
TargetProductList=""

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
KobilMode=0
MessageEndpoint= not set
MessageContent="5553424312345678000000000000061e000000000000000000000000000000"
MessageContent2="5553424312345679000000000000061b000000020000000000000000000000"
NeedResponse=0
ResponseEndpoint= not set
Interface=0x00

InquireDevice disabled
Success check disabled
System integration mode disabled

usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 003 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device

Looking for target devices ...
No devices in target mode or class found
Looking for default devices ...
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 201e:2009
found matching vendor ID
found matching product ID
target class ff not matching
adding device
searching devices, found USB ID 1d6b:0001
Found devices in default mode, class or configuration (1)
Accessing device 003 on bus 001 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using endpoints 0x07 (out) and 0x86 (in)
Using endpoints 0x07 (out) and 0x86 (in)

USB description data (for identification)
-------------------------
Manufacturer: Qualcomm, Incorporated
Product: USB MMC Storage
Serial No.: 000000000002
-------------------------
Looking for active driver ...
USB error: could not get bound driver: No data available
No driver found. Either detached before or never attached
Setting up communication with interface 0 ...
Using endpoint 0x07 for message sending ...
Trying to send message 1 to endpoint 0x07 ...
Sending the message returned error -110. Trying to continue
Trying to send message 2 to endpoint 0x07 ...
Sending the message returned error -110. Trying to continue
Resetting response endpoint 0x86
Resetting message endpoint 0x07
-> Run lsusb to note any changes. Bye.


So somewhere it gets failed in communicating.

Then i did rmmod of uchi-hcd /usbserial/option modules and then reloaded them.
Then onwards , this modem gets switched perfectly.

So at last, somewhere i assume, this modem gets hang in modeswitch command due to absence of "-I" option. Please correct me if my assumption is wrong. I think you can guess more precisely from above strace output. I dont have idea of usb ioctl command.

And also i remembered that you encourage for using -I option.
I want to know your point in this modeswitch hang issue.


Offline
PostPosted: Thu Apr 28, 2011 10:07 pm Reply with quote
Site Admin Posts: 6469 Joined: Sat Nov 03, 2007 12:30 am
This is strange:
"...
Looking for active driver ...
OK, driver found ("option")
OK, driver "option" detached
..."

You sure that this device was not already switched before? The "option" driver usually binds to interfaces with class 0xff, not to the unswitched storage device with class 0x08.

And in your second log:
"No driver found. Either detached before or never attached"

Again, there should be "usb-storage" bound to the device. Otherwise the EJECT command may fail.

Errors concerning "usb-storage" may come up when the device reports incorrect "mode sense" values. Many devices are affected by this with kernels >= 2.6.32 (which are stricter regarding these values).
At least they are initialized correctly in most cases.

Also, I hit some strange errors in libusb1 lately. Using the original libusb0 made these errors go away. So this might be a thing to check regarding the ioctl.

In any case make sure you don't have a "double switching", probably initiated from two different places like udev and the command line.



Offline

Display posts from previous:  Sort by:

All times are UTC+02:00
Page 2 of 2
18 posts
Go to page   Previous 1 2
Users browsing this forum: No registered users and 2 guests
Search for:
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum