If you have a 3g mobile phone you can use it as a modem for your bluetooth enabled linux laptop, this is called tethering. There are a good number of articles out there on the interweb that describes how to set this up. I used a couple of different ones to gather the info I needed to get things up and running, most notably a swedish guide and a list of operator wvdial configs. I use Ubuntu myself but the tools are common linux tools and so this guide should be valid for other distros as well.
[update 2009-11-07] Verified applicable for Ubuntu 9.11 Karmic Koala as well as 9.04 Jaunty Jackalope. Notably the rfcomm device node was lost in the (upgrade) process from 9.04 to 9.11 on my acer aspire one.
make sure you have hcitool, sdptool and wvdial installed.
Scan the air for your mobile phone by executing:
hcitool scan
the result will look something like this:
00:1D:FD:74:C2:15 Jens's NOKIA N82
(The ID and name will be different for your phone)
Find the channel to be used when communicating with your phone, execute the following command (replace the ID with yours):
sdptool browse 00:1D:FD:74:C2:15 DUN
This will printout a list of all the services your particular phone supports. We are interested in the one named Service Name: Dial-up Networking. Under “Protocol Descriptor List:” and “RFCOMM”, there should be a number after the “Channel” paragraph. Remember that number for the following steps.
Create the rfcomm device node by executing the following command:
sudo rfcomm bind 0 00:1D:FD:74:C2:15 5
Where the last argument is the channel number.
As root, edit /etc/bluetooth/rfcomm.conf add the following (remember to replace the example ID below with your actual ID):
rfcomm0 {
bind yes;
device 00:1D:FD:74:C2:15;
channel 5;
comment "Bluetooth PPP Connection";
}
Restart bluetooth:
sudo /etc/init.d/bluetooth restart
If you have not paired together your phone and computer before, now is the time to do it. How to do that varies between models but is most likely described in the manual for your phone.
As root, edit /etc/wvdial.conf. This is where we add the commands that will connect you to the cloud. The commands are phone model dependent, the commands below works with my Swedish Tele2 account on my Nokia N82.
[Dialer Tele2] Init2 = ATZ Init3 = ATE0V1&D2&C1S0=0+IFC=2,2 Stupid Mode = 1 Modem TYPE = Analog Modem ISDN = 0 Phone = *99# Init5 = AT+CGDCONT=1,"IP","internet.tele2.se"; Modem = /dev/ttyUSB0 username = username Dial Command = ATDT password = passwordBaud = 460800
Commands for other accounts can be found here
To connect, execute the command below as root.
sudo wvdial [Tele2]
The name within the square brackets is the new you give your wvdial config. If you name it [Dialer Defaults] you wont have to specify a name when connecting.
Gracefully end your session by hitting ctrl-c
Happy surfing!