Thanks for your respond.
But I meet error -110, and change mode failed.
My step is
1. modefy /etc/usb_modeswitch.d/1a8d:1000 to suit C170.
(add three message in post 11)
http://dl.dropbox.com/u/2495108/1a8d_1000
2. type command in console.
sudo usb_modeswitch -W -c "/etc/usb_modeswitch.d/1a8d:1000"
and this is the log file
http://dl.dropbox.com/u/2495108/failed.log
3. lsusb to check, it still 1a8d:1000 not 1a8d:1009.
Another question is, how to find needed message in UsbSnoop.log?
Messages in Post 11 (from Fri Dec 25, 2009 8:31 am) is a result.
But I don't know the rule to search messages if I get a new 3G device.
Could you explain the rule to filter out messages for change mode command,please ?
My SniffUSB/XP log is
http://dl.dropbox.com/u/2495108/UsbSnoop.log
But I meet error -110, and change mode failed.
My step is
1. modefy /etc/usb_modeswitch.d/1a8d:1000 to suit C170.
(add three message in post 11)
http://dl.dropbox.com/u/2495108/1a8d_1000
2. type command in console.
sudo usb_modeswitch -W -c "/etc/usb_modeswitch.d/1a8d:1000"
and this is the log file
http://dl.dropbox.com/u/2495108/failed.log
3. lsusb to check, it still 1a8d:1000 not 1a8d:1009.
Another question is, how to find needed message in UsbSnoop.log?
Messages in Post 11 (from Fri Dec 25, 2009 8:31 am) is a result.
But I don't know the rule to search messages if I get a new 3G device.
Could you explain the rule to filter out messages for change mode command,please ?
My SniffUSB/XP log is
http://dl.dropbox.com/u/2495108/UsbSnoop.log
OK, maybe there is an interval needed between the three commands. Try again, this time splitting the multiple commands into three config files (for testing they can be anywhere) and call them one after the other. Don't use "CheckSuccess" (except maybe in the last config). Add "NeedResponse=1" (important!).
# usb_modeswitch -c config1
# usb_modeswitch -c config2
# usb_modeswitch -c config3
Regarding the finding of the right commands in the log: there is no rule at all ...
The only thing that's logical is that the sniffing log ends after the device has switched (IRP_MN_SURPRISE_REMOVAL message, just like when unplugging the device).
Consequently, the switching command must be around the end of the log. Most suspicious are storage commands (bulk transfers starting with 55 53 42 43 and a length of 31 bytes).
The official storage commands are listed in the USB standard docs which are freely available.
# usb_modeswitch -c config1
# usb_modeswitch -c config2
# usb_modeswitch -c config3
Regarding the finding of the right commands in the log: there is no rule at all ...
The only thing that's logical is that the sniffing log ends after the device has switched (IRP_MN_SURPRISE_REMOVAL message, just like when unplugging the device).
Consequently, the switching command must be around the end of the log. Most suspicious are storage commands (bulk transfers starting with 55 53 42 43 and a length of 31 bytes).
The official storage commands are listed in the USB standard docs which are freely available.
Unfortunately, it's still failed.....
This is my three config file as your suggest.
http://dl.dropbox.com/u/2495108/1a8d_10001
http://dl.dropbox.com/u/2495108/1a8d_10002
http://dl.dropbox.com/u/2495108/1a8d_10003
And I type three command sequentially.
#sudo usb_modeswitch -W -c "/home/alextu/1a8d_10001"
#sudo usb_modeswitch -W -c "/home/alextu/1a8d_10002"
#sudo usb_modeswitch -W -c "/home/alextu/1a8d_10003"
But it failed(could not find driver) from second command.
This is the log file.
http://dl.dropbox.com/u/2495108/threeConfLog
And I tried type three command sequentially.
#sudo usb_modeswitch -v 0x1a8d -p 0x1000 -m 0x01 -M 55534243003ec888000000000000061e000000000000000000000000000000
#sudo usb_modeswitch -v 0x1a8d -p 0x1000 -m 0x01 -M 555342430870e9870000000000000600000000000000000000000000000000
#sudo usb_modeswitch -v 0x1a8d -p 0x1000 -m 0x01 -M 55534243a8e40689000000000000061b000000020000000000000000000000
It meet the same issue.
This is the log file.
http://dl.dropbox.com/u/2495108/threeCommandlog
But I found some thing interesting.
If I type
#sudo usb_modeswitch -W -c "/home/alextu/1a8d_10003"
only after plug-in C170 device.
And check by lsusb, then I could see it change mode to 1a8d:1009 in a moment, but revert to 1a8d:1000 soon.
This is the log file.
http://dl.dropbox.com/u/2495108/only3config
This is my three config file as your suggest.
http://dl.dropbox.com/u/2495108/1a8d_10001
http://dl.dropbox.com/u/2495108/1a8d_10002
http://dl.dropbox.com/u/2495108/1a8d_10003
And I type three command sequentially.
#sudo usb_modeswitch -W -c "/home/alextu/1a8d_10001"
#sudo usb_modeswitch -W -c "/home/alextu/1a8d_10002"
#sudo usb_modeswitch -W -c "/home/alextu/1a8d_10003"
But it failed(could not find driver) from second command.
This is the log file.
http://dl.dropbox.com/u/2495108/threeConfLog
And I tried type three command sequentially.
#sudo usb_modeswitch -v 0x1a8d -p 0x1000 -m 0x01 -M 55534243003ec888000000000000061e000000000000000000000000000000
#sudo usb_modeswitch -v 0x1a8d -p 0x1000 -m 0x01 -M 555342430870e9870000000000000600000000000000000000000000000000
#sudo usb_modeswitch -v 0x1a8d -p 0x1000 -m 0x01 -M 55534243a8e40689000000000000061b000000020000000000000000000000
It meet the same issue.
This is the log file.
http://dl.dropbox.com/u/2495108/threeCommandlog
But I found some thing interesting.
If I type
#sudo usb_modeswitch -W -c "/home/alextu/1a8d_10003"
only after plug-in C170 device.
And check by lsusb, then I could see it change mode to 1a8d:1009 in a moment, but revert to 1a8d:1000 soon.
This is the log file.
http://dl.dropbox.com/u/2495108/only3config
In your configs you had "ResponseNeeded=1". It's "NeedResponse=1" really. There are some very old (and wrong) entries in the "usb_modeswitch.setup" file
But never mind, I think the third command is the right one anyway. Try to use it with "NeedResponse=1" and the device will probably switch a bit faster.
For all experiments it is important to re-plug the device every time!
But never mind, I think the third command is the right one anyway. Try to use it with "NeedResponse=1" and the device will probably switch a bit faster.
For all experiments it is important to re-plug the device every time!
Yes, Thanks for your kindly help!
It success after three commands
# usb_modeswitch -c config1
# usb_modeswitch -c config2
# usb_modeswitch -c config3
And device 1a8d:1000 change to 1a8d:1009.
But another question is how to imprement it in USB_ModeSwitch process?
Because when plug-in C170 and get device 1a8d:1000,
USB_ModeSwitch will search "/etc/usb_modeswitch.d/1a8d:1000"
for send command to USB device.
And in previous test, the configure file "/etc/usb_modeswitch.d/1a8d:1000"
could only have one MessageContent.
How could I let it pass three messages in three configure file automatically after plug-in C170?
And how to auto dial-up for 3.5g network after mode switch successed?
Thanks for your kindly help again!
It success after three commands
# usb_modeswitch -c config1
# usb_modeswitch -c config2
# usb_modeswitch -c config3
And device 1a8d:1000 change to 1a8d:1009.
But another question is how to imprement it in USB_ModeSwitch process?
Because when plug-in C170 and get device 1a8d:1000,
USB_ModeSwitch will search "/etc/usb_modeswitch.d/1a8d:1000"
for send command to USB device.
And in previous test, the configure file "/etc/usb_modeswitch.d/1a8d:1000"
could only have one MessageContent.
How could I let it pass three messages in three configure file automatically after plug-in C170?
And how to auto dial-up for 3.5g network after mode switch successed?
Thanks for your kindly help again!
I'm working on the next release, and here is a preliminary beta package.
Please test it (manually first); I have added a configuration for the C170 that you can put into /etc/usb_modeswitch.d once the manual run is successful.
The new feature is that you can put all commands in one config file and add a delay in between. This is similar to sending each command from a separate configuration.
Try playing with the value of MessageDelay. It is set in milliseconds.
Please test it (manually first); I have added a configuration for the C170 that you can put into /etc/usb_modeswitch.d once the manual run is successful.
The new feature is that you can put all commands in one config file and add a delay in between. This is similar to sending each command from a separate configuration.
Try playing with the value of MessageDelay. It is set in milliseconds.
Thanks for your support on C170.
I meet some error when test this version of code.
Before test,
I type "make uninstall" in folder usb-modeswitch-1.1.2/
then
type "make install" in folder usb-modeswitch-1.1.3/
1. The confige file "1a8d
uPr=5G" could not be used on C170.
Because of it not match the device information of C170.
This is the log file when I plug-in C170.
http://dl.dropbox.com/u/2495108/usb_mod ... ailed_0608
2. After modified "1a8d
uPr=5G" to "1a8d:1000"It still failed.
It return error -110.
This is the log file when I re-plug-in C170.
http://dl.dropbox.com/u/2495108/usb_modeswitch_failed_2
And one question I don't understand.
When I type "eject /dev/sr0", device will change 1a8d:1000 to 1a8d:1009.
Then I could dial up by wvdial utility.
Why don't Usb_ModeSwitch eject /dev/sr0 by command "eject /dev/srX" ?
I guess this could be done by udev script.
I meet some error when test this version of code.
Before test,
I type "make uninstall" in folder usb-modeswitch-1.1.2/
then
type "make install" in folder usb-modeswitch-1.1.3/
1. The confige file "1a8d
Because of it not match the device information of C170.
This is the log file when I plug-in C170.
http://dl.dropbox.com/u/2495108/usb_mod ... ailed_0608
2. After modified "1a8d
It return error -110.
This is the log file when I re-plug-in C170.
http://dl.dropbox.com/u/2495108/usb_modeswitch_failed_2
And one question I don't understand.
When I type "eject /dev/sr0", device will change 1a8d:1000 to 1a8d:1009.
Then I could dial up by wvdial utility.
Why don't Usb_ModeSwitch eject /dev/sr0 by command "eject /dev/srX" ?
I guess this could be done by udev script.
I changed the wrapper script in the beta package. Please load it again; the matching should work now.CCTU wrote:1. The confige file "1a8duPr=5G" could not be used on C170.
Because of it not match the device information of C170.
Please add "NeedResponse=1" to the config file. I missed that, but it's important.CCTU wrote:2. After modified "1a8duPr=5G" to "1a8d:1000"It still failed.
It return error -110.
Because we would have to wait for the SCSI device to be ready which takes quite a while. By that time it might be automounted by the desktop system, which can add further complications.CCTU wrote:Why don't Usb_ModeSwitch eject /dev/sr0 by command "eject /dev/srX" ?
Yes, I re-installed Usb_ModeSwitch by "make install" after "make unstall."
I am sorry, but it still failed......
This is the log file.
http://dl.dropbox.com/u/2495108/usb_mod ... ailed_0610
I am sorry, but it still failed......
This is the log file.
http://dl.dropbox.com/u/2495108/usb_mod ... ailed_0610
I find the MessageContent in configure file "1a8d
uPr=5G" is not the three messages in post 11 (from Fri Dec 25, 2009 8:31 am).
00000000: 55 53 42 43 00 3e c8 88 00 00 00 00 00 00 06 1e
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000000: 55 53 42 43 08 70 e9 87 00 00 00 00 00 00 06 00
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000000: 55 53 42 43 a8 e4 06 89 00 00 00 00 00 00 06 1b
00000010: 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00
The MessageContent in configure file "1a8d
uPr=5G" is
MessageContent="5553424312345678000000000000061e000000000000000000000000000000"
MessageContent2="55534243123456790000000000000600000000000000000000000000000000"
MessageContent3="5553424312345670000000000000061b000000020000000000000000000000"
And I try to modified MessageContent to suit the three messages in post 11 as attached file.
http://dl.dropbox.com/u/2495108/1a8d_10 ... ngeMessage
But it still failed and log file is below.
http://dl.dropbox.com/u/2495108/usb_mod ... essage_log
Then I try your case for single command, so configure file is change to
http://dl.dropbox.com/u/2495108/1a8d_10 ... gleMessage
It failed and log file is
http://dl.dropbox.com/u/2495108/usb_mod ... essage_log
00000000: 55 53 42 43 00 3e c8 88 00 00 00 00 00 00 06 1e
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000000: 55 53 42 43 08 70 e9 87 00 00 00 00 00 00 06 00
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000000: 55 53 42 43 a8 e4 06 89 00 00 00 00 00 00 06 1b
00000010: 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00
The MessageContent in configure file "1a8d
MessageContent="5553424312345678000000000000061e000000000000000000000000000000"
MessageContent2="55534243123456790000000000000600000000000000000000000000000000"
MessageContent3="5553424312345670000000000000061b000000020000000000000000000000"
And I try to modified MessageContent to suit the three messages in post 11 as attached file.
http://dl.dropbox.com/u/2495108/1a8d_10 ... ngeMessage
But it still failed and log file is below.
http://dl.dropbox.com/u/2495108/usb_mod ... essage_log
Then I try your case for single command, so configure file is change to
http://dl.dropbox.com/u/2495108/1a8d_10 ... gleMessage
It failed and log file is
http://dl.dropbox.com/u/2495108/usb_mod ... essage_log
O.K., folks, there is a new beta package ready.
Please try first with the included config file (1a8d
uPr=5G) with the -c parameter, as usual. If it still doesn't work try to enable the "MessageDelay" parameter which is commented out initially.
I mainly changed two things to come closer to what your sniffing logs are showing.
Please try first with the included config file (1a8d
I mainly changed two things to come closer to what your sniffing logs are showing.
I have tried the beta package, but still failed on C270.
also enable the MessageDelay to try, but still failed.
here are log.
How about the error message in log ? Does it have some affect?
also enable the MessageDelay to try, but still failed.
here are log.
* usb-modeswitch: handle USB devices with multiple modes
* Version 1.1usb 1-1: usbfs: process 29913 (usb_modeswitch) did not claim interface 0 before use
.3 (C) Josua Dietze 2010
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x1a8d
DefaultProduct= 0x1000
TargetVendor= 0x1a8d
TargetProduct= 0x1009
TargetClass= not set
TargetProductList=""
DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
MessageEndpoint= not set
MessageContent="5553424312345678000000000000061e000000000000000000000000000000"
MessageContent2="5553424312345679000000000000061b000000020000000000000000000000"
NeedResponse=1
ResponseEndpoint= not set
Interface=0x00
InquireDevice enabled (default)
Success check enabled, max. wait time 20 seconds
System integration mode disabled
usb_os_init: Found USB VFS at /proc/bus/usb
usb_set_debug: Setting debugging level to 15 (on)
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 002
usb_os_find_devices: Found 009 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
Looking for target devices ...
searching devices, found USB ID 0000:0000
searching devices, found USB ID 1a8d:1000
found matching vendor ID
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 1a8d:1000
found matching vendor ID
found matching product ID
adding device
searching devices, found USB ID 0000:0000
Found devices in default mode or class (1)
Accessing device 009 on bus 001 ...
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
USB error: could not get bound driver: No data available
No driver found. Either detached before or never attached
SCSI inquiry data (for identification)
-------------------------
Vendor String:
Model String:
Revision String:
-----------------------
USB description data (for identification)
-------------------------
Manufacturer: BandRich, Inc.
Product: BandLuxe 3.5G HSPA Adapter
Serial No.: 358094021837456
-------------------------
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 ...
OK, response successfully read (0 bytes).
Delaying next message transfer for 1000 ms
Trying to send message 2 to endpoint 0x01 ...
OK, message successfully sent
Reading the response to message 2 ...
OK, response successfully read (0 bytes).
Checking for mode switch (max. 20 times, once per second) ...
Waiting for original device to vanish ...
Waiting for original device to vanish ...
Waiting for original device to vanish ...
Waiting for original device to vanish ...
Waiting for original device to vanish ...
Waiting for original device to vanish ...
Waiting for original device to vanish ...
Waiting for original device to vanish ...
Waiting for original device to vanish ...
Waiting for original device to vanish ...
Waiting for original device to vanish ...
Waiting for original device to vanish ...
Waiting for original device to vanish ...
Waiting for original device to vanish ...
Waiting for original device to vanish ...
Waiting for original device to vanish ...
Waiting for original device to vanish ...
Waiting for original device to vanish ...
Waiting for original device to vanish ...
Waiting for original device to vanish ...
Original device still present after the timeout
Mode switch most likely failed. Bye.
How about the error message in log ? Does it have some affect?
Code: Select all
usb 1-1: usbfs: process 2292 (usb_modeswitch) did not claim interface 0 before use
The usbfs error comes up because the storage driver was already removed when you ran manually. I suppose you have the full package installed and the (old) BandLuxe configuration is applied automatically as soon as you plug in.
During these experiments I recommend to do a "make uninstall" to prevent that (or removing the package if you installed from a distribution). You can re-install at any time later.
I assume that it is important with this "sensitive" device to stay close to the "work flow" in Windows as seen in your sniffing logs.
The thing with the response is not quite right yet. The usual result (like in your sniffing logs) is a return of 13 bytes, but you get 0 ...
During these experiments I recommend to do a "make uninstall" to prevent that (or removing the package if you installed from a distribution). You can re-install at any time later.
I assume that it is important with this "sensitive" device to stay close to the "work flow" in Windows as seen in your sniffing logs.
The thing with the response is not quite right yet. The usual result (like in your sniffing logs) is a return of 13 bytes, but you get 0 ...