Tibor's Musings

USB 3G Modem Tips

Recently I got to use a T-Mobile SK USB 3G Mobile Broadband Modem device (ZTE MF190). Here are notes on how to make it work in GNU/Linux.

Prerequisites

$ sudo aptitude install lsusb usb-modeswitch

Switching the device from USB storage mode to USB modem mode

When the given T-Mobile USB 3G dongle (ZTE MF190) was plugged, it was mounted as a USB storage device with Debian GNU/Linux "Wheezy" defaults. It was not recognised as a USB modem by default. So we need to switch it.

In dmesg system logs, spotted idVendor and idProduct parameters when mounted as a storage device:

[  112.955608] usb 2-1.1: new high speed USB device number 3 using ehci_hcd
[  113.049919] usb 2-1.1: New USB device found, idVendor=19d2, idProduct=2000
[  113.049925] usb 2-1.1: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[  113.049930] usb 2-1.1: Product: ZTE WCDMA Technologies MSM
[  113.049934] usb 2-1.1: Manufacturer: ZTE,Incorporated

Verified via lsusb:

$ sudo lsusb -vvv
Bus 002 Device 003: ID 19d2:2000 ONDA Communication S.p.A. ZTE MF627/MF628/MF628+/MF636+ HSDPA/HSUPA
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x19d2 ONDA Communication S.p.A.
  idProduct          0x2000 ZTE MF627/MF628/MF628+/MF636+ HSDPA/HSUPA
  bcdDevice            0.00
  iManufacturer           3 ZTE,Incorporated
  iProduct                2 ZTE WCDMA Technologies MSM
  iSerial                 4 MF1900TMOD010000
  bNumConfigurations      1

This differs from default usb-modeswitch configurations for ZTE MF190 devices that have the following product IDs:

$ grep -C2 MF190 /lib/udev/rules.d/40-usb_modeswitch.rules
# ZTE MF190 (Variant)
ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="0149", RUN+="usb_modeswitch '%b/%k'"

# ZTE MF190
ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="1224", RUN+="usb_modeswitch '%b/%k'"

So I cloned one:

$ cd /etc/usb_modeswitch.d
$ tar xzf /usr/share/usb_modeswitch/configPack.tar.gz 19d2:0149
$ cp 19d2\:0149 19d2\:2000
$ vim 19d2\:2000
$ diff 19d2\:0149 19d2\:2000
2c2
< # ZTE MF190 (Variant)
---
> # ZTE MF190 (T-Mobile SK, Tibor/2011-12-22)
5c5
< DefaultProduct=0x0149
---
> DefaultProduct=0x2000

Now if the device is plugged and if it is mounted as a USB storage device, after the mounted device is ejected e.g. in nautilus, and after an additional wait for about 30 seconds, the usb_modeswitch will kick in and will switch the device from the USB storage mode to the USB modem mode, and we are good to go.

Connecting to 3G network

Now one can enable Mobile Broadband connection in nm-applet and configure the connection there.

unix