Author Message

<  Setup Discussion  ~  A-link 3GU hot insert?

PostPosted: Thu Aug 25, 2011 1:57 pm
Posts: 6Joined: Thu Aug 25, 2011 1:40 pm
I've got Linux Mint 11 and the modem mentioned in the subject. The modem works OK if it is plugged in before powering on the PC.
If it is hot inserted it seems that there is a switching loop between a mass storage and a modem. Command lsusb shows that the
device is a modem for a short period but gets reset and returns back to a mass storage. This goes on forever.

Has there been such changes in Modeswitch that have broken support for hot insert?

Here is a snippert from the modeswitch log:

Target device description data
-------------------------
Manufacturer: A-Link
Product:
Serial No.: 1234567890ABCDEF
-------------------------
Found correct target device

Mode switch succeeded. Bye.

ok:1e0e:9200
--------------------------------
(end of usb_modeswitch output)

USB dir exists: /sys/bus/usb/devices/1-2
Warning: USB attribute "product" not found.
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1

Now checking for newly created serial devices ...
no new serial devices found
Found 1e0e:9200 in bind_list
Checking for AVOID_RESET_QUIRK attribute
AVOID_RESET_QUIRK not present

All done, exiting



--------------------------------------------------------------------------------------------------------------------------------------------------------
Kernel version: 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 i686 i686 i386 GNU/Linux
USB modeswitch version: 1.1.6


Offline Profile
PostPosted: Thu Aug 25, 2011 6:37 pm
Site AdminPosts: 4536Joined: Sat Nov 03, 2007 12:30 am
usb_modeswitch will stop doing anything after the mode switching succeeded as it always did. No change there.

A reset cycle may be caused by problems with the usb-storage driver. See the output of "dmesg", there may be more hints.

Newer kernels have added the AVOID_RESET_QUIRK precisely to prevent this from happening. usb_modeswitch will set this flag if it is found in the system.



Offline Profile
PostPosted: Fri Aug 26, 2011 9:15 am
Posts: 6Joined: Thu Aug 25, 2011 1:40 pm
Josh wrote:
usb_modeswitch will stop doing anything after the mode switching succeeded as it always did. No change there.

A reset cycle may be caused by problems with the usb-storage driver. See the output of "dmesg", there may be more hints.

Newer kernels have added the AVOID_RESET_QUIRK precisely to prevent this from happening. usb_modeswitch will set this flag if it is found in the system.



Dmesg provided no new output after hot insert, but here is a snippet from syslog that keeps repeating:

:31 T60 usb_modeswitch: switching 1e0e:f000 (A-Link : A-Link )
:32 T60 kernel: [ 2793.242500] usb 1-2: USB disconnect, address 36
:32 T60 kernel: [ 2793.608064] usb 1-2: new high speed USB device using ehci_hcd and address 37
:32 T60 kernel: [ 2793.765737] option 1-2:1.0: GSM modem (1-port) converter detected
:32 T60 kernel: [ 2793.765924] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0
:32 T60 kernel: [ 2793.766142] option 1-2:1.1: GSM modem (1-port) converter detected
:32 T60 kernel: [ 2793.766299] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB1
:32 T60 kernel: [ 2793.773132] scsi35 : usb-storage 1-2:1.2
:32 T60 kernel: [ 2793.773991] option 1-2:1.3: GSM modem (1-port) converter detected
:32 T60 kernel: [ 2793.774202] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB2
:33 T60 kernel: [ 2794.159379] usb 1-2: USB disconnect, address 37
:33 T60 kernel: [ 2794.159662] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
:33 T60 kernel: [ 2794.159707] option 1-2:1.0: device disconnected
:33 T60 kernel: [ 2794.159965] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
:33 T60 kernel: [ 2794.159996] option 1-2:1.1: device disconnected
:33 T60 kernel: [ 2794.161710] option: option_instat_callback: error -108
:33 T60 kernel: [ 2794.161853] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
:33 T60 kernel: [ 2794.161885] option 1-2:1.3: device disconnected
:33 T60 usb_modeswitch: switched to 1e0e:9200 (: )
:33 T60 kernel: [ 2794.164370] usb 1-2: usbfs: USBDEVFS_CONTROL failed cmd usb_modeswitch rqt 128 rq 6 len 255 ret -108
:38 T60 kernel: [ 2799.148042] usb 1-2: new high speed USB device using ehci_hcd and address 38
:38 T60 kernel: [ 2799.286144] scsi36 : usb-storage 1-2:1.0
:38 T60 usb_modeswitch: switching 1e0e:f000 (A-Link : A-Link )
:39 T60 kernel: [ 2800.262772] usb 1-2: USB disconnect, address 38
:39 T60 kernel: [ 2800.628062] usb 1-2: new high speed USB device using ehci_hcd and address 39
:39 T60 kernel: [ 2800.782989] option 1-2:1.0: GSM modem (1-port) converter detected
:39 T60 kernel: [ 2800.783183] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0
:39 T60 kernel: [ 2800.783400] option 1-2:1.1: GSM modem (1-port) converter detected
:39 T60 kernel: [ 2800.783560] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB1
:39 T60 kernel: [ 2800.788597] scsi37 : usb-storage 1-2:1.2
:39 T60 kernel: [ 2800.792949] option 1-2:1.3: GSM modem (1-port) converter detected
:39 T60 kernel: [ 2800.793165] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB2
:40 T60 kernel: [ 2801.159500] usb 1-2: USB disconnect, address 39
:40 T60 kernel: [ 2801.159783] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
:40 T60 kernel: [ 2801.159830] option 1-2:1.0: device disconnected
:40 T60 kernel: [ 2801.160115] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
:40 T60 kernel: [ 2801.160148] option 1-2:1.1: device disconnected
:40 T60 usb_modeswitch: switched to 1e0e:9200 (: )
:40 T60 kernel: [ 2801.161453] option: option_instat_callback: error -108
:40 T60 kernel: [ 2801.161599] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
:40 T60 kernel: [ 2801.161633] option 1-2:1.3: device disconnected
:40 T60 kernel: [ 2801.162242] usb 1-2: usbfs: USBDEVFS_CONTROL failed cmd usb_modeswitch rqt 128 rq 6 len 255 ret -108
:45 T60 kernel: [ 2806.164101] usb 1-2: new high speed USB device using ehci_hcd and address 40
:45 T60 kernel: [ 2806.301497] scsi38 : usb-storage 1-2:1.0


Offline Profile
PostPosted: Fri Aug 26, 2011 6:59 pm
Site AdminPosts: 4536Joined: Sat Nov 03, 2007 12:30 am
The log does not show any storage error known from other devices. So the problem may hide somewhere else.

Perhaps a log from usb_modeswitch will show more. See paragraph "Troubleshooting" on the main documentation page about how to set it up.
In addition, you have to turn off logging again during one of the switching cycles, or else the log will continuously be overwritten by each run.



Offline Profile
PostPosted: Sat Aug 27, 2011 10:20 am
Posts: 6Joined: Thu Aug 25, 2011 1:40 pm
Here is the log file. Also another observation about manual execution on modeswitch.
DisableSwitching=1 and sudo usb_modeswitch -c 1e0e:f000 make the switch happen instantly,
but sadly Network Manager does not detect any modem. AFAIK this is some kind of timing issue.
Thanks for the help so far.

USB_ModeSwitch log from Thu Aug 25 14:27:11 EEST 2011

raw args from udev: /1-2:1.0

Using global config file: /etc/usb_modeswitch.conf
Bus ID for device not given by udev.
Trying to determine it from kernel name (1-2:1.0) ...
USB dir exists: /sys/bus/usb/devices/1-2
Warning: USB attribute "serial" not found.
----------------
USB values from sysfs:
manufacturer A-Link
product A-Link
serial
----------------
Found packed config collection /usr/share/usb_modeswitch/configPack.tar.gz
Searching overriding entries named: /etc/usb_modeswitch.d/1e0e:f000*
SCSI attributes not needed, moving on
checking config: 1e0e:f000
Extracting config 1e0e:f000 from collection /usr/share/usb_modeswitch/configPack.tar.gz
! matched, now switching
(running command: /usr/sbin/usb_modeswitch -I -W -c /var/lib/usb_modeswitch/current_cfg)

Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are expected in the process)
--------------------------------
usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 005
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_devices: Found 002 on 005
usb_os_find_devices: Found 001 on 005
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 003 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 051 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device

Reading config file: /var/lib/usb_modeswitch/current_cfg

* 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= 0x1e0e
DefaultProduct= 0xf000
TargetVendor= 0x1e0e
TargetProduct= not set
TargetClass= not set
TargetProductList="9200,9000"

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
KobilMode=0
MessageEndpoint= not set
MessageContent="555342431234567800000000000006bd000000020000000000000000000000"
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 0483:2016
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 062a:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1e0e:f000
found matching vendor ID
searching devices, found USB ID 1d6b:0002
No devices in target mode or class found
Looking for default devices ...
searching devices, found USB ID 0483:2016
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 062a:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1e0e:f000
found matching vendor ID
found matching product ID
adding device
searching devices, found USB ID 1d6b:0002
Found devices in default mode, class or configuration (1)
Accessing device 051 on bus 001 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using endpoints 0x01 (out) and 0x81 (in)
Using endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: A-Link
Product: A-Link
Serial No.: not provided
-------------------------
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 ...
USB error: could not release intf 0: No such device
usb_os_find_busses: Found 005
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_devices: Found 002 on 005
usb_os_find_devices: Found 001 on 005
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 003 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 001
usb_os_find_busses: Found 005
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_devices: Found 002 on 005
usb_os_find_devices: Found 001 on 005
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 003 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 001
usb_os_find_busses: Found 005
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_devices: Found 002 on 005
usb_os_find_devices: Found 001 on 005
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 003 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 001
usb_os_find_busses: Found 005
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_devices: Found 002 on 005
usb_os_find_devices: Found 001 on 005
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 003 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 001
usb_os_find_busses: Found 005
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_devices: Found 002 on 005
usb_os_find_devices: Found 001 on 005
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 003 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 001
usb_os_find_busses: Found 005
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_devices: Found 002 on 005
usb_os_find_devices: Found 001 on 005
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 003 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 001
usb_os_find_busses: Found 005
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_devices: Found 002 on 005
usb_os_find_devices: Found 001 on 005
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 003 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 001
usb_os_find_busses: Found 005
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_devices: Found 002 on 005
usb_os_find_devices: Found 001 on 005
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 003 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 001
usb_os_find_busses: Found 005
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_devices: Found 002 on 005
usb_os_find_devices: Found 001 on 005
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 003 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 001
usb_os_find_busses: Found 005
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_devices: Found 002 on 005
usb_os_find_devices: Found 001 on 005
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 003 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 001
usb_os_find_busses: Found 005
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_devices: Found 002 on 005
usb_os_find_devices: Found 001 on 005
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 003 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 001
usb_os_find_busses: Found 005
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_devices: Found 002 on 005
usb_os_find_devices: Found 001 on 005
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 003 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 001
OK, message successfully sent
Reading the response to the message (CSW) ...
OK, response successfully read (13 bytes).
Resetting response endpoint 0x81
Resetting message endpoint 0x01
Device is gone, skipping any further commands

Checking for mode switch (max. 20 times, once per second) ...
Searching for target devices ...
searching devices, found USB ID 0483:2016
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 062a:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
searching devices, found USB ID 0483:2016
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 062a:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
searching devices, found USB ID 0483:2016
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 062a:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
searching devices, found USB ID 0483:2016
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 062a:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
searching devices, found USB ID 0483:2016
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 062a:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
searching devices, found USB ID 0483:2016
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 062a:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
searching devices, found USB ID 0483:2016
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 062a:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
searching devices, found USB ID 0483:2016
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 062a:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
searching devices, found USB ID 0483:2016
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 062a:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
searching devices, found USB ID 0483:2016
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 062a:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
searching devices, found USB ID 0483:2016
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 062a:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
seusb_os_find_busses: Found 005
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_devices: Found 002 on 005
usb_os_find_devices: Found 001 on 005
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 003 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 001
usb_os_find_busses: Found 005
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_devices: Found 002 on 005
usb_os_find_devices: Found 001 on 005
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 003 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 001
usb_os_find_busses: Found 005
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_devices: Found 002 on 005
usb_os_find_devices: Found 001 on 005
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 003 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 001
usb_os_find_busses: Found 005
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_devices: Found 002 on 005
usb_os_find_devices: Found 001 on 005
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 003 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 001
usb_os_find_busses: Found 005
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_devices: Found 002 on 005
usb_os_find_devices: Found 001 on 005
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 003 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 001
usb_os_find_busses: Found 005
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_devices: Found 002 on 005
usb_os_find_devices: Found 001 on 005
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 003 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 001
usb_os_find_busses: Found 005
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_devices: Found 002 on 005
usb_os_find_devices: Found 001 on 005
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 003 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 001
usb_os_find_busses: Found 005
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_devices: Found 002 on 005
usb_os_find_devices: Found 001 on 005
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 003 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 002
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 001
arching devices, found USB ID 0483:2016
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 062a:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
searching devices, found USB ID 0483:2016
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 062a:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
searching devices, found USB ID 0483:2016
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 062a:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
searching devices, found USB ID 0483:2016
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 062a:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
searching devices, found USB ID 0483:2016
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 062a:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
searching devices, found USB ID 0483:2016
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 062a:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
searching devices, found USB ID 0483:2016
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 062a:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
searching devices, found USB ID 0483:2016
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 062a:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
searching devices, found USB ID 0483:2016
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 062a:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
No new devices in target mode or class found

Mode switch has failed. Bye.

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

Device directory in sysfs is gone! Something went wrong, aborting


Offline Profile
PostPosted: Sat Aug 27, 2011 7:55 pm
Site AdminPosts: 4536Joined: Sat Nov 03, 2007 12:30 am
Hmm, according to the log the switched device did not appear at all, nor did the install mode device. Can it be that you unplugged it during the success checking?

If you say the switching works on the command line, does this also apply if you add the "-I" parameter to your command?

That would be the only significant difference about the automatic and the manual call of the binary program.



Offline Profile
PostPosted: Sun Aug 28, 2011 9:49 am
Posts: 6Joined: Thu Aug 25, 2011 1:40 pm
No unplugging, kept it connected all the time.

I tried also DisableSwitching=1 and sudo usb_modeswitch -I -W -c 1e0e:f000, but this gave an error as modeswitch is trying to access the wrong device (000 on bus 001). This happened only in one occasion. Tried it further and found this command also working! After manual operations it is possible to make a connection with Gnome PPP.

Also, I did some research of lsusb. Using watch --interval=1 lsusb has too slow interval for observations. By giving the command manually I get about half a second interval. This reveals that 9200 actually appears on the list but modeswitch has no time to react to it -> 9200 not seen in the log file.
(Actully seen once, but modeswitch ignored it for some reason.)

So, the conclusion is that using modeswitch works when operated manually but in the auto mode the device gets a reset shortly after it appears
as a modem. Is there anything I can still try? Can I play around reset somehow?


Offline Profile
PostPosted: Tue Aug 30, 2011 7:56 pm
Site AdminPosts: 4536Joined: Sat Nov 03, 2007 12:30 am
I have no idea what is going on here.

There is no difference in the way you called usb_modeswitch manually and the automatic way ...

Sometimes, the timing of actions is relevant though.

There are two parameters for the automatic flow of action influencing this:

1. WaitBefore=<seconds>

2. ReleaseDelay=<milliseconds>

The first will wait after the plug-in/discovery of the device before initiating the switching command.

The second will add a period of time after the switching command in which the device (or rather the first interface) is not 'released', preventing the system from interacting with it.

You can play around with the first parameter, setting it to 10 or more; in case of success try to lower it until the reset problem comes up again.
The second parameter is less likely to be effective; there are some devices that will not switch properly if this is not given, but your problem is different, I think.



Offline Profile
PostPosted: Wed Aug 31, 2011 9:10 am
Posts: 6Joined: Thu Aug 25, 2011 1:40 pm
Got it working with the script below. Looks that modeswitch needs to disabled and the only thing that needs to be done is a right kind of eject.
Could be that A-link has made some firmware changes that prevent modeswitch from working.

Thanks for all the help.


#!/bin/bash
#
# TS 30.08.2010
#
# Changes A-link 3GU from USB storage to USB modem after hot plugin.
#
# Tested with:
# Linux Mint 11 # 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 i686 i686 i386 GNU/Linux
#
#
# Notes:
#
# - DisableSwitching=1 @ /etc/usb_modeswitch.conf
# (cold plugin stops working!)
#
# - sr<NUM> depends on system's configuration:
# find NUM by giving ls /dev/sr* before and after
# plugin of the device and modify this script
#
# - there could be differences in A-link firmware versions

if grep -q "DisableSwitching=0" /etc/usb_modeswitch.conf
then
echo
echo "...Set DisableSwitching=1 /etc/usb_modeswitch.conf first and read notes!"
echo
elif lsusb -d 1e0e:9200 | grep -q "1e0e:9200"
then
echo
echo "...Device should be already ok"
echo
elif lsusb -d 1e0e:f000 | grep -q "1e0e:f000"
then
echo
echo "...Ejecting USB device [eject -s /dev/sr1]."
echo
eject -s /dev/sr1
##sudo rmmod usbserial
sleep 1
echo "...You should see 1e0e:9200 if device switched to modem..."
echo
lsusb -d 1e0e:9200
##sudo modprobe usbserial vendor=0x1e0e product=0x9200
echo
echo "...Now you should see /dev/ttyUSB*..."
echo
ls -la /dev/ttyUSB*
echo
echo "...Try Gnome PPP (if success) if Network Manager does not see any modem."
echo
else
echo
echo "...Plugin your A-link and re-try."
echo
fi

echo "...Press enter to continue."
read


Offline Profile
PostPosted: Wed Aug 31, 2011 8:52 pm
Site AdminPosts: 4536Joined: Sat Nov 03, 2007 12:30 am
TxSx wrote:
Could be that A-link has made some firmware changes that prevent modeswitch from working.
But it did work, didn't it?

The problem is only showing with the automatic method. Besides, the commands sent by usb_modeswitch are in fact the very same ones that "eject" is using.

So, did you try with the "WaitBefore" parameter?



Offline Profile
PostPosted: Thu Sep 01, 2011 11:44 am
Posts: 6Joined: Thu Aug 25, 2011 1:40 pm
Josh wrote:
TxSx wrote:
Could be that A-link has made some firmware changes that prevent modeswitch from working.
But it did work, didn't it?

The problem is only showing with the automatic method. Besides, the commands sent by usb_modeswitch are in fact the very same ones that "eject" is using.

So, did you try with the "WaitBefore" parameter?




Sorry if giving confusing information. Yes, only automatic mode is having trouble. I tried delays and they did not get automatic methods working.

The answer could be in the log files, but I don't know what to look for...


Offline Profile

Display posts from previous:  Sort by:

All times are UTC + 1 hour [ DST ]
Page 1 of 1
11 posts
Users browsing this forum: No registered users and 1 guest
Search for:
Post new topic  Reply to topic
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