| |
Automatic Activation, Hotplug and UDEV, Configuration
-
nhatkiemphi
- Posts: 5
- Joined: 20 May 2013, 03:39
Post
by nhatkiemphi » 20 May 2013, 05:47
Dear Admin,
I have a device named:
Code: Select all HSUPA USB Stick
Model: MF190
GSM/EDGE/3G
ZTE Corporation
When I do lsusb after plugging in I get
Code: Select all Bus 2 Device 2: ID 0529:0001 Aladdin Knowledge Systems HASP v0.06
Bus 2 Device 1: ID 0000:0000
Bus 5 Device 1: ID 0000:0000
Bus 4 Device 1: ID 0000:0000
Bus 3 Device 1: ID 0000:0000
Bus 1 Device 4: ID 0424:2502 Standard Microsystems Corp.
Bus 1 Device 3: ID 19d2:2000
Bus 1 Device 1: ID 0000:0000
I just plugged it out and back in again and got the following extract from /var/log/messages
Code: Select all May 20 09:40:48 pos_server kernel: usb 1-2: USB disconnect, address 3
May 20 09:40:48 pos_server aksusbd: aksusbd_usb_dev_remove: device '/dev/aks/hasp/3'
May 20 09:42:44 pos_server kernel: usb 1-2: new high speed USB device using ehci_hcd and address 5
May 20 09:42:44 pos_server kernel: usb 1-2: configuration #1 chosen from 1 choice
May 20 09:42:44 pos_server kernel: scsi3 : SCSI emulation for USB Mass Storage devices
May 20 09:42:49 pos_server kernel: scsi 3:0:0:0: CD-ROM ZTE USB SCSI CD-ROM 2.31 PQ: 0 ANSI: 2
May 20 09:46:55 pos_server ntpd[3241]: synchronized to 223.255.185.2, stratum 1
May 20 09:47:51 pos_server kernel: usb 1-2: USB disconnect, address 5
May 20 09:47:51 pos_server aksusbd: aksusbd_usb_dev_remove: device '/dev/aks/hasp/5'
May 20 09:49:59 pos_server kernel: usb 1-2: new high speed USB device using ehci_hcd and address 6
May 20 09:49:59 pos_server kernel: usb 1-2: configuration #1 chosen from 1 choice
May 20 09:49:59 pos_server kernel: scsi4 : SCSI emulation for USB Mass Storage devices
May 20 09:50:04 pos_server kernel: scsi 4:0:0:0: CD-ROM ZTE USB SCSI CD-ROM 2.31 PQ: 0 ANSI: 2
Code: Select all root@pos_server:~# usb_modeswitch --version
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.2.5 (C) Josua Dietze 2012
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
My server is Slackware 12 with kernel:
root@pos_server:~# uname -r
2.6.22
Code: Select all root@pos_server:~# ls /usr/lib/libusb*
/usr/lib/libusb-0.1.so.4@ /usr/lib/libusb.a /usr/lib/libusb.so@ /usr/lib/libusbpp-0.1.so.4.4.4* /usr/lib/libusbpp.la*
/usr/lib/libusb-0.1.so.4.4.4* /usr/lib/libusb.la* /usr/lib/libusbpp-0.1.so.4@ /usr/lib/libusbpp.a /usr/lib/libusbpp.so@
I tried running usb_modeswitch with a few parameters
Code: Select all root@pos_server:~# usb_modeswitch -W -v 19d2 -p 2000
Taking all parameters from the command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.2.5 (C) Josua Dietze 2012
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x19d2
DefaultProduct= 0x2000
TargetVendor= not set
TargetProduct= not set
TargetClass= not set
TargetProductList=""
DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
QisdaMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint= not set
MessageContent=""
NeedResponse=0
ResponseEndpoint= not set
InquireDevice enabled (default)
Success check disabled
System integration mode disabled
usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 5
usb_os_find_busses: Found 4
usb_os_find_busses: Found 3
usb_os_find_busses: Found 2
usb_os_find_busses: Found 1
usb_os_find_devices: Found 1 on 5
usb_os_find_devices: Found 1 on 4
usb_os_find_devices: Found 1 on 3
usb_os_find_devices: Found 2 on 2
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 1 on 2
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 5 on 1
usb_os_find_devices: Found 1 on 1
usb_os_find_devices: Found 4 on 1
error obtaining child information: Inappropriate ioctl for device
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 0529:0001
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 0424:2502
Found device in default mode, class or configuration (1)
Accessing device 005 on bus 001 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using interface number 0
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.: MF1900ZTED010000
-------------------------
Warning: no switching method given.
-> Run lsusb to note any changes. Bye.
What does "Warning: no switching method given", require from me? Am I too far from success here!
-
LOM
- Posts: 1404
- Joined: 11 Jul 2012, 15:14
- Location: Koh Samui, TH
Post
by LOM » 20 May 2013, 07:25
nhatkiemphi wrote:
What does "Warning: no switching method given", require from me? Am I too far from success here!
usb_modeswitch has not been given something to do, you have "MessageContent=" , ie no switch message to send to the dongle.
Read the usb_modeswitch documentation on the main page http://www.draisberghof.de/usb_modeswitch, then install it properly and the mode switching will be done automagically.
If you want to test with manual mode switching then do at least download the usb_modeswitch data package where you can find the correct switch Messages for 19d2:2000.
-
nhatkiemphi
- Posts: 5
- Joined: 20 May 2013, 03:39
Post
by nhatkiemphi » 20 May 2013, 12:02
Thanks for reply,
I was re-install usb_modeswitch and trying ok:
Code: Select all root@pos_server:~# usb_modeswitch -v 0x19d2 -p 0x2000 -V 0x19d2 -P 0x2003 -s 20 -M
5553424312345679000000000000061b000000020000000000000000000000
Looking for target devices ...
No devices in target mode or class found
Looking for default devices ...
found matching product ID
adding device
Found device in default mode, class or configuration (1)
Accessing device 010 on bus 001 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using interface number 0
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.: MF1900ZTED010000
-------------------------
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 ...
Searching for target devices ...
found matching product ID
adding device
Found target device, now opening
Found correct target device
Mode switch succeeded. Bye.
But when i use wvdialconf
Code: Select all root@pos_server:~# wvdialconf
Editing `/etc/wvdial.conf'.
Scanning your serial ports for a modem.
ttyS0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyS0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyS0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
ttyS1<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyS1<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyS1<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
ttyS2<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyS2<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyS2<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
ttyS3<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyS3<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyS3<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
ttyS4<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyS4<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyS4<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
ttyS5<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyS5<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyS5<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
Modem Port Scan<*1>: S6 S7 S8 S9 S10 S11 S12 S13
Modem Port Scan<*1>: S14 S15
Sorry, no modem was detected! Is it in use by another program?
Did you configure it properly with setserial?
Please read the FAQ at http://open.nit.ca/wiki/?WvDial
If you still have problems, send mail to <wvdial-list@lists.nit.ca>.
and
Code: Select all root@pos_server:~# lsusb
Bus 4 Device 1: ID 0000:0000
Bus 3 Device 1: ID 0000:0000
Bus 5 Device 1: ID 0000:0000
Bus 2 Device 2: ID 0529:0001 Aladdin Knowledge Systems HASP v0.06
Bus 2 Device 1: ID 0000:0000
Bus 1 Device 4: ID 0424:2502 Standard Microsystems Corp.
Bus 1 Device 3: ID 19d2:2003
Bus 1 Device 1: ID 0000:0000
Pls, advice for me !
-
Josh
- Site Admin
- Posts: 6593
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 20 May 2013, 13:33
After the successful mode switch, run the "dmesg" command. At the end of the output, you should see how the modem returned with a different USB ID. There should also be a hint that the modem driver has bound to it.
If not, report back.
-
nhatkiemphi
- Posts: 5
- Joined: 20 May 2013, 03:39
Post
by nhatkiemphi » 21 May 2013, 03:17
Dear Mr.Josh,
This is dmesg after usb_modeswitch successed:
Code: Select all usb 1-2: new high speed USB device using ehci_hcd and address 4
usb 1-2: configuration #1 chosen from 1 choice
scsi2 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
scsi 2:0:0:0: CD-ROM ZTE USB SCSI CD-ROM 2.31 PQ: 0 ANSI: 2
sr0: scsi-1 drive
Uniform CD-ROM driver Revision: 3.20
sr 2:0:0:0: Attached scsi CD-ROM sr0
usb-storage: device scan complete
usb 1-2: usbfs: process 3106 (usb_modeswitch) did not claim interface 0 before use
usb 1-2: USB disconnect, address 4
usb 1-2: new high speed USB device using ehci_hcd and address 5
usb 1-2: configuration #1 chosen from 1 choice
scsi3 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
scsi 3:0:0:0: Direct-Access ZTE MMC Storage 2.31 PQ: 0 ANSI: 2
sd 3:0:0:0: [sdb] Attached SCSI removable disk
usb-storage: device scan complete
Code: Select all T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 6 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=19d2 ProdID=2003 Rev= 0.00
S: Manufacturer=ZTE,Incorporated
S: Product=ZTE WCDMA Technologies MSM
S: SerialNumber=MF1900ZTED010000
C:* #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=84(I) Atr=03(Int.) MxPS= 64 Ivl=2ms
E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 4 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
It don't change to modem mode, how about this?
I was setup it on Kubuntu, it's worked with 19d2:2003.
Pls, Help me!
-
Josh
- Site Admin
- Posts: 6593
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 21 May 2013, 17:04
So you did not do a full install of the usb_modeswitch package?
Is there a reason for this? Is this a system without "udev"?
-
nhatkiemphi
- Posts: 5
- Joined: 20 May 2013, 03:39
Post
by nhatkiemphi » 22 May 2013, 10:12
Dear Josh,
I was installed full usb_modeswitch at http://www.draisberghof.de/usb_modeswitch/
Code: Select all root@pos_server:~# usb_modeswitch -e
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.2.5 (C) Josua Dietze 2012
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
About "udev" i don't know it installed or not. Can you say with me how to check?
This's udev command begin with "udev".
Code: Select all root@pos_server:~# udev
udevcontrol udevinfo udevsettle udevtrigger
udevd udevmonitor udevtest
-
LOM
- Posts: 1404
- Joined: 11 Jul 2012, 15:14
- Location: Koh Samui, TH
Post
by LOM » 22 May 2013, 12:58
nhatkiemphi wrote:
Code: Select all T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 6 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=19d2 ProdID=2003 Rev= 0.00
S: Manufacturer=ZTE,Incorporated
S: Product=ZTE WCDMA Technologies MSM
S: SerialNumber=MF1900ZTED010000
C:* #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=84(I) Atr=03(Int.) MxPS= 64 Ivl=2ms
E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 4 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
It don't change to modem mode, how about this?
I was setup it on Kubuntu, it's worked with 19d2:2003.
Pls, Help me!
This is modem mode!
19d2:2003 is the usb id for the dongle when it has switched to modem mode!!
Your only problem here is that the 4 serial interfaces does not have a driver attached to them, they would become ttyUSB0 - ttyUSB3 if a a driver had been loaded.
The right driver to use is option.ko which if included in your Slackware distro should be found somewhere under /lib , you can load it with the cmd insmod option (or modprobe option).
option.ko is dependent on usbserial which either has to be compiled into the kernel or included as module in which case you have to insmod/modprobe that module before option.ko
The lsmod cmd will list currently loaded modules.
-
Josh
- Site Admin
- Posts: 6593
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 22 May 2013, 13:13
nhatkiemphi wrote:I was installed full usb_modeswitch
Did you install the "tcl" package as well?
If yes, all the mode switching will run automatically if you plug your modem in. udev is installed on your system as your file list shows.
As LOM said: check if you have the required driver module by running "modprobe -v option".
-
nhatkiemphi
- Posts: 5
- Joined: 20 May 2013, 03:39
Post
by nhatkiemphi » 23 May 2013, 05:37
Dear Josh and LOM,
I was installed tcl.
This cmd i used:
Code: Select all root@pos_server:/lib# lsmod
Module Size Used by
Code: Select all root@pos_server:/lib# modprobe -v option
FATAL: Module option not found.
Code: Select all root@pos_server:/lib# modprobe usbserial vendor=0x19d2 product=2003
FATAL: Module usbserial not found.
Code: Select all root@pos_server:/lib# ls /lib/modules/2.6.22/kernel/drivers/
char/ scsi/
-
bmork
- Posts: 167
- Joined: 15 Mar 2012, 22:47
- Location: Oslo, Norway
Post
by bmork » 24 May 2013, 16:38
nhatkiemphi wrote:My server is Slackware 12 with kernel:
root@pos_server:~# uname -r
2.6.22
Either buy a modem which is older than your kernel, or install a kernel which is newer than your modem.
Sorry, we didn't have time machines back when that kernel was released.
|
|