| |
Automatic Activation, Hotplug and UDEV, Configuration
-
slonik
- Posts: 7
- Joined: 02 Sep 2011, 12:18
Post
by slonik » 02 Sep 2011, 13:13
Hi,
I am new to usb_modeswitch, I'm trying to setup a busybox system that will boot up and establish a PPP over my 3G USB modem (1c9e:6061).
So my first problem is that although /sys/bus/usb/devices is correctly populated and sees the USB modem, I have nothing in /proc/bus/usb (or /dev/bus/usb but I have no udev/mdev so not surprising).
So when I strace usb_modeswitch I see it cant get the data to start its job.
Relevant part of my dmesg:
Code: Select all usbmon: debugfs is not available
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci_hcd 0000:00:0b.1: EHCI Host Controller
ehci_hcd 0000:00:0b.1: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:0b.1: irq 9, io mem 0x08021000
ehci_hcd 0000:00:0b.1: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci_hcd 0000:00:0b.0: OHCI Host Controller
ohci_hcd 0000:00:0b.0: new USB bus registered, assigned bus number 2
ohci_hcd 0000:00:0b.0: irq 5, io mem 0x08020000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver ums-freecom
usbcore: registered new interface driver ums-isd200
usbcore: registered new interface driver usbserial
usbserial: USB Serial Driver core
USB Serial support registered for GSM modem (1-port)
usbcore: registered new interface driver option
option: v0.7.2:USB Driver for GSM modems
USB Serial support registered for Qualcomm USB modem
usbcore: registered new interface driver qcserial
PNP: No PS/2 controller found. Probing ports directly.
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mice: PS/2 mouse device common for all mice
input: PC Speaker as /class/input/input0
rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0
rtc0: alarms up to one day, 114 bytes nvram
input: AT Translated Set 2 keyboard as /class/input/input1
usbcore: registered new interface driver snd-usb-audio
ALSA device list:
No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
rtc_cmos rtc_cmos: setting system clock to 2001-09-02 11:39:22 UTC (999430762)
VFS: Mounted root (ext2 filesystem) readonly on device 3:2.
Freeing unused kernel memory: 260k freed
usb 1-2: new high speed USB device using ehci_hcd and address 2
scsi0 : usb-storage 1-2:1.0
scsi 0:0:0:0: Direct-Access HSDPA MMC Storage 2.31 PQ: 0 ANSI: 2
sd 0:0:0:0: [sda] Attached SCSI removable disk
Any help would be much appreciated!
Dan
P.S when I try it on a Debian system it works fine and detects it etc
Last edited by slonik on 02 Sep 2011, 16:23, edited 1 time in total.
-
slonik
- Posts: 7
- Joined: 02 Sep 2011, 12:18
Post
by slonik » 02 Sep 2011, 14:05
extra info: lsusb returns nothing, but the -t shows a device...
Code: Select all [root@TESTPS]:~ # lsusb -v
[root@TESTPS]:~ # lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/2p, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/2p, 480M
|__ Port 2: Dev 2, If 0, Class=stor., Driver=usb-storage, 480M
[root@TESTPS]:~ #
-
slonik
- Posts: 7
- Joined: 02 Sep 2011, 12:18
Post
by slonik » 02 Sep 2011, 14:41
OK, I solved that, needed usbfs to populate /proc/bus/usb, so just added the following to my fstab:
Code: Select all usbfs /proc/bus/usb usbfs defaults 0 0
so now I do:
Code: Select all [root@TESTPS]:~ # mknod /dev/ttyUSB0 c 188 0
[root@TESTPS]:~ # usb_modeswitch -v 1c9e -p 6061
Looking for default devices ...
Found devices in default mode or class (1)
Accessing device 002 on bus 001 ...
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: HSDPA
Model String: MMC Storage
Revision String: 2.31
-------------------------
USB description data (for identification)
-------------------------
Manufacturer: Qualcomm, Incorporated
Product: Qualcomm CDMA Technologies MSM
Serial No.: 000000000002
-------------------------
Warning: no switching method given.
-> Run lsusb to note any changes. Bye.
[root@TESTPS]:~ # echo "1c9e 6061" >/sys/bus/usb-serial/drivers/option1/new_id
In my dmesg I then see:
Code: Select all option 1-2:1.0: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0
But then when I try to talk to the modem with nanocom at 115200, I get no response?
Thanks for any help
-
Josh
- Site Admin
- Posts: 6593
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 03 Sep 2011, 08:41
This should give you a hint: Code: Select all Warning: no switching method given.
Have a look into the config file for your device to retrieve the specific parameters.
-
slonik
- Posts: 7
- Joined: 02 Sep 2011, 12:18
Post
by slonik » 03 Sep 2011, 17:49
Thanks, so I tried the 1c9e:6061 config file from the 20110805 data
so now I get:
Code: Select all [root@TESTPS]:~ # usb_modeswitch -W -c /usb-modeswitch-data-20110805/usb_modeswitch.d/1c9e\:6061
Reading config file: /usb-modeswitch-data-20110805/usb_modeswitch.d/1c9e:6061
* usb-modeswitch: handle USB devices with multiple modes
* Version 1.1.1 (C) Josua Dietze 2010
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x1c9e
DefaultProduct= 0x6061
TargetVendor= not set
TargetProduct= not set
TargetClass= 0xff
DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
MessageEndpoint= not set
MessageContent="55534243123456780000000000000606f50402527000000000000000000000"
NeedResponse=0
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 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
Looking for target devices ...
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
found matching vendor ID
found matching product ID
target class ff not matching
searching devices, found USB ID 1d6b:0002
No devices in target mode or class found
Looking for default devices ...
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
found matching vendor ID
found matching product ID
target class ff not matching
adding device as default
searching devices, found USB ID 1d6b:0002
Found devices in default mode or class (1)
Accessing device 002 on bus 001 ...
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: HSDPA
Model String: MMC Storage
Revision String: 2.31
-------------------------
USB description data (for identification)
-------------------------
Manufacturer: Qualcomm, Incorporated
Product: Qualcomm CDMA Technologies MSM
Serial No.: 000000000002
-------------------------
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.
[root@TESTPS]:~ #
The device is a LM003 from here:
http://www.lm-technologies.com/business ... ked_Modem/ is this a new configuration? I think they have been on the market for some time and claim to work in Ubuntu..
Thanks for any help
Dan
-
Josh
- Site Admin
- Posts: 6593
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 03 Sep 2011, 18:03
Can you use a more recent version of usb_modeswitch ? Like 1.1.9 ?
There were a number of fixes since 1.1.1.
-
slonik
- Posts: 7
- Joined: 02 Sep 2011, 12:18
Post
by slonik » 05 Sep 2011, 11:46
Thanks Josh,
OK now I get:
Code: Select all [root@TESTPS]:~ # usb_modeswitch -W -c /usb-modeswitch-data-20110805/usb_modeswitch.d/1c9e\:6061
Reading config file: /usb-modeswitch-data-20110805/usb_modeswitch.d/1c9e:6061
* 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= 0x1c9e
DefaultProduct= 0x6061
TargetVendor= not set
TargetProduct= not set
TargetClass= 0xff
TargetProductList=""
DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint= not set
MessageContent="55534243123456780000000000000606f50402527000000000000000000000"
NeedResponse=0
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 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
Looking for target devices ...
No devices in target mode or class found
Looking for default devices ...
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
found matching vendor ID
found matching product ID
target class ff not matching
adding device
searching devices, found USB ID 1d6b:0002
Found devices in default mode, class or configuration (1)
Accessing device 002 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: HSDPA
Model String: MMC Storage
Revision String: 2.31
-------------------------
USB description data (for identification)
-------------------------
Manufacturer: Qualcomm, Incorporated
Product: Qualcomm CDMA Technologies MSM
Serial No.: 000000000002
-------------------------
Setting up communication with interface 0
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
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 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
found matching vendor ID
found matching product ID
target class ff not matching
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
found matching vendor ID
found matching product ID
target class ff not matching
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
found matching vendor ID
found matching product ID
target class ff not matching
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
found matching vendor ID
found matching product ID
target class ff not matching
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
found matching vendor ID
found matching product ID
target class ff not matching
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
found matching vendor ID
found matching product ID
target class ff not matching
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
found matching vendor ID
found matching product ID
target class ff not matching
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
found matching vendor ID
found matching product ID
target class ff not matching
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
found matching vendor ID
found matching product ID
target class ff not matching
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
found matching vendor ID
found matching product ID
target class ff not matching
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
found matching vendor ID
found matching product ID
target class ff not matching
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
found matching vendor ID
found matching product ID
target class ff not matching
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
found matching vendor ID
found matching product ID
target class ff not matching
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
found matching vendor ID
found matching product ID
target class ff not matching
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
found matching vendor ID
found matching product ID
target class ff not matching
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
found matching vendor ID
found matching product ID
target class ff not matching
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
found matching vendor ID
found matching product ID
target class ff not matching
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
found matching vendor ID
found matching product ID
target class ff not matching
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
found matching vendor ID
found matching product ID
target class ff not matching
searching devices, found USB ID 1d6b:0002
Searching for target devices ...
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
found matching vendor ID
found matching product ID
target class ff not matching
searching devices, found USB ID 1d6b:0002
No new devices in target mode or class found
Mode switch has failed. Bye.
I tried taking the target=0xFF away and got:
Code: Select all [root@TESTPS]:~ # usb_modeswitch -W -c /usb-modeswitch-data-20110805/usb_modeswitch.d/dan3g
Reading config file: /usb-modeswitch-data-20110805/usb_modeswitch.d/dan3g
* 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= 0x1c9e
DefaultProduct= 0x6061
TargetVendor= not set
TargetProduct= not set
TargetClass= not set
TargetProductList=""
DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint= not set
MessageContent="55534243123456780000000000000606f50402527000000000000000000000"
NeedResponse=0
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 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
Note: target parameter missing; success check limited
Looking for default devices ...
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1c9e:6061
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 002 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: HSDPA
Model String: MMC Storage
Revision String: 2.31
-------------------------
USB description data (for identification)
-------------------------
Manufacturer: Qualcomm, Incorporated
Product: Qualcomm CDMA Technologies MSM
Serial No.: 000000000002
-------------------------
Setting up communication with interface 0
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Resetting response endpoint 0x81
Resetting message endpoint 0x01
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.
[root@TESTPS]:~ #
So I thought I would give that a try, this is the result:
Code: Select all [root@TESTPS]:~ # echo "1c9e 6061" >/sys/bus/usb-serial/drivers/option1/new_id
[root@TESTPS]:~ #
[root@TESTPS]:~ # nanocom /dev/ttyUSB0 -b115200 -d8 -pn -fn -s1 -en
Press CTRL+T for menu options
****************************************Line Status***********************************************
115200 bps 8 Data Bits n Parity 1 Stop Bits n Flow Control n echo
**************************************************************************************************
USBS4Vx
So I got those few bytes from it, but it wouldn't respond to at etc..
Thanks for any more hints
Dan
-
Josh
- Site Admin
- Posts: 6593
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 05 Sep 2011, 13:54
If the target class is "ff", then the device is already switched to modem, either by a previous manual command (always re-plug before each manual try!) or by a hotplug mechanism (udev?) which has done the mode switch automatically right after plugging.
Don't try to switch it again.
As for the serial port, connection doesn't have to take place on ttyUSB0. There are probably other ports - you want the one using an interrupt interface. Run "lsusb -v" on the device and look for "Transfer Type Interrupt".
-
slonik
- Posts: 7
- Joined: 02 Sep 2011, 12:18
Post
by slonik » 06 Sep 2011, 17:01
Thanks Josh,
Now I have traced what happens on my debian system to make ttyUSB0 work.
comparing the output of lsusb -v, on the working system I have an interrupt type interface (1 of 4):
Code: Select all Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 108
bNumInterfaces 4
bConfigurationValue 1
iConfiguration 5 Qualcomm Configuration
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 1 Qualcomm CDMA Technologies MSM
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 5
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 32
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 32
...
on the non-working system I only have 1 'Bulk' interface :
Code: Select all Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
..
It seems that on the working system the "modem-manager" does some magic via plugin "Longcheer" to disconnect the one device and reconnect it making these 4 ports appear:
Code: Select all Sep 6 15:30:05 linuxbuilder kernel: [5801017.092035] usb 1-6: new high speed USB device using ehci_hcd and address 22
Sep 6 15:30:06 linuxbuilder kernel: [5801017.226939] usb 1-6: New USB device found, idVendor=1c9e, idProduct=6061
Sep 6 15:30:06 linuxbuilder kernel: [5801017.226945] usb 1-6: New USB device strings: Mfr=3, Product=2, SerialNumber=4
Sep 6 15:30:06 linuxbuilder kernel: [5801017.226948] usb 1-6: Product: Qualcomm CDMA Technologies MSM
Sep 6 15:30:06 linuxbuilder kernel: [5801017.226951] usb 1-6: Manufacturer: Qualcomm, Incorporated
Sep 6 15:30:06 linuxbuilder kernel: [5801017.226954] usb 1-6: SerialNumber: 000000000002
Sep 6 15:30:06 linuxbuilder kernel: [5801017.228170] usb 1-6: configuration #1 chosen from 1 choice
Sep 6 15:30:06 linuxbuilder kernel: [5801017.230797] option 1-6:1.0: GSM modem (1-port) converter detected
Sep 6 15:30:06 linuxbuilder kernel: [5801017.230915] usb 1-6: GSM modem (1-port) converter now attached to ttyUSB0
Sep 6 15:30:06 linuxbuilder modem-manager: (ttyUSB0) opening serial device...
Sep 6 15:30:06 linuxbuilder modem-manager: (ttyUSB0): probe requested by plugin 'Longcheer'
Sep 6 15:30:14 linuxbuilder kernel: [5801025.231055] usb 1-6: USB disconnect, address 22
Sep 6 15:30:14 linuxbuilder kernel: [5801025.231278] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
Sep 6 15:30:14 linuxbuilder kernel: [5801025.231295] option 1-6:1.0: device disconnected
Sep 6 15:30:14 linuxbuilder modem-manager: (ttyUSB0) closing serial device...
Sep 6 15:30:14 linuxbuilder kernel: [5801025.500034] usb 1-6: new high speed USB device using ehci_hcd and address 23
Sep 6 15:30:14 linuxbuilder kernel: [5801025.635360] usb 1-6: New USB device found, idVendor=1c9e, idProduct=6061
Sep 6 15:30:14 linuxbuilder kernel: [5801025.635366] usb 1-6: New USB device strings: Mfr=2, Product=1, SerialNumber=3
Sep 6 15:30:14 linuxbuilder kernel: [5801025.635370] usb 1-6: Product: Qualcomm CDMA Technologies MSM
Sep 6 15:30:14 linuxbuilder kernel: [5801025.635373] usb 1-6: Manufacturer: Qualcomm, Incorporated
Sep 6 15:30:14 linuxbuilder kernel: [5801025.635376] usb 1-6: SerialNumber: 000000000002
Sep 6 15:30:14 linuxbuilder kernel: [5801025.636828] usb 1-6: configuration #1 chosen from 1 choice
Sep 6 15:30:14 linuxbuilder kernel: [5801025.640847] option 1-6:1.0: GSM modem (1-port) converter detected
Sep 6 15:30:14 linuxbuilder kernel: [5801025.641018] usb 1-6: GSM modem (1-port) converter now attached to ttyUSB0
Sep 6 15:30:14 linuxbuilder kernel: [5801025.641114] option 1-6:1.1: GSM modem (1-port) converter detected
Sep 6 15:30:14 linuxbuilder kernel: [5801025.641186] usb 1-6: GSM modem (1-port) converter now attached to ttyUSB1
Sep 6 15:30:14 linuxbuilder kernel: [5801025.641265] option 1-6:1.2: GSM modem (1-port) converter detected
Sep 6 15:30:14 linuxbuilder kernel: [5801025.641333] usb 1-6: GSM modem (1-port) converter now attached to ttyUSB2
Sep 6 15:30:14 linuxbuilder kernel: [5801025.641410] option 1-6:1.3: GSM modem (1-port) converter detected
Sep 6 15:30:14 linuxbuilder kernel: [5801025.641480] usb 1-6: GSM modem (1-port) converter now attached to ttyUSB3
Sep 6 15:30:14 linuxbuilder modem-manager: (ttyUSB0) opening serial device...
Sep 6 15:30:14 linuxbuilder modem-manager: (ttyUSB0): probe requested by plugin 'Longcheer'
Sep 6 15:30:14 linuxbuilder modem-manager: (ttyUSB3) opening serial device...
Sep 6 15:30:14 linuxbuilder modem-manager: (ttyUSB3): probe requested by plugin 'Longcheer'
Sep 6 15:30:14 linuxbuilder modem-manager: (ttyUSB2) opening serial device...
Sep 6 15:30:14 linuxbuilder modem-manager: (ttyUSB2): probe requested by plugin 'Longcheer'
Sep 6 15:30:14 linuxbuilder modem-manager: (ttyUSB1) opening serial device...
Sep 6 15:30:14 linuxbuilder modem-manager: (ttyUSB1): probe requested by plugin 'Longcheer'
Sep 6 15:30:17 linuxbuilder modem-manager: (ttyUSB0) closing serial device...
Sep 6 15:30:17 linuxbuilder modem-manager: (Longcheer): GSM modem /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-6 claimed port ttyUSB0
Sep 6 15:30:17 linuxbuilder modem-manager: Added modem /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-6
Sep 6 15:30:17 linuxbuilder modem-manager: Exported modem /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-6 as /org/freedesktop/ModemManager/Modems/7
Sep 6 15:30:17 linuxbuilder modem-manager: (ttyUSB2) closing serial device...
Sep 6 15:30:17 linuxbuilder modem-manager: (Longcheer): GSM modem /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-6 claimed port ttyUSB2
Sep 6 15:30:17 linuxbuilder NetworkManager: <info> (ttyUSB0): new GSM device (driver: 'option1')
Sep 6 15:30:17 linuxbuilder NetworkManager: <info> (ttyUSB0): exported as /org/freedesktop/NetworkManager/Devices/8
Sep 6 15:30:17 linuxbuilder NetworkManager: <info> (ttyUSB0): now managed
Sep 6 15:30:17 linuxbuilder NetworkManager: <info> (ttyUSB0): device state change: 1 -> 2 (reason 2)
Sep 6 15:30:17 linuxbuilder NetworkManager: <info> (ttyUSB0): deactivating device (reason: 2).
Sep 6 15:30:17 linuxbuilder NetworkManager: <info> (ttyUSB0): device state change: 2 -> 3 (reason 0)
So how can I make this work on my busybox system (no udev only mdev), do you think it is possible?
Sorry if I'm off topic with this, if so could you direct me to a more suitable forum?
Thanks
Dan
-
Josh
- Site Admin
- Posts: 6593
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 06 Sep 2011, 18:22
slonik wrote:on the non-working system I only have 1 'Bulk' interface
In that case, the device has likely not switched the mode. Does it have an InterfaceClass of "8"?
BTW, the InterfaceClass "255" is the very same thing as usb_modeswitch's TargetClass "0xff" ...
slonik wrote:It seems that on the working system the "modem-manager" does some magic via plugin "Longcheer" to disconnect the one device and reconnect it making these 4 ports appear
I doubt that modem-manager is doing anything. Maybe usb_modeswitch is installed on that machine ?
Unfortunately, I have no experience at all with the "mdev" program you are working with. I'm sure there is some documentation out there somewhere though.
-
slonik
- Posts: 7
- Joined: 02 Sep 2011, 12:18
Post
by slonik » 06 Sep 2011, 18:31
Hi,
Thanks for the help, this is what lsusb reports after a fresh replug of the modem:
Code: Select all lsusb: cannot open "/var/lib/usbutils/usb.ids", No such file or directory
Bus 001 Device 004: ID 1c9e:6061
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x1c9e
idProduct 0x6061
bcdDevice 0.00
iManufacturer 3 Qualcomm, Incorporated
iProduct 2 Qualcomm CDMA Technologies MSM
iSerial 4 000000000002
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 1 Qualcomm Configuration
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8
bInterfaceSubClass 6
bInterfaceProtocol 80
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
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0001
Self Powered
[root@TESTPS]:~ #
So yes it has an bInterfaceClass of 8.
|
|