|
Activation Codes and Methods, Hardware Details, Sniffing
-
adicarlo
- Posts: 10
- Joined: 14 May 2016, 04:57
Post
by adicarlo » 14 May 2016, 05:15
Found in the bin: an LG AD600 WLAN modem.
I'm running usb-modeswitch version 2.3.0 (2.3.0+repack0-1 debian package) and linux 4.5.0.
On plugging in, the device does enumerate, is sensed, shows a red light. After a few seconds, udev or systemd or whoever runs usb-modeswitch on it, but I don't think its going from storage mode to any other mode. The (large) dongle's red light goes out, some seconds pass, and then it starts blinking blue.
It's possible that all is well, and that any difficulties are are result from using an inactive SIM card.
So -- is this normal? I'm thinking not, since the log says "mode switching may have failed".
If not, if someone is willing to work on it, I'm willing to donate the hardware! Please reply on the thread and I'll PM you.
Below are logs for reference:
syslog:
Code: Select all May 13 23:05:56 salsa kernel: [303013.537044] usb 1-10.7: new high-speed USB device number 20 using xhci_hcd
May 13 23:06:04 salsa kernel: [303021.728566] usb 1-10.7: new high-speed USB device number 21 using xhci_hcd
May 13 23:06:04 salsa kernel: [303021.820675] usb 1-10.7: New USB device found, idVendor=1004, idProduct=6190
May 13 23:06:04 salsa kernel: [303021.820679] usb 1-10.7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
May 13 23:06:04 salsa kernel: [303021.820680] usb 1-10.7: Product: LGE USB Device
May 13 23:06:04 salsa kernel: [303021.820681] usb 1-10.7: Manufacturer: LGE
May 13 23:06:04 salsa kernel: [303021.820682] usb 1-10.7: SerialNumber: 012413000454778
May 13 23:06:04 salsa kernel: [303021.824039] usb-storage 1-10.7:1.0: USB Mass Storage device detected
May 13 23:06:04 salsa kernel: [303021.824182] scsi host14: usb-storage 1-10.7:1.0
May 13 23:06:04 salsa systemd[1]: Starting USB_ModeSwitch__1-10.7...
May 13 23:06:05 salsa usb_modeswitch: switch device 1004:6190 on 001/021
May 13 23:06:25 salsa systemd[1]: Started USB_ModeSwitch__1-10.7.
usb_modeswitch_1-10.7:
Code: Select all
USB_ModeSwitch log from Fri May 13 23:11:42 EDT 2016
Use global config file: /etc/usb_modeswitch.conf
Started via systemd
Raw args from udev: _1-10.7
Use top device dir /sys/bus/usb/devices/1-10.7
Check class of first interface ...
Interface 0 class is 08.
----------------
USB values from sysfs:
manufacturer LGE
product LGE USB Device
serial 012413000454778
----------------
bNumConfigurations is 1 - don't check for active configuration
Found packed config collection /usr/share/usb_modeswitch/configPack.tar.gz
ConfigList: pack/1004:6190 pack/
SCSI attributes not needed, move on
Check config: pack/1004:6190
! matched. Read config data
Extract config 1004:6190 from collection /usr/share/usb_modeswitch/configPack.tar.gz
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1
Unbinding driver
Command to be run:
usb_modeswitch -W -D -u -1 -b 1 -g 23 -v 1004 -p 6190 -f $flags(config)
Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are to be expected in the process)
--------------------------------
Read long config from command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 2.3.0 (C) Josua Dietze 2015
* Based on libusb1/libusbx
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x1004
DefaultProduct= 0x6190
TargetVendor= 0x1004
TargetProduct= 0x61a7
StandardEject=1
System integration mode enabled
Use given bus/device number: 001/023 ...
Look for default devices ...
bus/device number matched
found USB ID 1004:6190
vendor ID matched
product ID matched
Found devices in default mode (1)
Get the current device configuration ...
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)
USB description data (for identification)
-------------------------
Manufacturer: LGE
Product: LGE USB Device
Serial No.: 012413000454778
-------------------------
Sending standard EJECT sequence
Looking for active driver ...
No active driver found. Detached before or never attached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Read the response to message 1 (CSW) ...
Response successfully read (13 bytes).
Trying to send message 2 to endpoint 0x01 ...
OK, message successfully sent
Read the response to message 2 (CSW) ...
Response successfully read (13 bytes).
Reset response endpoint 0x81
Reset message endpoint 0x01
ok:busdev
--------------------------------
(end of usb_modeswitch output)
Check success of mode switch for max. 20 seconds ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Target config not matching - current values are
1-10.7:1.0/bInterfaceClass: 08
bConfigurationValue: 1
bNumConfigurations: 1
busnum: 1
devnum: 23
idProduct: 6190
idVendor: 1004
manufacturer: LGE
product: LGE USB Device
serial: 012413000454778
Mode switching may have failed. Exit
-
Attachments
-
- DSC09051.JPG (50.11 KiB) Viewed 13977 times
-
LOM
- Posts: 1404
- Joined: 11 Jul 2012, 15:14
- Location: Koh Samui, TH
Post
by LOM » 16 May 2016, 06:12
adicarlo wrote:
On plugging in, the device does enumerate, is sensed, shows a red light. After a few seconds, udev or systemd or whoever runs usb-modeswitch on it, but I don't think its going from storage mode to any other mode. The (large) dongle's red light goes out, some seconds pass, and then it starts blinking blue.
The led blinks blue when the dongle is ready to connect to a network, it is a good indication that the dongle has switched from storage-only mode to modem mode.
Which usb id does lsusb show at that point?
-
adicarlo
- Posts: 10
- Joined: 14 May 2016, 04:57
Post
by adicarlo » 18 May 2016, 17:58
LOM wrote:
The led blinks blue when the dongle is ready to connect to a network, it is a good indication that the dongle has switched from storage-only mode to modem mode.
Which usb id does lsusb show at that point?
Still showing as a bulk storage device at this point:
Code: Select all Bus 001 Device 014: ID 1004:6190 LG Electronics, Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x1004 LG Electronics, Inc.
idProduct 0x6190
bcdDevice 11.80
iManufacturer 1
iProduct 2
iSerial 3
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 4
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
-
Josh
- Site Admin
- Posts: 6570
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 18 May 2016, 18:50
I get reports about this problem from time to time. It's not exactly clear what the cause is; it might be in the modem firmware or it might be the combination of modem and host hardware/driver. I don't think the SIM card is involved.
Did you ever use it with a Windows system?
One thing to try is the additional 'MessageContent' that you find in the config file "19d2:2000", after the 'StandardEject' line.
It's just some storage command but some people have reported that it is required to complete the mode switch.
-
adicarlo
- Posts: 10
- Joined: 14 May 2016, 04:57
Post
by adicarlo » 19 May 2016, 18:32
Josh wrote:I get reports about this problem from time to time. It's not exactly clear what the cause is; it might be in the modem firmware or it might be the combination of modem and host hardware/driver. I don't think the SIM card is involved.
Ok, cool, thanks for the clarification.
Did you ever use it with a Windows system?
Hmm, no, would that be useful/interesting? I do have a windows XP box sitting here but usually I leave it powered down...
One thing to try is the additional 'MessageContent' that you find in the config file "19d2:2000", after the 'StandardEject' line.
It's just some storage command but some people have reported that it is required to complete the mode switch.
Pardon me, not sure I follow. I'm using the debian packaged version. After extracting the config file 19d2:2000 from there, it has these contents:
Code: Select all # ZTE devices, some Onda devices
TargetVendor= 0x19d2
TargetProductList="0001,0002,0015,0016,0017,0019,0024,0031,0033,0037,0042,0052,0055,0061,0063,0064,0066,0091,0108,0117,0128,0151,0157,0177,1402,2002,2003"
StandardEject=1
MessageContent="55534243123456702000000080000c85010101180101010101000000000000"
Yet, I wonder, why are you pointing me at this file? The device enumerates as:
Bus 001 Device 016: ID 1004:6190 LG Electronics, Inc.
The file that goes with this device seems to be 1004:6190, which reads:
Code: Select all # LG AD600
TargetVendor=0x1004
TargetProduct=0x61a7
StandardEject=1
-
Josh
- Site Admin
- Posts: 6570
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 19 May 2016, 22:10
Sorry for being not really clear ...
Take the config file for your modem that you found. Put it into the folder "/etc/usb_modeswitch.d".
Edit it and add the line below the "StandardEject" line in the config file "19d2:2000".
Now your config file should look similar to the latter one:
Code: Select all # LG AD600
TargetVendor=0x1004
TargetProduct=0x61a7
StandardEject=1
MessageContent="55534243123456702000000080000c85010101180101010101000000000000"
-
adicarlo
- Posts: 10
- Joined: 14 May 2016, 04:57
Post
by adicarlo » 20 May 2016, 01:45
Josh, thanks for the clarification.
Added the line you identified, and now I'm getting:
Code: Select all May 19 19:17:34 salsa kernel: [205552.260719] usb 1-10.7: new high-speed USB device number 17 using xhci_hcd
May 19 19:17:42 salsa kernel: [205560.196253] usb 1-10.7: new high-speed USB device number 18 using xhci_hcd
May 19 19:17:42 salsa kernel: [205560.288189] usb 1-10.7: New USB device found, idVendor=1004, idProduct=6190
May 19 19:17:42 salsa kernel: [205560.288194] usb 1-10.7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
May 19 19:17:42 salsa kernel: [205560.288195] usb 1-10.7: Product: LGE USB Device
May 19 19:17:42 salsa kernel: [205560.288196] usb 1-10.7: Manufacturer: LGE
May 19 19:17:42 salsa kernel: [205560.288197] usb 1-10.7: SerialNumber: 012413000454778
May 19 19:17:42 salsa kernel: [205560.292068] usb-storage 1-10.7:1.0: USB Mass Storage device detected
May 19 19:17:42 salsa kernel: [205560.292287] scsi host11: usb-storage 1-10.7:1.0
May 19 19:17:42 salsa systemd[1]: Starting USB_ModeSwitch__1-10.7...
May 19 19:17:42 salsa root: usb_modeswitch: use overriding config file /etc/usb_modeswitch.d/1004:6190; make sure this is intended
May 19 19:17:42 salsa root: usb_modeswitch: please report any new or corrected settings; otherwise, check for outdated files
May 19 19:17:42 salsa usb_modeswitch: switch device 1004:6190 on 001/018
And in /var/log/usb_modeswitch_1-10.7:
Code: Select all USB_ModeSwitch log from Thu May 19 19:17:42 EDT 2016
Use global config file: /etc/usb_modeswitch.conf
Started via systemd
Raw args from udev: _1-10.7
Use top device dir /sys/bus/usb/devices/1-10.7
Check class of first interface ...
Interface 0 class is 08.
----------------
USB values from sysfs:
manufacturer LGE
product LGE USB Device
serial 012413000454778
----------------
bNumConfigurations is 1 - don't check for active configuration
Found packed config collection /usr/share/usb_modeswitch/configPack.tar.gz
ConfigList: /etc/usb_modeswitch.d/1004:6190 pack/1004:6190 pack/
SCSI attributes not needed, move on
Check config: /etc/usb_modeswitch.d/1004:6190
! matched. Read config data
Use config file from override folder /etc/usb_modeswitch.d
Logger is /usr/bin/logger
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1
Unbinding driver
Command to be run:
usb_modeswitch -W -D -u -1 -b 1 -g 18 -v 1004 -p 6190 -f $flags(config)
Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are to be expected in the process)
--------------------------------
Read long config from command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 2.3.0 (C) Josua Dietze 2015
* Based on libusb1/libusbx
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x1004
DefaultProduct= 0x6190
TargetVendor= 0x1004
TargetProduct= 0x61a7
StandardEject=1
MessageContent="55534243123456702000000080000c85010101180101010101000000000000"
System integration mode enabled
Use given bus/device number: 001/018 ...
Look for default devices ...
bus/device number matched
found USB ID 1004:6190
vendor ID matched
product ID matched
Found devices in default mode (1)
Get the current device configuration ...
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)
USB description data (for identification)
-------------------------
Manufacturer: LGE
Product: LGE USB Device
Serial No.: 012413000454778
-------------------------
Sending standard EJECT sequence
Looking for active driver ...
No active driver found. Detached before or never attached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Read the response to message 1 (CSW) ...
Response successfully read (13 bytes).
Trying to send message 2 to endpoint 0x01 ...
OK, message successfully sent
Read the response to message 2 (CSW) ...
Response successfully read (13 bytes).
Trying to send message 3 to endpoint 0x01 ...
OK, message successfully sent
Read the response to message 3 (CSW) ...
Response reading failed (error -9)
Device is gone, skip any further commands
ok:busdev
--------------------------------
(end of usb_modeswitch output)
Check success of mode switch for max. 20 seconds ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Read attributes ...
Target config not matching - current values are
1-10.7:1.0/bInterfaceClass: 08
bConfigurationValue: 1
bNumConfigurations: 1
busnum: 1
devnum: 18
idProduct: 6190
idVendor: 1004
manufacturer: LGE
product: LGE USB Device
serial: 012413000454778
Mode switching may have failed. Exit
Anything else I should try?
Or, care to own this baby?
-
LOM
- Posts: 1404
- Joined: 11 Jul 2012, 15:14
- Location: Koh Samui, TH
Post
by LOM » 20 May 2016, 06:53
You have the dongle connected to port 7 on a multiport hub, try it on a simpler usb port.
Your usb bus 1 has 10 hubs connected? What kind of hardware is this?
-
adicarlo
- Posts: 10
- Joined: 14 May 2016, 04:57
Post
by adicarlo » 20 May 2016, 19:18
LOM wrote:You have the dongle connected to port 7 on a multiport hub, try it on a simpler usb port.
Your usb bus 1 has 10 hubs connected? What kind of hardware is this?
It's a Supermicro Z87. Pretty standard linux rig.
The hub is not the problem. Due to hard experience, I try to connect everything through hubs when possible. However, connecting the device right to the front panel connector, which goes right to the mobo, still shows the same behavior, and specficially, a failure, after modifying the config, with the response to message 3, just as before:
Code: Select all Trying to send message 3 to endpoint 0x01 ...
OK, message successfully sent
Read the response to message 3 (CSW) ...
Response reading failed (error -9)
Device is gone, skip any further commands
-
Josh
- Site Admin
- Posts: 6570
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 21 May 2016, 00:49
Do you provide the hub with external power? USB modems typically use the full 500 mA that are standardized as the max in the USB specification.
-
adicarlo
- Posts: 10
- Joined: 14 May 2016, 04:57
Post
by adicarlo » 21 May 2016, 00:51
Josh wrote:Do you provide the hub with external power? USB modems typically use the full 500 mA that are standardized as the max in the USB specification.
I do indeed. And, moreover, the behavior is identical when plugged directly into one of the mobo USB ports.
Next thing to try?
-
Josh
- Site Admin
- Posts: 6570
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 21 May 2016, 08:16
Annother variable to adjust would be the timing of the mode switch.
In your custom config file, add the line "WaitBefore=5". Any changes?
-
adicarlo
- Posts: 10
- Joined: 14 May 2016, 04:57
Post
by adicarlo » 21 May 2016, 22:21
Josh wrote:Annother variable to adjust would be the timing of the mode switch.
In your custom config file, add the line "WaitBefore=5". Any changes?
Oh, ah, oh, ah! Looks like some progress is made! Now I'm seeing the modeswitching seems to complete, and a block device as well as some ttyACM# devices show up.
Here's the usb_modeswitch debug file:
Code: Select all USB_ModeSwitch log from Sat May 21 16:17:59 EDT 2016
Use global config file: /etc/usb_modeswitch.conf
Started via systemd
Raw args from udev: _1-14
Use top device dir /sys/bus/usb/devices/1-14
Check class of first interface ...
Interface 0 class is 08.
----------------
USB values from sysfs:
manufacturer LGE
product LGE USB Device
serial 012413000454778
----------------
bNumConfigurations is 1 - don't check for active configuration
Found packed config collection /usr/share/usb_modeswitch/configPack.tar.gz
ConfigList: /etc/usb_modeswitch.d/1004:6190 pack/1004:6190 pack/
SCSI attributes not needed, move on
Check config: /etc/usb_modeswitch.d/1004:6190
! matched. Read config data
Use config file from override folder /etc/usb_modeswitch.d
Logger is /usr/bin/logger
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1
Delay time of 5 seconds
wait is over, start mode switch
Unbinding driver
Command to be run:
usb_modeswitch -W -D -u -1 -b 1 -g 26 -v 1004 -p 6190 -f $flags(config)
Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are to be expected in the process)
--------------------------------
Read long config from command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 2.3.0 (C) Josua Dietze 2015
* Based on libusb1/libusbx
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x1004
DefaultProduct= 0x6190
TargetVendor= 0x1004
TargetProduct= 0x61a7
StandardEject=1
MessageContent="55534243123456702000000080000c85010101180101010101000000000000"
System integration mode enabled
Use given bus/device number: 001/026 ...
Look for default devices ...
bus/device number matched
found USB ID 1004:6190
vendor ID matched
product ID matched
Found devices in default mode (1)
Get the current device configuration ...
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)
USB description data (for identification)
-------------------------
Manufacturer: LGE
Product: LGE USB Device
Serial No.: 012413000454778
-------------------------
Sending standard EJECT sequence
Looking for active driver ...
No active driver found. Detached before or never attached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Read the response to message 1 (CSW) ...
Response successfully read (13 bytes).
Trying to send message 2 to endpoint 0x01 ...
OK, message successfully sent
Read the response to message 2 (CSW) ...
Response successfully read (13 bytes).
Trying to send message 3 to endpoint 0x01 ...
OK, message successfully sent
Read the response to message 3 (CSW) ...
Response reading failed (error -9)
Device is gone, skip any further commands
ok:busdev
--------------------------------
(end of usb_modeswitch output)
Check success of mode switch for max. 20 seconds ...
Wait for device file system (1 sec.) ...
Wait for device file system (2 sec.) ...
Read attributes ...
All attributes matched
Mode switching was successful, found 1004:61a7 (LGE: LGE USB Device)
No vendor-specific class found, skip driver check
Check for AVOID_RESET_QUIRK kernel attribute
AVOID_RESET_QUIRK activated
All done, exit
I believe that indicates all is well?
Here's my '1004:6190' file with the overridden settings:
Code: Select all # LG AD600
TargetVendor=0x1004
TargetProduct=0x61a7
StandardEject=1
MessageContent="55534243123456702000000080000c85010101180101010101000000000000"
WaitBefore=5
-
Josh
- Site Admin
- Posts: 6570
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 22 May 2016, 00:27
My suspicion was that the stick probably wants to be initialized completely as a storage device.
The USB storage driver has a built-in delay before actually using and accessing a storage device, in order to allow any USB hard disk to spin up. Earlier kernels have that delay pre-set at 5 seconds, but newer kernels have it reduced to 1 second.
If you don't want to wait for those 5 seconds, you can experiment with the "delay_use" value of the storage driver. There is a convenience feature built into the usb_modeswitch wrapper; you can make it set the amount of seconds that you want. Just edit "/etc/usb_modeswitch.conf".
Once you have reduced the value, you can also try to reduce the "WaitBefore" amount.
-
LOM
- Posts: 1404
- Joined: 11 Jul 2012, 15:14
- Location: Koh Samui, TH
Post
by LOM » 22 May 2016, 03:08
Please provide a lsusb -vd listing for 1004:61a7 now when you finally got it to switch.
|
|