| |
Automatic Activation, Hotplug and UDEV, Configuration
-
vitek
- Posts: 4
- Joined: 29 Aug 2011, 05:56
Post
by vitek » 31 Aug 2011, 05:30
I'm trying to set up a ZTE MF112 module (as written on the modem case) in CentOS 5.6 installation. I use the latest usb_modeswitch (1.1.9 currently).
Here is a default output of lsusb -v when modem just plugged in:
Code: Select all Bus 001 Device 013: ID 19d2:2000 ONDA Communication S.p.A. ZTE MF627/MF628/MF628+/MF636+ HSDPA/HSUPA
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x19d2 ONDA Communication S.p.A.
idProduct 0x2000 ZTE MF627/MF628/MF628+/MF636+ HSDPA/HSUPA
bcdDevice 0.00
iManufacturer 3 ZTE,Incorporated
iProduct 2 ZTE WCDMA Technologies MSM
iSerial 4 MF1800MTSD010000
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 1 ZTE Configuration
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk (Zip)
iInterface 0
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 0
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 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
I've read the Troubleshooting section of docs a lot of times, so my udev config is already in /etc/udev/rules.d/, all the ATTR and ATTRS replaced with SYSFS, and so on. Rules were reloaded with 'udevcontrol reload_rules'.
When running usb_modeswitch manually i get the following:
Code: Select all [root@lisa rules.d]# usb_modeswitch -c /etc/usb_modeswitch.d/19d2\:2000
Looking for target devices ...
No devices in target mode or class found
Looking for default devices ...
Found devices in default mode, class or configuration (1)
Accessing device 013 on bus 001 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found ("usb-storage")
OK, driver "usb-storage" detached
SCSI inquiry data (for identification)
-------------------------
Vendor String: ZTE
Model String: USB SCSI CD-ROM
Revision String: 2.31
-------------------------
USB description data (for identification)
-------------------------
Manufacturer: ZTE,Incorporated
Product: ZTE WCDMA Technologies MSM
Serial No.: MF1800MTSD010000
-------------------------
Setting up communication with interface 0
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Reading the response to message 1 (CSW) ...
OK, response successfully read (13 bytes).
Trying to send message 2 to endpoint 0x01 ...
OK, message successfully sent
Reading the response to message 2 (CSW) ...
OK, response successfully read (13 bytes).
Trying to send message 3 to endpoint 0x01 ...
OK, message successfully sent
Reading the response to message 3 (CSW) ...
OK, response successfully read (0 bytes).
Resetting response endpoint 0x81
Resetting message endpoint 0x01
Checking for mode switch (max. 20 times, once per second) ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
No new devices in target mode or class found
Mode switch has failed. Bye.
What are my next steps to resolve a problem?
-
Josh
- Site Admin
- Posts: 6593
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 31 Aug 2011, 07:59
What does "lsusb" say after running the command ?
-
vitek
- Posts: 4
- Joined: 29 Aug 2011, 05:56
Post
by vitek » 31 Aug 2011, 08:25
Bus 001 Device 014: ID 19d2:2003 ONDA Communication S.p.A.
-
Josh
- Site Admin
- Posts: 6593
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 31 Aug 2011, 21:17
Well, that is proof that the mode switch has in fact worked as expected.
But "2003" is missing in the config file's "TargetProductList". If you add it by editing the file, everything should be fine. The automatic switching will load the necessary driver to provide the ttyUSB ports.
-
vitek
- Posts: 4
- Joined: 29 Aug 2011, 05:56
Post
by vitek » 01 Sep 2011, 04:26
Now when running usb_modeswitch manually, it is saying the switching succeed, but there are still no any ttyUSB* in /dev
And here is a log file which created automatically when plugging the modem (so I know udev is trying to do something):
Code: Select all USB_ModeSwitch log from Thu Sep 01 09:26:03 NOVST 2011
Raw args from udev: /1-4: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-4:1.0) ...
----------------
USB values from sysfs:
manufacturer ZTE,Incorporated
product ZTE WCDMA Technologies MSM
serial MF1800MTSD010000
----------------
bNumConfigurations is 1 - don't check for active configuration
SCSI attributes not needed, moving on
checking config: /etc/usb_modeswitch.d/19d2:2000
Using config file from override folder /etc/usb_modeswitch.d
! matched, now switching
(running command: /usr/sbin/usb_modeswitch -I -W -c /etc/usb_modeswitch.d/19d2:2000)
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 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 005
usb_os_find_busses: Found 001
usb_os_find_busses: Found 002
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 001 on 001
usb_os_find_devices: Found 001 on 002
Reading config file: /etc/usb_modeswitch.d/19d2:2000
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.1.9 (C) Josua Dietze 2011
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x19d2
DefaultProduct= 0x2000
TargetVendor= 0x19d2
TargetProduct= not set
TargetClass= not set
TargetProductList="0001,0002,0015,0016,0017,0031,0037,0052,0055,0063,0064,0066,0091,0108,0117,0128,2002,2003"
DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint= not set
MessageContent="5553424312345678000000000000061e000000000000000000000000000000"
MessageContent2="5553424312345679000000000000061b000000020000000000000000000000"
MessageContent3="55534243123456702000000080000c85010101180101010101000000000000"
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 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
No devices in target mode or class found
Looking for default devices ...
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
No devices in default mode found. Nothing to do. Bye.
--------------------------------
(end of usb_modeswitch output)
All done, exiting
-
Josh
- Site Admin
- Posts: 6593
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 01 Sep 2011, 08:07
The driver will only be activated by the udev dispatcher during the automatic switching. A manual run of usb_modeswitch will just do the mode switching and nothing else.
Your next problem ist this:
"searching devices, found USB ID 0000:0000" ...
There seems to be a problem on your system that shows only during the automatic run. Please try your manual command again, but add the "-W" parameter this time.
-
vitek
- Posts: 4
- Joined: 29 Aug 2011, 05:56
Post
by vitek » 01 Sep 2011, 08:19
Code: Select all [root@lisa log]# usb_modeswitch -W -c /etc/usb_modeswitch.d/19d2\:2000
Reading config file: /etc/usb_modeswitch.d/19d2:2000
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.1.9 (C) Josua Dietze 2011
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x19d2
DefaultProduct= 0x2000
TargetVendor= 0x19d2
TargetProduct= not set
TargetClass= not set
TargetProductList="0001,0002,0015,0016,0017,0031,0037,0052,0055,0063,0064,0066,0091,0108,0117,0128,2002,2003"
DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint= not set
MessageContent="5553424312345678000000000000061e000000000000000000000000000000"
MessageContent2="5553424312345679000000000000061b000000020000000000000000000000"
MessageContent3="55534243123456702000000080000c85010101180101010101000000000000"
NeedResponse=1
ResponseEndpoint= not set
Interface=0x00
InquireDevice enabled (default)
Success check enabled, max. wait time 20 seconds
System integration mode disabled
usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 005
usb_os_find_busses: Found 001
usb_os_find_busses: Found 002
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 019 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 002
Looking for target devices ...
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 19d2:2000
found matching vendor ID
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
No devices in target mode or class found
Looking for default devices ...
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 19d2:2000
found matching vendor ID
found matching product ID
adding device
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
Found devices in default mode, class or configuration (1)
Accessing device 019 on bus 001 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found ("usb-storage")
OK, driver "usb-storage" detached
SCSI inquiry data (for identification)
-------------------------
Vendor String: ZTE
Model String: USB SCSI CD-ROM
Revision String: 2.31
-------------------------
USB description data (for identification)
-------------------------
Manufacturer: ZTE,Incorporated
Product: ZTE WCDMA Technologies MSM
Serial No.: MF1800MTSD010000
-------------------------
Setting up communication with interface 0
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Reading the response to message 1 (CSW) ...
OK, response successfully read (13 bytes).
Trying to send message 2 to endpoint 0x01 ...
OK, message successfully sent
Reading the response to message 2 (CSW) ...
OK, response successfully read (13 bytes).
Trying to send message 3 to endpoint 0x01 ...
OK, message successfully sent
Reading the response to message 3 (CSW) ...
OK, response successfully read (0 bytes).
Resetting response endpoint 0x81
Resetting message endpoint 0x01
Checking for mode switch (max. 20 times, once per second) ...
Searching for target devices ...
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 005
usb_os_find_busses: Found 001
usb_os_find_busses: Found 002
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 019 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 002
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 19d2:2000
found matching vendor ID
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
Searching for target devices ...
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 005
usb_os_find_busses: Found 001
usb_os_find_busses: Found 002
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 019 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 002
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 19d2:2000
found matching vendor ID
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
Searching for target devices ...
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 005
usb_os_find_busses: Found 001
usb_os_find_busses: Found 002
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 019 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 002
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 19d2:2000
found matching vendor ID
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
Searching for target devices ...
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 005
usb_os_find_busses: Found 001
usb_os_find_busses: Found 002
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 019 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 002
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 19d2:2000
found matching vendor ID
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
Searching for target devices ...
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 005
usb_os_find_busses: Found 001
usb_os_find_busses: Found 002
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 001 on 001
usb_os_find_devices: Found 001 on 002
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
Searching for target devices ...
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 005
usb_os_find_busses: Found 001
usb_os_find_busses: Found 002
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 001 on 001
usb_os_find_devices: Found 001 on 002
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
Searching for target devices ...
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 005
usb_os_find_busses: Found 001
usb_os_find_busses: Found 002
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 001 on 001
usb_os_find_devices: Found 001 on 002
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
Searching for target devices ...
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 005
usb_os_find_busses: Found 001
usb_os_find_busses: Found 002
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 001 on 001
usb_os_find_devices: Found 001 on 002
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
Searching for target devices ...
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 005
usb_os_find_busses: Found 001
usb_os_find_busses: Found 002
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 001 on 001
usb_os_find_devices: Found 001 on 002
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
Searching for target devices ...
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 005
usb_os_find_busses: Found 001
usb_os_find_busses: Found 002
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 001 on 001
usb_os_find_devices: Found 001 on 002
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
Searching for target devices ...
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 005
usb_os_find_busses: Found 001
usb_os_find_busses: Found 002
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 020 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 002
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
searching devices, found USB ID 19d2:2003
found matching vendor ID
found matching product ID from list
searching devices, found USB ID 0000:0000
searching devices, found USB ID 0000:0000
Found target device, now opening
Found target device 020 on bus 001
Target device description data
-------------------------
Manufacturer: ZTE,Incorporated
Product: ZTE WCDMA Technologies MSM
Serial No.: not provided
-------------------------
Found correct target device
Mode switch succeeded. Bye.
-
Josh
- Site Admin
- Posts: 6593
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 01 Sep 2011, 17:59
Can it be that your kernel is really old?
There was a short sequence of kernel versions that treated this device ID (19d2:2000) in a special way. If you can find this ID in the file "unusual_devs.h" in the kernel source folder "drivers/usb/storage", then this may affect the behaviour of your device.
Annother possibility is that some other udev rule is trying to take care of the ID in addition to usb_modeswitch. Try "grep 19d2" in "/lib/udev/rules.d" and "/etc/udev/rules.d".
|
|