Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
danielmaia
Posts: 7
Joined: 15 Sep 2012, 20:41

I can't make my ZTE 19d2:2000 3G modem work on CentOS 6.3

Post by danielmaia » 15 Sep 2012, 20:55

Hi.

I struggled as much as I could but I could not make my ZTE 19d2:2000 modem work on CentOS 6.3.
This forum is my last hope.

The lsusb command gives
Bus 002 Device 009: ID 19d2:2000 ZTE WCDMA Technologies MSM MF627/MF628/MF628+/MF636+ HSDPA/HSUPA

I do know the target id. The modem is not switching and the driver is missing.
I read your instructions but I do not know how to "disable the eject rule" as you mentioned (I'm no Linux expert).
What I did instead was comment the line of the 19d2:2000 on the /lib/udev/rules.d/40-usb_modeswitch.rules but it did not make any difference.

The result of the usb_modeswitch command is attached bellow.

Thank you in advance.

----------------------------------------------------------------------------------------------------------
[root@br25nb49 etc]# usb_modeswitch -v19d2 -p2000

Looking for default devices ...
found matching product ID
adding device
Found device in default mode, class or configuration (1)
Accessing device 009 on bus 002 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using first interface: 0x00
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
No driver found. Either detached before or never attached

SCSI inquiry data (for identification)
-------------------------
Vendor String: ONDA
Model String: USB SCSI CD-ROM
Revision String: 2.31
-------------------------

USB description data (for identification)
-------------------------
Manufacturer: ONDA, Incorporated
Product: ONDA CDMA Technologies MSM
Serial No.: not provided
-------------------------
Warning: no switching method given.
-> Run lsusb to note any changes. Bye.

danielmaia
Posts: 7
Joined: 15 Sep 2012, 20:41

Re: I can't make my ZTE 19d2:2000 3G modem work on CentOS 6.

Post by danielmaia » 15 Sep 2012, 22:49

Hi again. I have just found a solution on the 'mandrivabrasil.org' website.
The following command line makes my modem work!

usb_modeswitch -v 0x19d2 -p 0x2000 -V 0x19d2 -P 0x0037 -m 0x01 -M 55534243123456782000000080000c85010101180101010101000000000001

When I plug the modem it does not work automatically. Usb_modeswitch seems to try a wrong argument.
Now I just need to learn how to edit the modeswtich files to make this automatic.

Cheers,
Daniel

danielmaia
Posts: 7
Joined: 15 Sep 2012, 20:41

Re: I can't make my ZTE 19d2:2000 3G modem work on CentOS 6.

Post by danielmaia » 15 Sep 2012, 23:07

I forgot to mention one detail.
The cited command line only works as root. With my user login it does switch correctly.
Mistery.

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

Re: I can't make my ZTE 19d2:2000 3G modem work on CentOS 6.

Post by Josh » 17 Sep 2012, 11:31

Please re-enable the line in /lib/udev/rules.d/40-usb_modeswitch.rules again.

Then enable usb_modeswitch's logging as described on the main doc page, paragraph "Troubleshooting". Plug your stick in, wait a moment, and post the resulting log here.

danielmaia
Posts: 7
Joined: 15 Sep 2012, 20:41

Re: I can't make my ZTE 19d2:2000 3G modem work on CentOS 6.

Post by danielmaia » 17 Sep 2012, 16:09

I had already uncommented the line in the 40-usb_modeswitching.rules.
After connecting the devide, a new file was created called usb_modeswitch_noname. The contents are:

USB_ModeSwitch log from Mon Sep 17 10:18:09 BRT 2012
Raw args from udev:

Using global config file: /etc/usb_modeswitch.conf
No data from udev. Exiting

After changing to root and executing the manual usb_modeswitch to target device 0037 with a special message tag, 4 new files are created called: usb_modeswitch_devices usb_modeswitch_ttyUSB0 usb_modeswitch_ttyUSB1 usb_modeswitch_ttyUSB2. Their contents are, in order:

usb_modeswitch_devices
USB_ModeSwitch log from Mon Sep 17 10:56:41 BRT 2012
Raw args from udev: /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0
Using global config file: /etc/usb_modeswitch.conf
No command given. Exiting

usb_modeswitch_ttyUSB0
USB_ModeSwitch log from Mon Sep 17 10:56:41 BRT 2012
usb_modeswitch called with --symlink-name
parameter: /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/ttyUSB0/tty/ttyUSB0
My name is ttyUSB0
Checking my endpoints ...
in /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0
checking ep_81 ...
checking ep_01 ...
--> I am not an interrupt port
Return empty name and exit

usb_modeswitch_ttyUSB1
USB_ModeSwitch log from Mon Sep 17 10:56:41 BRT 2012
usb_modeswitch called with --symlink-name
parameter: /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.1/ttyUSB1/tty/ttyUSB1
My name is ttyUSB1
Checking my endpoints ...
in /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.1
checking ep_82 ...
checking ep_02 ...
--> I am not an interrupt port
Return empty name and exit

usb_modeswitch_ttyUSB02
usb_modesUSB_ModeSwitch log from Mon Sep 17 10:56:41 BRT 2012
usb_modeswitch called with --symlink-name
parameter: /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.3/ttyUSB2/tty/ttyUSB2
My name is ttyUSB2
Checking my endpoints ...
in /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.3
checking ep_84 ...
ep_84 has interrupt transfer type
--> I am an interrupt port
Looking for lower ports with interrupt endpoints
in ifDir /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 ...
checking ep_81 ...
checking ep_01 ...
in ifDir /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.1 ...
checking ep_82 ...
checking ep_02 ...
in ifDir /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.2 ...
no ttyUSB interface - skip checking endpoints
--> No interrupt interface below me
Return symlink name "gsmmodem" and exitwitch_ttyUSB2

Please let me know if you need further info.
Thanks,
Daniel

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

Re: I can't make my ZTE 19d2:2000 3G modem work on CentOS 6.

Post by Josh » 17 Sep 2012, 16:52

This is your main problem:

"No data from udev. Exiting"

usb_modeswitch relies on data passed on from the device "daemon". I don't think it is holding back the data, but it might have gone lost along the way. I'm certain your device would be switched all right without tweaking the configuration.

Please state the version of the usb_modeswitch installation ("usb_modeswitch -e") and your kernel version ("uname -r").

I assume you are using the program and data package as provided by the distribution.

danielmaia
Posts: 7
Joined: 15 Sep 2012, 20:41

Re: I can't make my ZTE 19d2:2000 3G modem work on CentOS 6.

Post by danielmaia » 17 Sep 2012, 17:18

usb_modeswitch version 1.2.3 (based on libusb0 0.1.12 and above)
CentOS 6.3 with kernel 2.6.32-279.el6.x86_64

I am not sure I understood your reply but it seems my device does not have a serial number and usb_modeswitch does not know it should be mounted as 0037 target device. Also the message tag I picked up from mandrivabrasil.org is not any of threes listed in your 19d2:2000 file.

Please advise if you need me to run any further diagnostics command.
Thanks,
Daniel

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

Re: I can't make my ZTE 19d2:2000 3G modem work on CentOS 6.

Post by Josh » 17 Sep 2012, 18:11

danielmaia wrote:usb_modeswitch version 1.2.3 (based on libusb0 0.1.12 and above)
CentOS 6.3 with kernel 2.6.32-279.el6.x86_64
Both quite useable and not likely to cause trouble.
What is the version of the "usb-modeswitch-data" package? You may have to search it through your package install program.
danielmaia wrote:I am not sure I understood your reply but it seems my device does not have a serial number and usb_modeswitch does not know it should be mounted as 0037 target device. Also the message tag I picked up from mandrivabrasil.org is not any of threes listed in your 19d2:2000 file.
I don't understand that last sentence at all. And the serial number is not relevant in the context of mode-switching.

Anyway, the target product ID 0037 is in the "19d2:2000" config file at least since 2010.

One more thing to check: can you please post (or attach) the following file from your installation?

"/lib/udev/usb_modeswitch"

It should be a little shell script.

danielmaia
Posts: 7
Joined: 15 Sep 2012, 20:41

Re: I can't make my ZTE 19d2:2000 3G modem work on CentOS 6.

Post by danielmaia » 17 Sep 2012, 19:13

I attached the usb_modeswitch script. I had to put the "txt" extension in order to attach it.
My usb_modeswitch-data version is "20120120-1.el6.rf (noarch)"

What I meant is that the message string 55534243123456782000000080000c85010101180101010101000000000001 was not inside the 19d2:2000 file. This was the string I found on the mandrivabrasil.org site for 0037 device. I do not know if that is relevant but I reported it just in case.
Attachments
usb_modeswitch.txt
(25.94 KiB) Downloaded 832 times

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

Re: I can't make my ZTE 19d2:2000 3G modem work on CentOS 6.

Post by Josh » 18 Sep 2012, 08:16

The CentOS people have obviously messed with the usb_modeswitch setup, thereby botching it. It will never work.

The file you posted is meant to be in /usr/sbin, named "usb_modeswitch_dispatcher". It will be called with the correct parameters from a really small shell script in "/lib/udev/".

To fix your installation, grab the latest program package from the main usb_modeswitch page. The version doesn't matter, the shell script has not changed since 1.2.3.

If you unpack it, you will find a file named "usb_modeswitch.sh" in the resulting folder.
Now rename and move/copy your original "/lib/udev/usb_modeswitch" to
"/usr/sbin/usb_modeswitch_dispatcher". Then move/copy the "usb_modeswitch.sh" file to "/lib/udev/" and rename it to "usb_modeswitch".

Also, you should file a bug report with the CentOS developers. This is a big fat one ...

danielmaia
Posts: 7
Joined: 15 Sep 2012, 20:41

Re: I can't make my ZTE 19d2:2000 3G modem work on CentOS 6.

Post by danielmaia » 18 Sep 2012, 13:05

Yes! It works smoothly now.
I will file a bug report on CentOS forum.

Thank you so much for your help.

Post Reply