Getting the Internet on your laptop while on the move
The process of getting a mobile phone to work as a broadband modem in Linux is less painful than I expected it to be. Provided a few requirements are met, the whole thing is really quite easy. It took a bit of searching around on the Internet and I had to take information in from multiple sources to get it all working, so I thought I'd simply compile what I'd found and put up a page where it was all in one place.
Note that the following method worked not only for my Nokia N95, but also for my Motorola RAZR V3. There are other phones I could try here (a Nokia 6280 and an N73 too, soon) but I don't yet have the required cable to connect them to the computer. I'll be visiting my father in France in August and I'll be able to pick up the CA-53 cable that came with my 6280 then. The same cable will work for the N73 and I'll be able to report back. I'm fully expecting this to work with pretty much all phones that can be connected to a computer's USB port and that can be used as mobile broadband modems. See at the bottom of this page for a list of devices on which I have tested this method and found it to work.
Obviously you need a mobile phone that you know can be used as a modem when connected to your computer. You need a free USB port on the computer and you need the right kind of cable to connect the two together. The N95 and RAZR V3 both have bog standard mini-USB sockets on them so a straightforward USB type A to mini-USB cable is perfect for the job. The 6280 and N73 both have Nokia's proprietary "pop-port" connection and therefore require a Nokia-specific cable.
You'll need pppd version 2.4.0 or later to establish the connection, and you'll need software to chat to pppd and set up network routing correctly once pppd has done that. There are several packages that will do this for you, the most widespread being wvdial and the GUI application that ships with the KDE desktop environment, kppp. I'll be using the latter. You'll also need "USB Modem" support in the kernel, either built-in or as a module (acm.o for 2.4.x kernels, cdc-acm.ko for 2.6.x kernels).
You need to have packet data service from your mobile network operator. As always with these people, you must read the fine print on your contract to know exactly how much this is going to cost you, and even then it still isn't always clear. If in doubt, call customer service and ask them exactly how high their data charges are. Unless you're in the stone age and still using CSD to access the Internet (in which case this howto won't work for you anyway) you'll be using at least GPRS, if not UMTS (3G) or HSDPA (3.5G), and you will be billed per kilobyte of data transferred (received and sent!). If you intend to use this frequently then you might want to ask your operator for a data plan. For my part, I use T-Mobile's "web'n'walk" service, which gets me 1GB of data per month for £7.50. You're not supposed to use it to connect a computer to the Internet but it still works anyway. This said, I do intend to upgrade the data plan to "web'n'walk plus", which gets me 3GB per month for £12.50 and does allow me to use my phone as a modem.
Also beware of using data while roaming. Almost always, it is billed on top of your contract and at an extortionate rate. Be prepared to pay anything up to £7.50, even £12.00, per megabyte of data transferred. The cost is horrendous.
The first thing to do is to find out where your phone is within the device hierarchy. Most Nokia phones can connect to a USB host in several modes. The one you want to use here is "PC-Suite" mode. If your phone doesn't ask you which mode to use then go into its settings and make sure you haven't told it to connect in a specific mode without asking you. On the other hand, if your model of phone doesn't provide more than one connection mode then the one it does provide is almost bound to be the right one.
Plug the phone in and follow what happens in /var/log/messages. I get something like this:Jul 11 08:38:43 dragonfly kernel: usb 1-2: new full speed USB device using uhci_hcd and address 3 Jul 11 08:38:43 dragonfly kernel: usb 1-2: configuration #1 chosen from 1 choice Jul 11 08:38:43 dragonfly kernel: cdc_acm 1-2:1.10: ttyACM0: USB ACM device
The part I highlighted, ttyACM0, is the device as which the phone is recognized. Its location in the filesystem will be /dev/ttyACM0 or /dev/usb/ttyACM0 depending on the distribution you're using. There is no set rule, you'll just have to poke around in your /dev directory to see what there is. In my case (Slackware 12.0) it's /dev/ttyACM0.# ls -ls /dev/ttyACM0 0 crw-rw---- 1 root uucp 166, 0 2008-07-11 09:09 /dev/ttyACM0
Note the permissions on this device. Only root and members of the uucp group can access this device so make sure the normal user as which you log in is a member of uucp.
Next, fire up kppp and click on its "Configure..." button in order to define the access point. A window like this will appear:
Click on the "Modems" tab and then on the "New..." button in order to define a new modem for use on the system. Fill in as per this screenshot:
The "Modem name" can be pretty much what you want. Its purpose is merely to remind you what physical device you expect kppp to use to dial into the Internet. The "Modem device" should be the device node where you ascertained the mobile phone was connected to earlier, /dev/ttyACM0 in my case. Obviously substitute as necessary if the device node is different on your system. Click on "OK" to save.
Now go back into the "Accounts" tab of kppp's main configuration window and click on "New..." to define a new account. When prompted whether to use the wizard or do it manually, opt for the manual configuration. Something like this will appear:
Fill in the name you want to give this account in the "Connection name" text input. Then click on the "Add..." button to the right in order to add the number *99# to the list of numbers to dial. That's all there is to it! Now click on "OK" and prepare to connect to the Internet using your phone as a USB broadband modem:
The label in the "Connect to:" drop-down list is the name you gave the account above. The login ID and password vary from one operator to another, but this is what I've managed to find so far:
Operator: Login ID: Password: T-Mobile UK t-mobile one2one O2 UK mobileweb password Vodafone UK web web Orange UK user pass Orange France orange orange
Now click on the "Connect" button and enjoy (comparative) high speed Internet through your mobile phone.
The speed you get out of it will vary depending on coverage and your mobile network operator's policy. O2, for example, caps 3G access at 128kbps, which is pretty pointless. Without that, the theoretical maximum you can get from a 3G connection is 384kbps. If you're not one of the lucky ones to have 3G coverage, GPRS will give you speeds comparable to a single ISDN channel (64kbps).
Here's a list of devices on which I've tested the method described here and found it to work:
RAZR V3 (GPRS only)
6280, N73 (GPRS, EDGE, 3G)
N95, N96, 5800 XpressMusic (GPRS, EDGE, 3G HSDPA)
Powered by Apache / Slackware Linux
Last update: 10-APR-2009 20:42:14 UTC
This page has been served 13818 times since 11-JUL-2008