Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
pt_tomcat
Posts: 6
Joined: 14 Dec 2010, 04:29

Problem to setup ZTE MF 112 on CentOS 5

Post by pt_tomcat » 14 Dec 2010, 04:34

Hi

I want to use ZTE MF 112(v=0x19d2 p 0x19d2) mobile broad band USB modem on CENTOS 5.
I think every thing is installed fine, but my problem is when I switched USB modem with usb_modeswitch command; I cannot find the right block on /dev, which is supposed to be mounted to one of the ttyS0-S4.

I wrote down every thing that I’ve done on my system:

I installed usb_modeswitch (Version 1.1.5) from source code then I tried to install usb_modeswitch data which gave me, this error:

Code: Select all

[root@localhost usb-modeswitch-data-20100826]# make install
install -d /etc/usb_modeswitch.d
install -D --mode=644 40-usb_modeswitch.rules /lib/udev/rules.d/40-usb_modeswitch.rules
install --mode=644 -t /etc/usb_modeswitch.d ./usb_modeswitch.d/*
if [ -f /etc/issue ]; then \
                if [ -n `which udevadm 2>/dev/null` ]; then \
                        UDEVADM=`which udevadm`; \
                        UDEVADM_VER=`$UDEVADM -V 2>/dev/null`; \
                        if [ -z $UDEVADM_VER ]; then \
                                UDEVADM_VER=`$UDEVADM --version 2>/dev/null`; \
                        fi; \
                        if [ $UDEVADM_VER -gt 127 ]; then \
                                $UDEVADM control --reload-rules; \
                        else \
                                $UDEVADM control --reload_rules; \
                        fi \
                elif [ `which udevcontrol 2>/dev/null` ]; then \
                `which udevcontrol` reload_rules; \
                fi \
        fi
which: no udevadm in (/usr/kerberos/sbin:/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/tomcat/bin)
/bin/sh: line 7: [: -gt: unary operator expected
/bin/sh: line 10: control: command not found
make: *** [rules-reload] Error 127



I’ve already installed udev

Code: Select all

[root@localhost usb-modeswitch-data-20100826]# rpm -q udev
udev-095-14.21.el5_5.1

Any way

I can run # /usr/sbin/usb_modeswitch -v 0x19d2 -p 0x0103 -c /etc/usb_modeswitch.d/19d2\:0103

Code: Select all

Looking for target devices ...
 No devices in target mode or class found
Looking for default devices ...
 Found devices in default mode or class (1)
Accessing device 007 on bus 002 ...
Using endpoints 0x01 (out) and 0x81 (in)
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: HSPA    
   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.: P673A3H3GD010000
-------------------------
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 the message (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 ...
 OK, response successfully read (13 bytes).
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 ...
 Original device can't be accessed anymore. Good.
 Searching for target devices ...
 Searching for target devices ...
 Found correct target device

Mode switch succeeded. Bye.

It’s seems usb_modeswitch, switched my modem and I can confirm it with /sbin./lsusb:

Code: Select all

[root@localhost usb-modeswitch-data-20100826]# /sbin/lsusb 
Bus 002 Device 008: ID 19d2:0031  


Every thing should be fine, and usbmodem suppose to be mounted to one “ttyS0-ttyS4” blocks.
The problem is:
When I tried to run wvdial , wvidial couldn’t find modem at any block of ttyS0-ttyS4.


Do you have any idea that what is the problem?

I appreciate your help 

Thank you
Arash

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

Post by Josh » 14 Dec 2010, 08:51

Did you check if you have all the components installed? Do you have the "tcl" package?

If so, you should not have to do anything except plugging your device in.

Note that your distribution has a very old udev version (and most likely an old kernel too); some problems may be caused by that fact.
Anyway, if you get no results at all, switch on logging as described on the main doc page, paragraph "Troubleshooting".

Note that the modem devices you will get are "ttyUSB0", "ttyUSB1", "ttyUSB2" ...


pt_tomcat
Posts: 6
Joined: 14 Dec 2010, 04:29

Post by pt_tomcat » 15 Dec 2010, 18:57

Dear josh

Thank you, you were right about udev . When I saw log file its seems I have problem with Udev.

Code: Select all

USB_ModeSwitch log from Wed Dec 01 12:42:07 AM GMT 2010

Using global config file: /etc/usb_modeswitch.conf
raw args from udev: -v 0x19d2 -p 0x0031
No data from udev. Exiting
what do you think, shall I update Udev to new version?


Many thanks
Arash

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

Post by Josh » 15 Dec 2010, 19:51

Uhm, something is not right here. In the current rules file there is nothing about the command line parameters -v and -p.

Are there probably other rules files calling "usb_modeswitch" in "/etc/udev/rules.d" or "/lib/udev/rules.d" ? You can do a "grep usb_modeswitch *" in both folders to check quickly.

pt_tomcat
Posts: 6
Joined: 14 Dec 2010, 04:29

Post by pt_tomcat » 16 Dec 2010, 04:19

I am so sorry. I made big mistake this log is old. I didn’t check my date. That log was for 15 days ago.

I don’t find any new log. Every thing should be fine.

I don’t have any block on Cent Os like ttyUSB0", "ttyUSB1", "ttyUSB2”. I just have ttyS0, ttyS1, ttyS2, ttyS3

I checked "/lib/udev/rules.d", there is only one rule “40-usbmodswitch”.
In "/etc/udev/rules.d" there is no rules for usb_modeswitch.


Thanks

Arash

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

Post by Josh » 16 Dec 2010, 22:34

What is your kernel version ("uname -r") ?

pt_tomcat
Posts: 6
Joined: 14 Dec 2010, 04:29

Post by pt_tomcat » 18 Dec 2010, 01:54

It is 2.6.18-53.5elxen

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

Post by Josh » 18 Dec 2010, 14:31

This is a very old kernel, the driver binding to "option" will not work there.

Still, the fallback to "usbserial" should succeed. It may be unreliable in 1.1.5; I have improved it for the next release though.

Can you try the test version?
http://www.draisberghof.de/usb_modeswit ... st.tar.bz2

Also, you have to edit "/lib/udev/40-usb_modeswitch.rules".

Change this:

Code: Select all

KERNEL=="ttyUSB*", DRIVERS=="option1|usbserial", ...
to this:

Code: Select all

KERNEL=="ttyUSB*", DRIVERS=="option1|usbserial*", ...
(Note the asterisk).


pt_tomcat
Posts: 6
Joined: 14 Dec 2010, 04:29

Post by pt_tomcat » 20 Dec 2010, 15:57

I did it, but it didn’t work.

Maybe it didn’t work because I don’t have ttyUSB block on /dev .
I tried to install old version of usb_modeswitch rpm for Cent OS (usb_modeswitch-0.9.7-1.el5.test.i386.rpm ) .unfortunately, it doesn’t support ZTE mf 112.


Thank you

Arash

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

Post by Josh » 20 Dec 2010, 19:40

The ttyUSB devices will be created only after a successful run of usb_modeswitch.

There is a new test version available:
http://www.draisberghof.de/usb_modeswit ... st.tar.bz2

And I remembered that for old udev versions you need different rules. So you want to use this file instead of the one you have in "/lib/udev/rules.d":
http://www.draisberghof.de/usb_modeswit ... itch.rules

If still nothing at all will happen, try to move the "rules" file in "/etc/udev/rules.d".


pt_tomcat
Posts: 6
Joined: 14 Dec 2010, 04:29

Post by pt_tomcat » 24 Dec 2010, 02:53

I installed usb-modeswitch-1.1.6-test.tar.bz2 and I also copied 40-usb_modeswitch.rules to "/etc/udev/rules.d” and "/lib/udev/rules.d" . but still I couldn’t get any result.
I checked log file and It was empty.

Happy Christmas
Thanks
Arash

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

Post by Josh » 24 Dec 2010, 09:48

Things have moved on quickly; version 1.1.6 is released.

Can you try it? It may improve driver binding robustness.

Don't forget to install the new data package as well.


Post Reply