Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
alirio
Posts: 4
Joined: 15 Feb 2010, 20:43

ZTE MF110 working manually but not automated with v1.1.0

Post by alirio » 15 Feb 2010, 22:28

Hello all,

I am running a ZTE MF110 GSM-Modem on a ASUS EeePC1000H under Ubuntu Netbook Remix (9.10 / Karmic Koala).

Using the latest version usb_modeswitch (1.1.0) I could get my modem switched and use it with wvdial to connect, but only manually by passing all parameters through the command line.

Non of the usb_modeswitch udev mechanism seems to work. I would like to automate this process to the point where I olny have to plug in the modem when I want to go online. Furthermore the modem driver seems to hang when I unplug and replug the modem, I allways have to reboot to get the modem working again.

This is my dmesg when pluging in the modem after having booted:

Code: Select all

[  401.364111] usb 1-3: new high speed USB device using ehci_hcd and address 4
[  401.509605] usb 1-3: configuration #1 chosen from 1 choice
[  402.656633] Initializing USB Mass Storage driver...
[  402.657674] scsi2 : SCSI emulation for USB Mass Storage devices
[  402.658883] usbcore: registered new interface driver usb-storage
[  402.658897] USB Mass Storage support registered.
[  402.659166] usb-storage: device found at 4
[  402.659174] usb-storage: waiting for device to settle before scanning
[  403.681164] ===>rt_ioctl_giwscan. 7(7) BSS returned, data->length = 735
[  407.657590] usb-storage: device scan complete
My lsusb corresponding to the modem when plugged in:

Code: Select all

Bus 001 Device 004: ID 19d2:2000 ONDA Communication S.p.A. 
To switch my modem I have to message string options that work well (differencies are marked with ^, but no idea what it does...):

Code: Select all

usb_modeswitch -W -s 20 -v 0x19d2 -p 0x2000 -V 0x19d2 -P 0x0031 -m 0x01 -M "55534243f8f993882000000080000a85010101180101010101000000000000"
         ^^^^^^^^

usb_modeswitch -W -s 20 -v 0x19d2 -p 0x2000 -V 0x19d2 -P 0x0031 -m 0x01 -M "55534243b0c8dc812000000080000a85010101180101010101000000000000"
         ^^^^^^^^
What should I do? Create a new usb_modeswitch.d rule for 19d2:2000? Is there an naming convetion to this rules? Is this all I have to do?

Thanks for your answer.
Alirio

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

Post by Josh » 15 Feb 2010, 23:22

As a first step, turn on logging as described on the documentation page in "Troubleshooting". See if any logs are created in /var/log.

Do you have "tcl" installed?

Regarding the differences in the MessageStrings you posted:
These bytes are just a kind of marker for the command; if you send a message you can use any value. In all my configs I use "12345678" to show that it's unimportant.


alirio
Posts: 4
Joined: 15 Feb 2010, 20:43

Post by alirio » 15 Feb 2010, 23:41

Hello Josh,

I set logging to 1 as you told me. The resulting .log file showed this:

Code: Select all


USB_ModeSwitch log from Mon Feb 15 16:29:40 CET 2010

raw args from udev: /1-3:1.0
Bus ID for device not given by udev.
 Trying to determine it from kernel name (1-3:1.0) ...
USB dir exists: /sys/bus/usb/devices/1-3
----------------
USB values from sysfs:
  manufacturer	ZTE,Incorporated
  product	ZTE WCDMA Technologies MSM
  serial	P671A2MOVD010000
----------------
SCSI attributes not needed, moving on
checking config: /etc/usb_modeswitch.d/19d2:2000:uPr=ZTE_CDMA
matching usb(product)
  match string: ZTE CDMA
 device string: ZTE WCDMA Technologies MSM
* no match, not switching with this config
checking config: /etc/usb_modeswitch.d/19d2:2000:uPr=USB_ZTE
matching usb(product)
  match string: USB ZTE
 device string: ZTE WCDMA Technologies MSM
* no match, not switching with this config
checking config: /etc/usb_modeswitch.d/19d2:2000
! matched, now switching
 (running command: /usr/sbin/usb_modeswitch -I -W -c /etc/usb_modeswitch.d/19d2:2000)

verbose output of usb_modeswitch:
--------------------------------
usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 003
usb_os_find_busses: Found 005
usb_os_find_busses: Found 001
usb_os_find_busses: Found 004
usb_os_find_busses: Found 002
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 004 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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 error: could not get bound driver: No data available
Reading config file: /etc/usb_modeswitch.d/19d2:2000

 * usb-modeswitch: handle USB devices with multiple modes
 * Version 1.1.0 (C) Josua Dietze 2010
 * Based on libusb 0.1.12

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x19d2
DefaultProduct= 0x2000
TargetVendor=   0x19d2
TargetProduct=  0x0015
TargetClass=    not set

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
MessageEndpoint= not set
MessageContent="5553424312345678000000000000061b000000030000000000000000000000"
NeedResponse=0
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 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 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 19d2:2000
   found matching vendor ID
   found matching product ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 Found default devices (1)
Accessing device 004 on bus 001 ...

USB description data (for identification)
-------------------------
Manufacturer: ZTE,Incorporated
     Product: ZTE WCDMA Technologies MSM
  Serial No.: P671A2MOVD010000
-------------------------
Looking for active driver ...
 No driver found. Either detached before or never attached
Setting up communication with interface 0 ...
Trying to send the message to endpoint 0x01 ...
Check that you have permissions to write to 001/004 and, if you don't, that you set up hotplug (http://linux-hotplug.sourceforge.net/) correctly.
USB error: could not claim interface 0: Device or resource busy
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 004 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 004 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 004 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 004 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 004 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 004 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 004 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 004 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 004 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 004 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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
 OK, message successfully sent

Checking for mode switch (max. 20 times, once per second) ...
 Waiting for original device to vanish ...
 Original device can't be accessed anymore. Good.
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:2000
   found matchingusb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 004 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 004 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 004 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 004 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 004 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 004 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 004 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 004 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 004 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 004 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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
 vendor ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 No new devices in target mode or class found

Mode switch has failed. Bye.

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


All done, exiting
Best regards
Alirio

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

Post by Josh » 15 Feb 2010, 23:49

There we have it: switching went fine, but target was not recognized.

You need to use the latest "usb-modeswitch-data" package; again see the documentation page, paragraph "Download".

alirio
Posts: 4
Joined: 15 Feb 2010, 20:43

Post by alirio » 16 Feb 2010, 00:22

Hello Josh,

I updated to the latest "usb-modeswitch-data" package. But the modem did not work with it:

Code: Select all

USB_ModeSwitch log from Mon Feb 15 16:59:54 COT 2010

raw args from udev: /1-3:1.0
Bus ID for device not given by udev.
 Trying to determine it from kernel name (1-3:1.0) ...
USB dir exists: /sys/bus/usb/devices/1-3
----------------
USB values from sysfs:
  manufacturer	ZTE,Incorporated
  product	ZTE WCDMA Technologies MSM
  serial	P671A2MOVD010000
----------------
SCSI attributes not needed, moving on
checking config: /etc/usb_modeswitch.d/19d2:2000:uPr=ZTE_CDMA
matching usb(product)
  match string: ZTE CDMA
 device string: ZTE WCDMA Technologies MSM
* no match, not switching with this config
checking config: /etc/usb_modeswitch.d/19d2:2000:uPr=USB_ZTE
matching usb(product)
  match string: USB ZTE
 device string: ZTE WCDMA Technologies MSM
* no match, not switching with this config
checking config: /etc/usb_modeswitch.d/19d2:2000
! matched, now switching
 (running command: /usr/sbin/usb_modeswitch -I -W -c /etc/usb_modeswitch.d/19d2:2000)

verbose output of usb_modeswitch:
--------------------------------
usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 003
usb_os_find_busses: Found 005
usb_os_find_busses: Found 001
usb_os_find_busses: Found 004
usb_os_find_busses: Found 002
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 010 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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
Reading config file: /etc/usb_modeswitch.d/19d2:2000

 * usb-modeswitch: handle USB devices with multiple modes
 * Version 1.1.0 (C) Josua Dietze 2010
 * Based on libusb 0.1.12

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x19d2
DefaultProduct= 0x2000
TargetVendor=   0x19d2
TargetProduct=  not set
TargetProductList=0001,0002,0015,0031,0037,0052,0055,0063
TargetClass=    not set

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
MessageEndpoint= not set
MessageContent="5553424312345678000000000000061b000000030000000000000000000000"
NeedResponse=0
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 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 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 19d2:2000
   found matching vendor ID
   found matching product ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 Found default devices (1)
Accessing device 010 on bus 001 ...

USB description data (for identification)
-------------------------
Manufacturer: ZTE,Incorporated
     Product: ZTE WCDMA Technologies MSM
  Serial No.: P671A2MOVD010000
-------------------------
Looking for active driver ...
 OK, driver found ("usb-storage")
 OK, driver "usb-storage" detached
Setting up communication with interface 0 ...
Trying to send the message to endpoint 0x01 ...
 OK, message successfully sent

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.

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


All done, exiting
As a try I generated a rule file called "19d2:2000:uPr=ZTE_WCDMA" within /etc/usb_modeswitch.d/ and edited TargetProduct to equal 0x0031 and the MessageContent to "55534243123456782000000080000a85010101180101010101000000000000"

When replugging the gsm modem the .log entry stated success:

Code: Select all

USB_ModeSwitch log from Mon Feb 15 17:08:23 COT 2010

raw args from udev: /1-3:1.0
Bus ID for device not given by udev.
 Trying to determine it from kernel name (1-3:1.0) ...
USB dir exists: /sys/bus/usb/devices/1-3
----------------
USB values from sysfs:
  manufacturer	ZTE,Incorporated
  product	ZTE WCDMA Technologies MSM
  serial	P671A2MOVD010000
----------------
SCSI attributes not needed, moving on
checking config: /etc/usb_modeswitch.d/19d2:2000:uPr=ZTE_WCDMA
matching usb(product)
  match string: ZTE WCDMA
 device string: ZTE WCDMA Technologies MSM
! matched, now switching
 (running command: /usr/sbin/usb_modeswitch -I -W -c /etc/usb_modeswitch.d/19d2:2000:uPr=ZTE_WCDMA)

verbose output of usb_modeswitch:
--------------------------------
usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 003
usb_os_find_busses: Found 005
usb_os_find_busses: Found 001
usb_os_find_busses: Found 004
usb_os_find_busses: Found 002
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 011 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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
Reading config file: /etc/usb_modeswitch.d/19d2:2000:uPr=ZTE_WCDMA

 * usb-modeswitch: handle USB devices with multiple modes
 * Version 1.1.0 (C) Josua Dietze 2010
 * Based on libusb 0.1.12

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x19d2
DefaultProduct= 0x2000
TargetVendor=   0x19d2
TargetProduct=  0x0031
TargetClass=    not set

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
MessageEndpoint= not set
MessageContent="55534243123456782000000080000a85010101180101010101000000000000"
NeedResponse=0
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 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 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 19d2:2000
   found matching vendor ID
   found matching product ID
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 Found default devices (1)
Accessing device 011 on bus 001 ...

USB description data (for identification)
-------------------------
Manufacturer: ZTE,Incorporated
     Product: ZTE WCDMA Technologies MSM
  Serial No.: P671A2MOVD010000
-------------------------
Looking for active driver ...
 OK, driver found ("usb-storage")
 OK, driver "usb-storage" detached
Setting up communication with interface 0 ...
Trying to send the message to endpoint 0x01 ...
USB error: could not claim interface 0: No such device
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Couldn't open /dev/bus/usb/001/011
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 012 on 001
usb_os_find_devices: Found 003 on 001
skipping descriptor 0xB
skipped 1 class/vendor specific endpoint descriptors
skipped 6 class/vendor specific interface descriptors
skipping descriptor 0x25
skipped 1 class/vendor specific endpoint descriptors
skipped 11 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 002 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 error: error sending control message: Connection timed out
Error: could not get description string "manufacturer"
USB error: error sending control message: Connection timed out
Error: could not get description string "product"
USB error: error sending control message: Connection timed out
Error: could not get description string "serial number"
 OK, message successfully sent

Checking for mode switch (max. 20 times, once per second) ...
 Waiting for original device to vanish ...
 Waiting for original device to vanish ...
 Original device can't be accessed anymore. Good.
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 04f2:b071
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 046d:c016
  searching devices, found USB ID 1d6b:0001
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 1d6b:0001
  searching devices, found USB ID 19d2:0031
   found matching vendor ID
   found matching product ID

Found target device 012 on bus 001

Target device description data
-------------------------
Manufacturer: 
     Product: 
  Serial No.: 
-------------------------
 Found correct target device

Mode switch succeeded. Bye.

ok:19d2:0031
--------------------------------
(end of usb_modeswitch output)

Now checking for newly created serial devices ...
 new serial devices found, driver has bound

All done, exiting
Now this seems to work now, also Networkmanager is working fine with this, no need for manual wvdial anymore! Thank you very much!

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

Post by Josh » 16 Feb 2010, 01:10

Well, you did what I would have proposed as the next step. Splendid!

I will adapt the data package and release the new one.

Thanks!

Post Reply