How to access the Internet using a cell phone as a bluetooth modem with Ubuntu Laptop

ubun7u_vect0rizedThis is a (long overdue) follow up on my ancient post on how to setup a Nokia E62 as a bluetooth modem on a Windows laptop. It's been a couple of years now since I've purged the Winblows partition from my Dell Inspiron 1501 and it's been happily running Ubuntu using the E62 to get to the Internets. Just got a Dell Mini 10 for work, so might as well post the steps while they're still fresh in memory (my RAM gets regularly purged, as it turns out).

Requirements: Any bluetooth enabled laptop and cellular phone should do, however, the steps below have been verified to work with Ubuntu 8.10 and 9.04 running on Dell Inspiron 1501 and Dell Mini 10. The phone used was Nokia E62.

I've already covered enabling bluetooth and connecting the two devices, so I'll jump right into the bluetooth config. First, let's install some software:

# aptitude install bluez-gnome bluez-utils wvdial

Identify the MAC address of your phone and channel used for Dial-Up Networking:

# hcitool scan
Scanning ...
00:18:C5:2A:xx:xx	E62
# sdptool browse 00:18:C5:2A:xx:xx | grep -A10 "Dial-Up Networking" | grep Channel
Channel: 1

Then enter the values. Below are mine, edit to fit your configuration.

My rfcomm config:

# cat /etc/bluetooth/rfcomm.conf
rfcomm0 {
bind yes;
device 00:18:C5:2A:xx:xx;
channel 1;
comment "Dial-up networking";
}

My wvdial config:

# cat /etc/wvdial.conf
[Dialer Defaults]
Phone =
Username =
Password =
New PPPD = yes
[Dialer E62]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=, ,"wap.cingular"
Modem = /dev/rfcomm0
Phone = *99***1#
Username = WAP@CINGULARGPRS.COM
Password = CINGULAR1
New PPPD = yes
BAUD = 460800
Stupid Mode = 1

Restart bluetooth:

# /etc/init.d/bluetooth restart

Now let's attempt to connect:

# wvdial E62

If all is well, you should see something like:

--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: AT+CGDCONT=, ,"wap.cingular"
AT+CGDCONT=, ,"wap.cingular"
OK
--> Modem initialized.
--> Sending: ATDT*99***1#
--> Waiting for carrier.
ATDT*99***1#
CONNECT
~[7f]}#@!}!} } }2}#}$@#}!}$}%\}"}&} }*} } g}%~
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Sun Oct 11 21:22:26 2009
--> Pid of pppd: 20902
--> Using interface ppp0
--> pppd: ��?[08]
--> pppd: ��?[08]
--> pppd: ��?[08]
--> pppd: ��?[08]
--> pppd: ��?[08]
--> local  IP address 10.84.103.246
--> pppd: ��?[08]
--> remote IP address 10.6.6.6
--> pppd: ��?[08]
--> primary   DNS address 172.18.7.170
--> pppd: ��?[08]
--> secondary DNS address 172.18.7.170
--> pppd: ��?[08]

"Ifconfig" should show you a ppp0 device with an IP address and you should be able to access the Internet.

To disconnect, hit CTRL+C:

Caught signal 2:  Attempting to exit gracefully...
--> Terminating on signal 15
--> pppd: ��?[08]
--> Connect time 0.9 minutes.
--> pppd: ��?[08]
--> pppd: ��?[08]
--> pppd: ��?[08]
--> Disconnecting at Sun Oct 11 21:23:23 2009

The end.

Leave a comment

NOTE: Enclose quotes in <blockquote></blockquote>. Enclose code in <pre lang="LANG"></pre> (where LANG is one of these).