Get mobile broadband on your Linux laptop
How to set up services from O2, T-Mobile and Vodafone
This will work with any modem that uses the option driver, or you could tie it to a specific modem by using idVendor and idProduct matches. Details of how to write udev rules are beyond the scope of this article, but you can find detailed information on the topic at www.reactivated.net/udevrules.php.
Software requirements
There isn't any specific software needed to use mobile broadband beyond the driver, which is usually included with the Linux kernel, and one of the PPP dialler programs, all of which use the standard pppd software to handle the connection.
If you want to monitor the status and throughput of the connection, one of the many system monitoring tools will do the job. We use Gkrellm for this, as it keeps everything in one fairly small window, but any network monitoring tool will do the job. Some of the dialler programs also include an option to display connection information.
As bandwidth is limited according to the package you buy and charges for exceeding this can vary from zero (although speed is reduced) to £10 per gigabyte, it makes sense to keep an eye on overall throughput. A useful program for this is vnstat, which collects information from each interface via an hourly Cron job. After you've initialised the program with
vnstat --update --interface ppp0
it will keep track of your upload and download usage. You can get a report at any time with
vnstat --months --interface ppp0
which shows a monthly report of your traffic. Replace --months with --weeks, --days or --hours for shorter-term reports. Because this relies on a Cron task running every hour to record the stats, it is not 100% accurate, as when the modem is disconnected, the ppp0 interface disappears, so any traffic since the last update is not recorded. However, it can still give you a good guideline.
Get daily insight, inspiration and deals in your inbox
Sign up for breaking news, reviews, opinion, top tech deals, and more.
You could improve the accuracy by shortening the interval at which the Cron task is run to, say, ten minutes. The providers generally have some way of checking your network usage on their website, but it is convenient to be able to make a quick, albeit somewhat rough, check without using up any more of your precious bandwidth in the process.
All of the modems come with drivers and utility software for Windows. Linux drivers are not needed as they are part of the kernel, but what about utility software? The only company to provide software for Linux is Vodafone, with its succinctly named vodafone-mobile-connectcard- driver-for-linux package, which we will refer to as vmc from here on to save on trees.
Despite the name, vmc works with any of the modems and providers. You can download vmc from https://forge.betavine.net/projects/vodafonemobilec by following the Files link on that page.
Installation is a little involved, mainly because of the number of dependencies brought about by its use of the Python Twisted framework. There are packages for a number of distros available from www.betavine.net/bvportal/web/linux_drivers but these are slightly older. The first link has the latest version. The instructions given with this are for Ubuntu only, but should work with most other distros, although some will need to drop the use of sudo and use a root terminal instead.
The first step is to make sure these packages are installed
python-dbus
python-twisted
python-serial
python-glade2
python-pysqlite2
wvdial
python-notify
python-gnome2
python-gnome2-extras
python-serial
hal
python-tz
python-setuptools
These packages are desirable but not necessary
bluez-gnome
python-gnome2-desktop
If you are happy using the command line, the quickest way to make sure everything is installed is with a single command. Take a deep breath:
sudo apt-get install python-dbus python-twisted python-serial python-glade2 python-pysqlite2 wvdial python-notify pythongnome2 python-gnome2-extras python-serial hal python-tz python-setuptools bluez-gnome python-gnome2-desktop