Taming the MTNL "Jadoo" 3G USB dongle

Update: Newer drivers have added the device ID of the LW272 and LW273, so the antics below should no longer be required. The real issue is why you'd ever want to use an MTNL "Jadoo" dongle. Frequent disconnections and being permanently capped at GPRS or EDGE with no mirage of 3G/HSDPA in sight, will be your unhappy lot.

MTNL supplies a Teracom LW272 (vendor 230d, device 0001 or 0003) or LW273 USB dongle. These are USB devices that change their device type. When you plug them in, they first pretend to be a USB CDROM with drivers on them. Once you install the drivers, the drivers are supposed to do a USB "mode switch" which then turns the gadget into a USB modem. (To confuse the situation further, the dongle lets you plug in a MicroSD card and exports a third USB storage device. But we can ignore that here.)

Unsuprisingly, the Linux community discovered USB mode switching by snooping on the USB line in a Windows installation, and reverse engineered the protocol. Meanwhile, MTNL's dongle provides a "Linux" driver but it does more damage than good:

Overall, not a good idea to install MTNL's driver. Meanwhile, with one small package and four lines of edits in /etc, Debian or Ubuntu will do fine with NetworkManager or wvdial. You will not see the CDROM automount any more. No crashes either.

Note, the steps below were tested for device 0003, on Debian Squeeze and Ubuntu Lucid. Your mileage (and bills) may vary.

Install and test usb-modeswitch

On Debian Squeeze, the stock install of usb-modeswitch is version 1.1.4+ and will work. On Ubuntu Lucid the stock version (1.1.0-2) will not work, at least not with device 0003. You need to uninstall the stock version and install from source (version 1.1.9 at the time of writing this document). Plug in the gadget and wait until the "CDROM" automounts. Then unmount the CDROM. Finally, issue this command

# usb_modeswitch -v 230d -p 0003 -u 3
and check that devices /dev/ttyACM0 and /dev/ttyACM1 have appeared. If this works, complete the following steps.

Edit /lib/udev/rules.d/40-usb_modeswitch.rules

Check that your vendor and product IDs are not already listed, and just after the line LABEL="modeswitch_rules_begin" add these lines:

# Teracom LW272
ATTRS{idVendor}=="230d", ATTRS{idProduct}=="0003", RUN+="usb_modeswitch '%b/%k'"

Create file /etc/usb_modeswitch.d/230d:0003


Reboot or restart udev to finish up.

Configure NetworkManager

All choices are from what Debian/Ubuntu offer you. If the signal is weak and you are getting GPRS or EDGE connections instead of 3G HSDPA connections, you may try to lock to HSDPA in NetworkManager, but then you might fail to connect at all. After the mild gymnastics above (takes five minutes) my experience with bandwidth was fairly good in Powai (but the point of buying it was to use it on the road which is yet untested). I could download at about 2.5Mb/s and upload at over 200kb/s. I am paying only 99 INR/mo plus usage, which sure beats my old Vodafone GPRS data plan at 199 INR/mo plus usage. Between 2007 and 2010, Vodafone GPRS was almost always unusable in Powai, in Kolkata, and in Bengaluru.