usb_modeswitch does not recognize ZTE 19d2:0031 modem

Bug #891307 reported by Luiz Angelo Daros de Luca
38
This bug affects 6 people
Affects Status Importance Assigned to Milestone
modemmanager (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Hello,

Please, add 19d2:0031 to the list of ZTE modems in udev rules. Something similiar this patch will do the job.

--- /lib/udev/rules.d/40-usb_modeswitch.rules.old 2011-11-16 15:59:56.000000000 -0200
+++ /lib/udev/rules.d/40-usb_modeswitch.rules 2011-11-16 16:02:51.000000000 -0200
@@ -454,6 +454,9 @@
 # ZTE AC581
 ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="0026", RUN+="usb_modeswitch '%b/%k'"

+# ZTE MF110 (Variant)
+ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="0031", RUN+="usb_modeswitch '%b/%k'"
+
 # Vodafone (ZTE) K2525
 ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="0040", RUN+="usb_modeswitch '%b/%k'"

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: usb-modeswitch-data 20110805-1 [modified: lib/udev/rules.d/40-usb_modeswitch.rules]
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
Date: Wed Nov 16 17:28:19 2011
InstallationMedia: Kubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=pt_BR:pt:en
 LANG=pt_BR.UTF-8
 SHELL=/bin/bash
SourcePackage: usb-modeswitch-data
UpgradeStatus: Upgraded to oneiric on 2011-11-16 (0 days ago)

Revision history for this message
Luiz Angelo Daros de Luca (luizluca) wrote :
Revision history for this message
Josua Dietze (digidietze) wrote :

19d2:0031 is a *target* ID in usb_modeswitch. That means that the device has switched to modem mode already.

Please post the last 30 to 40 lines of "dmesg" output, issued a moment after plugging the device.

Changed in usb-modeswitch-data (Ubuntu):
status: New → Incomplete
Revision history for this message
Luiz Angelo Daros de Luca (luizluca) wrote :

Hello Josua,

Strange, I didn't find it in 40-usb_modeswitch.rules. I only found in the 77-mm-zte-port-types.rules, which was not enough, for me, for nm detect it as a wwan modem. See:

/lib/udev/rules.d # grep 0031 *
69-xserver-xorg-input-wacom.rules:ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0031", SYMLINK+="input/tablet-pl500"
77-mm-zte-port-types.rules:ATTRS{idProduct}=="0031", ENV{.MM_USBIFNUM}=="03", ENV{ID_MM_ZTE_PORT_TYPE_MODEM}="1"
77-mm-zte-port-types.rules:ATTRS{idProduct}=="0031", ENV{.MM_USBIFNUM}=="01", ENV{ID_MM_ZTE_PORT_TYPE_AUX}="1"

 /lib/udev/rules.d # grep 19d2 * | grep 00 | sort -n
40-usb_modeswitch.rules:ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="0003", RUN+="usb_modeswitch '%b/%k'"
40-usb_modeswitch.rules:ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="0013", RUN+="usb_modeswitch '%b/%k'"
40-usb_modeswitch.rules:ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="0026", RUN+="usb_modeswitch '%b/%k'"
40-usb_modeswitch.rules:ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="0040", RUN+="usb_modeswitch '%b/%k'"
40-usb_modeswitch.rules:ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="0053", RUN+="usb_modeswitch '%b/%k'"
40-usb_modeswitch.rules:ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="0083", RUN+="usb_modeswitch '%b/%k'"
40-usb_modeswitch.rules:ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="1001", RUN+="usb_modeswitch '%b/%k'"
40-usb_modeswitch.rules:ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="1007", RUN+="usb_modeswitch '%b/%k'"
40-usb_modeswitch.rules:ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="1009", RUN+="usb_modeswitch '%b/%k'"
40-usb_modeswitch.rules:ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="2000", RUN+="usb_modeswitch '%b/%k'"

I guess 77-mm-zte-port-types.rules does not call usb_modeswitch, which seems to be mandatory for NM. The 3g is not mine but from my brother. If needed, I can send the dmesg info in the next weekend. Anyway, if most of models are in 40-usb_modeswitch.rules and it only worked after I added the entry, the vendor/product on it might be necessary.

Please, correct me if I'm wrong. I'm not expert in 3g modems.

Revision history for this message
Josua Dietze (digidietze) wrote :

Again, the USB ID 19d2:0031 means that the device is already in the mode it should be in.

If you add your line to the rules file, usb_modeswitch will be called a second time after the mode switch, but will do nothing because there is no config file with the name "19d2:0031" ...

To see why you have trouble in the first place, we need that dmesg output (or a snippet from the end of /var/log/syslog) right after plugging the stick (give it around 10 seconds).

If you want to see in detail what usb_modeswitch is doing, you can enable logging in /etc/usb_modeswitch.conf. On the first try, disable your additional rule and have a look at the log file (/var/log/usb_modeswitch_<something>), then in a second plug attempt see what happens if you have it enabled again.

Revision history for this message
smiki (micouk) wrote :
Download full text (5.5 KiB)

hello.
I have the same problem with the device with this id (19d2:0031)
mine is a ZTE MF637 hsupa usb modem.

the same modem works ok in lucid. but not in oneiric.
you are correct that since it already has the id:0031 that means modeswitch has already switched it to the modem mode. because it first identifies as a CDrom with id 19d2:2000

syslog output:
Jan 4 20:29:53 smiki-AOD257 kernel: [15886.676212] usb 1-4: new high speed USB device number 19 using ehci_hcd
Jan 4 20:29:54 smiki-AOD257 mtp-probe: checking bus 1, device 19: "/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-4"
Jan 4 20:29:54 smiki-AOD257 kernel: [15886.826122] scsi21 : usb-storage 1-4:1.0
Jan 4 20:29:54 smiki-AOD257 mtp-probe: bus: 1, device: 19 was not an MTP device
Jan 4 20:29:54 smiki-AOD257 usb_modeswitch: switching 19d2:2000 (ZTE,Incorporated: ZTE WCDMA Technologies MSM)
Jan 4 20:29:56 smiki-AOD257 kernel: [15888.811051] usb 1-4: USB disconnect, device number 19
Jan 4 20:29:56 smiki-AOD257 kernel: [15889.180185] usb 1-4: new high speed USB device number 20 using ehci_hcd
Jan 4 20:29:56 smiki-AOD257 mtp-probe: checking bus 1, device 20: "/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-4"
Jan 4 20:29:56 smiki-AOD257 kernel: [15889.329564] option 1-4:1.0: GSM modem (1-port) converter detected
Jan 4 20:29:56 smiki-AOD257 kernel: [15889.329962] usb 1-4: GSM modem (1-port) converter now attached to ttyUSB0
Jan 4 20:29:56 smiki-AOD257 kernel: [15889.330304] option 1-4:1.1: GSM modem (1-port) converter detected
Jan 4 20:29:56 smiki-AOD257 kernel: [15889.330705] usb 1-4: GSM modem (1-port) converter now attached to ttyUSB1
Jan 4 20:29:56 smiki-AOD257 kernel: [15889.331373] scsi22 : usb-storage 1-4:1.2
Jan 4 20:29:56 smiki-AOD257 kernel: [15889.332585] option 1-4:1.3: GSM modem (1-port) converter detected
Jan 4 20:29:56 smiki-AOD257 kernel: [15889.333078] usb 1-4: GSM modem (1-port) converter now attached to ttyUSB2
Jan 4 20:29:56 smiki-AOD257 mtp-probe: bus: 1, device: 20 was not an MTP device
Jan 4 20:29:56 smiki-AOD257 modem-manager[11327]: <info> (ttyUSB0) opening serial port...
Jan 4 20:29:56 smiki-AOD257 modem-manager[11327]: <info> (ttyUSB2) opening serial port...
Jan 4 20:29:56 smiki-AOD257 modem-manager[11327]: <info> (ttyUSB1) opening serial port...
Jan 4 20:29:57 smiki-AOD257 kernel: [15890.337033] scsi 22:0:0:0: Direct-Access ZTE MMC Storage 2.31 PQ: 0 ANSI: 2
Jan 4 20:29:57 smiki-AOD257 usb_modeswitch: switched to 19d2:0031 (ZTE,Incorporated: ZTE Configuration)
Jan 4 20:29:57 smiki-AOD257 kernel: [15890.557525] sd 22:0:0:0: Attached scsi generic sg2 type 0
Jan 4 20:29:57 smiki-AOD257 kernel: [15890.565528] sd 22:0:0:0: [sdc] Attached SCSI removable disk
Jan 4 20:29:58 smiki-AOD257 usb_modeswitch[11343]: usb_modeswitch: adding device ID 19d2:0031 to driver option
Jan 4 20:30:11 smiki-AOD257 modem-manager[11327]: <info> (ttyUSB2) closing serial port...
Jan 4 20:30:11 smiki-AOD257 modem-manager[11327]: <info> (ttyUSB2) serial port closed
Jan 4 20:30:11 smiki-AOD257 modem-manager[11327]: <info> (ttyUSB2) opening serial port...
Jan 4 20:30:16 smiki-AOD257 modem-manager[11327]: <info> (ttyUSB1) closing serial port...
Jan 4 20:30...

Read more...

Revision history for this message
smiki (micouk) wrote :
Download full text (6.5 KiB)

I found a workaround. I have installed the package "comgt".
If I plug in the modem, let it settle, then run comgt in a command line, it asks for the PIN and it registers in the network (also switches the LED from red to blue)
then if i restart networmanager (and wait for ~30seconds) I can enable the mobile broadband and connect using the network manager applet.

smiki@smiki-AOD257:/var/log$ comgt
Trying list of devices

Enter PIN number: XXXX
Waiting for Registration..(120 sec max)..
Registered on Home network:
Failed to register
smiki@smiki-AOD257:/var/log$ sudo /etc/init.d/modemmanager restart
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service modemmanager restart

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) and then start(8) utilities,
e.g. stop modemmanager ; start modemmanager. The restart(8) utility is also available.
modemmanager stop/waiting
modemmanager start/running, process 11425
smiki@smiki-AOD257:/var/log$

syslog output after modemmanager restart (the comgt does not spit out anything to the logs):

Jan 4 20:40:41 smiki-AOD257 modem-manager[11327]: <info> Caught signal 15, shutting down...
Jan 4 20:40:41 smiki-AOD257 modem-manager[11327]: marshal_object: assertion `g_variant_is_object_path (path)' failed
Jan 4 20:40:41 smiki-AOD257 modem-manager[11327]: failed to marshal parameter 1 for signal DeviceRemoved
Jan 4 20:40:41 smiki-AOD257 NetworkManager[677]: <info> the modem manager disappeared
Jan 4 20:40:41 smiki-AOD257 NetworkManager[677]: <info> trying to start the modem manager...
Jan 4 20:40:41 smiki-AOD257 modem-manager[11425]: <info> ModemManager (version 0.5) starting...
Jan 4 20:40:41 smiki-AOD257 dbus[625]: [system] Activating service name='org.freedesktop.ModemManager' (using servicehelper)
Jan 4 20:40:41 smiki-AOD257 modem-manager[11427]: <info> ModemManager (version 0.5) starting...
Jan 4 20:40:41 smiki-AOD257 dbus[625]: [system] Successfully activated service 'org.freedesktop.ModemManager'
Jan 4 20:40:41 smiki-AOD257 modem-manager[11425]: <info> Loaded plugin Longcheer
Jan 4 20:40:41 smiki-AOD257 modem-manager[11425]: <info> Loaded plugin MotoC
Jan 4 20:40:41 smiki-AOD257 NetworkManager[677]: <info> modem-manager is now available
Jan 4 20:40:41 smiki-AOD257 modem-manager[11425]: <info> Loaded plugin X22X
Jan 4 20:40:41 smiki-AOD257 modem-manager[11425]: <info> Loaded plugin Option High-Speed
Jan 4 20:40:41 smiki-AOD257 modem-manager[11425]: <info> Loaded plugin Novatel
Jan 4 20:40:41 smiki-AOD257 modem-manager[11425]: <info> Loaded plugin Sierra
Jan 4 20:40:41 smiki-AOD257 modem-manager[11425]: <info> Loaded plugin Option
Jan 4 20:40:41 smiki-AOD257 modem-manager[11425]: <info> Loaded plugin Nokia
Jan 4 20:40:41 smiki-AOD257 modem-manager[11425]: <info> Loaded plugin Generic
Jan 4 20:40:41 smiki-AOD257 modem-manager[11425]: <info> Loaded plugin Ericsson MBM
Jan 4 20:40:41 smiki-AOD257 modem-manager[11425]: <info> Loaded plugin ZTE
Jan 4 20:40:41 smiki-AOD257 modem-manager[11425]: <info> Loaded plugin Samsung
Jan 4 20:40:41 smiki-AOD257 modem-manager[11425]: <info> ...

Read more...

Revision history for this message
dreamon (dreamon) wrote :

I have the same problem with this usb modem. The stick used to work fine from Lucid to Maverick, but stopped working in Oneiric. Although I got the modem to work eventually using smiki's workaround (comgt and restart of network manager), this is a really inconvenient solution. Frankly, I don't understand why this is happening in the first place.

I have attached my dmesg output after connecting the stick. The small led lights up and, according to lsusb, is attached in modem mode: Bus 001 Device 005: ID 19d2:0031 ONDA Communication S.p.A. ZTE MF110/MF636
It is not recognised as a network device, however, and network manager does not offer an option to connect to a mobile broadband network.

Please let me know if I can supply further information. I'd love to see this fixed.

Revision history for this message
Josua Dietze (digidietze) wrote :

As far as I can see, these problems are related to modem-manager, not usb_modeswitch.

affects: usb-modeswitch-data (Ubuntu) → network-manager (Ubuntu)
Changed in network-manager (Ubuntu):
status: Incomplete → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in modemmanager (Ubuntu):
status: New → Confirmed
affects: network-manager (Ubuntu) → modemmanager (Ubuntu)
Revision history for this message
Josua Dietze (digidietze) wrote :

Sorry, Mathieu, I tried entering "modem-manager" which was not accepted. Darned hyphens ! :-)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in modemmanager (Ubuntu):
status: New → Confirmed
Revision history for this message
dreamon (dreamon) wrote :

While the comgt workaround does not seem to work anymore on 12.04, deactivating the PIN on my SIM card did the trick this time. After turning off the PIN and attaching the modem, it takes network manager a few seconds to find the new interface. I can then select "Enable Mobile Broadband" and connect to a mobile 3G network, however.

Not sure what the problem here is, as SIM cards with PINs used to work fine on Lucid and Maverick (and Natty, I believe). But for now at least we have another workaround :-)

Revision history for this message
smiki (micouk) wrote :

dreamon, how did you disabled the PIN? Is there a way to do in from ubuntu or you have to use an external device (mobile phone?)

Also I believe that one to be able to disable PIN, the SIM card must allow to do that. I do have SIM cards where turning off the PIN security is not possible, so this workaround won't help there.

Revision history for this message
dreamon (dreamon) wrote :

smiki -- I am not sure if there is a way to deactivate the PIN from Ubuntu. I did indeed use an old mobile phone :-)
I wasn't aware that there are SIMs where the PIN cannot be deactivated. You're right, I am afraid the workaround won't help there.

On a side note: I read about using "gnome-ppp" and "wvdial" to work with USB 3G modems a little while ago, but haven't tried it myself. Perhaps that would be another avenue to explore ...

Revision history for this message
Robajz.info (robert-sevcik) wrote :

Hi, I've got kubuntu 12.04 (precise) and a 3G EV-DO (or CDMA 2000) dongle, the ZTE AC581. I have no PIN and actually no SIM card. The device itself is registered with Ethio telecom.

The CD mode IDs: 0x19d2:0x0026
The Modem mode IDs: 0x19d2:0x0094

It used to work with some glitches (had to connect it a few time to have it detected) before in Kubuntu 11.10 (oneiric) but now it fails in both. I guess either new updates broke it or my dongle got even more wicked.

As you mentioned restarting the modem-manager, I gave it a go and surprise surprise, all came smiling at me on-line.

The sole fix for me was:
$ sudo killall modem-manager

After this, I could see in syslog, that ttyUSBx devices were being recognized as CDMA modem by the modem-manager. Before that, modem-manager was silent.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.