Get mobile broadband on your Linux laptop

The LED glows blue when it has a 3G connection and green when it drops to GPRS. These devices get very hot in use; this is indicative of the power they draw, so expect battery life to suffer when working online.

Novatel MC950D

This modem requires the option kernel driver. Yes, there really is a kernel module called option, as opposed to module options – no scope for confusion there then. If you're using a standard distro kernel, this should already be present but if you roll your own kernels, make sure you enable the option option, and make it a module, not built in.

In common with the Huawei devices, this modem appears to the system as a USB CD-ROM drive when you first connect it. The idea is that when you plug it into your Windows laptop, the 'CD-ROM' autoruns and installs the drivers. After that, the presence of the drivers means that the device appears as a modem instead. On Linux, there are no drivers to be installed, as they are part of the kernel, but the modem device does not appear until the CD-ROM has gone away.

If you run lsusb after connecting this modem, you'll see a single entry for it with an ID of 1410:5010 – that's the CD-ROM. If you then eject this CD, either by using whatever method your desktop offers or by running eject /dev/cdrom (or wherever this pseudo-CD appears) the lsusb output changes, the old ID disappears and a new one shows up – 1410:4400. At this point, dmesg should show the option and usbserial modules being loaded and a new device appearing, /dev/ttyUSB0.

Having to manually eject the storage part of the device in order to make the modem to appear becomes a chore after a while, but the Novatel modem has different USB IDs for its two sides, and we can block one with a simple udev rule. Add one of these lines to /etc/udev/rules.d/10-local.rules, creating the file if it doesn't exist

ATTRS{idVendor}=="1410", ATTRS{idProduct}=="5010"
ATTRS{idVendor}=="1410", ATTRS{idProduct}=="5010"
ACTION=="add",RUN+="/usr/bin/eject %k"

The first is preferable, if it works on your device, as it completely ignores the device. The second option forces an eject as soon as it appears. Use lsusb to determine the correct IDs.

One the CD-ROM disappears, a new device appears, /dev/ttyUSB0 (the number may change if you have another usbserial device connected, such as a Palm). Now you can treat the modem as you would a dialup modem and use your favourite PPP program to connect. For example, in KPPP, create a new modem, set the device to /dev/ttyUSB0, flow control to 'hardware' and the modem initialisation string to 'ATZ'.

A web search turns up various init strings; AT&FE0V1X1&D2&C1S0=0 was a favourite, and you can try it is you wish, but a plain ATZ that sets the modem to its defaults works as well as anything else here. You can set the speed to either 460800 or 921600, but it made no difference to download speeds. Remember this is not really a serial modem, even though you are treating it as such.

Then create (should that be Kreate?) an account in KPPP, set the phone number to *99***1# and authentication to PAP/CHAP. The username and password can be set to anything you like – we used "web" for both. Authentication is provided by the SIM card in the modem, so you can leave everything else at the defaults. Press Connect and your modem should be online in a few seconds.