Connect to the Internet from Anywhere Using a GPRS Connection and Ubuntu

How to connect your Ubuntu machine to the Internet through a GRPS connection.

By on March 29th, 2007 12:40 GMT
This article will explain how to connect your laptop or desktop to the Internet using your (Nokia) mobile phone GPRS connection while running Ubuntu as the operating system. You may ask yourself, 'Why on earth would I want to use the phone's 5kB/s connection when I have a broadband line at home?”. Well, it's quite obvious: you can't use the broadband line unless you're at home. When you're on the road and need an Internet connection, you'll be able to use the one provided by the mobile phone. Or, you may find yourself in a situation when you desperately need an Internet connection and your shiny new broadband connection has broke down. Then again, you can use the mobile phone's connection as a backup line.

I've tested both connection methods (DKU USB Cable and Bluetooth) on a Nokia 6230i. This guide *should* work with at least all Nokia phones, if not with all GPRS-capable phones.

This is what you need:

• a laptop or a desktop computer
• a (Nokia) mobile phone with GPRS support and settings installed. If you have browsed the web from your mobile phone, you're good to go, otherwise call your mobile operator and request the GRPS settings for your phone.
• a USB cable to connect your mobile phone to the laptop or PC
OR
• a bluetooth-capable mobile phone and a bluetooth USB device (if the laptop doesn't have bluetooth incorporated)
• a few software packages which you'll need to search and install through Synaptic. Make sure you have the Universe repository enabled first.

USB CABLE CONNECTON

1. Plug-in the USB cable between the computer and phone. Then, open a terminal and type:
code
tail /var/log/messages

You should see something like:
code
Mar 29 11:12:09 ubuntix kernel: [17179948.372000] cdc_acm 1-1:1.1: ttyACM0: USB ACM device
Mar 29 11:12:09 ubuntix kernel: [17179948.380000] usbcore: registered new driver cdc_acm
Mar 29 11:12:09 ubuntix kernel: [17179948.380000] drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control Model driver for USB modems and ISDN adapters

2. Open Synaptic package manager and install the gnome-ppp package.

3. Open Gnome PPP manager using the shortcut under Internet in Gnome menu.

4. Once opened, click Setup and select the device found when you plugged-in the phone (/dev/ttyACM0 in my case). You could also try the Autodetect button.
Review image
5. Also from the Modem section, click the Init string button and edit the third init string as in the screenshot below. Keep in mind that you should use the settings provided by your GSM operator.
Review image
6. Close both dialogs, enter username and password (again, provided by your GMS operator) and press connect. If everything is correct, you should be connected to the Internet.
Review image
BLUETOOTH CONNECTON

If your laptop has an incorporated bluetooth adaptor and so does your phone, you could try the following to connect your computer to the Internet through the phone's GPRS connection:

1. Open Synaptic and install the following packages:
• bluez-utils
• bluez-passkey-gnome
• gnome-bluetooth
• bluez-pin*

2. Turn your phone's BT connection and set its visibility to 'Show to all' or equivalent.

3. Open a terminal and type:
code
hcitool scan

You should see something like:
code
Scanning ...
00:0E:07:37:7C:BD 6230i

4. Open /etc/bluetooth/hcid.conf in a text editor and set:
• autoinit yes
• security auto
• pairing multi
• passkey whatever-you-want

5. Open /etc/bluetooth/rfcomm.conf in a text editor and add:
code
rfcomm0 {

device 00:13:FD:8E:D7:53;
channel 1;
comment "Whatever";

}

IMPORTANT!: Replace the device ID in the example with the one found by your hcitool. Also, replace the channel number with the one found while typing this command (same thing abut the ID, replace it with yours):
code
sdptool search --bdaddr 00:13:FD:8E:D7:53 DUN

6. Restart bluetooth:
code
sudo /etc/init.d/bluetooth restart

7. Create the rfcomm0 device:
code
sudo rfcomm bind /dev/rfcomm0 00:13:FD:8E:D7:53 1

8. On the computer, press Alt+F2 for the run command dialog, type bt-applet and press enter.

9. On your mobile phone, from the bluetooth settings, search for new devices and choose to pair with the computer. Enter a passkey.

10. You will be then prompted for the same passkey, on the computer, by the bt-applet ran earlier.
Review image
11. Now open the same Gnome PPP Manager, go to Setup and manually type the rfcomm device.
Review image
12. Press Close and Connect. You will be prompted on your phone whether to connect with the computer, accept it, and you should be connected to the Internet through bluetooth.

7 Comments