Nokia E51 as Bluetooth GSM modem on Ubuntu Gutsy Gibbon


update@03/07/10:

For an updated how-to for connecting a Karmic Koala 9.10 install or newer to E51, go here

update@01/24/09:
The step below also works for for 8.04 (Hardy Heron), but won’t work on 8.10 (Intrepid Ibex) since Network Manager applet does n0t cooperate nicely with /etc/resolve and will refuse to recognize any DNS set by wvdial. Also please note that since wvdial connection is not recognized by network manager, some of the applications will report your pc being offline while you’re connected with wvdial. One way to solve these problems is to remove network manager altogether and manage your network interfaces by hand or use alternatives such as wi-fi radar.

Since I don’t have anything better to do, I decided to try using My Nokia E51 as modem via bluetooth. My bluetooth dongle is of some unknown vendor, but perfectly detected and configured on My Gutsy installation.

1. Enable Network Service
The dongle is already used for sending and receiving file “Bluetooth File Sharing”, so I need to enable “Network Service” on my bluetooth connection by right-clicking the bluetooth icon on my taskbar, click on preferences, click on “Service” tab, and tick “Network Service”

2. Setup connection between workstation and phone
pair the phone and workstation. On my E51, I select the pairing between the phone and the workstation as trusted, so that the connection will automatically be made. Next, right-click the bluetooth icon on my taskbar, click on preferences, select the first tab (named after your workstation bluetooth name), and choose “visible and connectable for other devices”. The phone should be available on “Bonded Devices” list. Click on the phone name, then click the “Set Trusted” button.

3. Setup rfcomm
Make sure that DUN is available by opening terminal, and type:

$sdptool search dun

The output should be similar to this:

ikhsan@M5mobile:~$ sdptool search dun
Inquiring …
Searching for dun on 00:1D:FD:EE:yy:xx
Service Name: Dial-Up Networking
Service RecHandle: 0×100a8
Service Class ID List:
“Dialup Networking” (0×1103)
Protocol Descriptor List:
“L2CAP” (0×0100)
“RFCOMM” (0×0003)
Channel: 4
Language Base Attr List:
code_ISO639: 0×454e
encoding: 0×6a
base_offset: 0×100
Profile Descriptor List:
“Dialup Networking” (0×1103)
Version: 0×0100

Jot down the MAC address and channel, edit the /etc/bluetooth/rfcomm.conf. As always, do not forget to to backup the original file first

$sudo cp /etc/bluetooth/rfcomm.conf /etc/bluetooth/rfcomm.conf.bk
$sudo nano /etc/bluetooth/rfcomm.conf

This is how my rfcomm.conf looks like:

#
# RFCOMM configuration file.
#

rfcomm0 {
# # Automatically bind the device at startup
bind yes;
#
# # Bluetooth address of the device
device 00:1D:FD:EE:xx:yy;
#
# # RFCOMM channel for the connection
channel 4;
#
# # Description of the connection
# comment “Nokia E51“;
}

Next, bind rfcomm0 to the phone by typing this:

$sudo rfcomm bind 0 00:1D:FD:EE:xx:yy 4

Restart bluetooth service

sudo /etc/init.d/bluetooth restart

4. Setup wvdial
Edit /etc/wvdial.conf :

$sudo nano /etc/wvdial.conf

This is how mine looks like, for Simpati Telkomsel:

[Dialer Defaults]
Phone =
Username =
Password =
New PPPD = yes
[Dialer e51]
Init1 =ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init7 = ATZ,”10.1.89.130″,”internet
Modem = /dev/rfcomm0
Phone = *99***1#
Baud = 460800
Username = “wap”
Password = “wap123″
Stupid Mode = 1

Some option might not necessary, but I put them up there anyway D The name of the dial connection is “e51

5. Start connection
To initialize connection, simply type:

$sudo wvdial e51

This the output in mine:

ikhsan@M5mobile:~$ sudo wvdial e51
[sudo] password for ikhsan:
WvDial<*1>: WvDial: Internet dialer version 1.56
WvModem<*1>: Cannot get information for serial port.
WvDial<*1>: Initializing modem.
WvDial<*1>: Sending: ATZ
WvDial Modem<*1>: ATZ
WvDial Modem<*1>: OK
WvDial<*1>: Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
WvDial Modem<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
WvDial Modem<*1>: OK
WvDial<*1>: Sending: ATZ,”10.1.89.130″,”internet”
WvDial Modem<*1>: ATZ,b [1d]10.1.89.130b 3,b [1d]internetb [1d]
WvDial Modem<*1>: OK
WvDial<*1>: Modem initialized.
WvDial<*1>: Sending: ATDT*99***1#
WvDial<*1>: Waiting for carrier.
WvDial Modem<*1>: ATDT*99***1#
WvDial Modem<*1>: CONNECT
WvDial Modem<*1>: ~[7f]}#@!}!} } }2}#}$@#}!}$}%\}”}&} }*} } g}%~
WvDial<*1>: Carrier detected. Starting PPP immediately.
WvDial<Notice>: Starting pppd at Fri Jun 13 01:21:43 2008
WvDial<Notice>: Pid of pppd: 31339
WvDial<*1>: Using interface ppp0
WvDial<*1>: pppd: [06][08] [06][08] [06][08]
WvDial<*1>: pppd: [06][08] [06][08] [06][08]
WvDial<*1>: pppd: [06][08] [06][08] [06][08]
WvDial<*1>: pppd: [06][08] [06][08] [06][08]
WvDial<*1>: pppd: [06][08] [06][08] [06][08]
WvDial<*1>: local IP address 221.132.235.244
WvDial<*1>: pppd: [06][08] [06][08] [06][08]
WvDial<*1>: remote IP address 10.6.6.6
WvDial<*1>: pppd: [06][08] [06][08] [06][08]
WvDial<*1>: primary DNS address 202.3.208.10
WvDial<*1>: pppd: [06][08] [06][08] [06][08]
WvDial<*1>: secondary DNS address 202.3.210.10
WvDial<*1>: pppd: [06][08] [06][08] [06][08]

If the connection successful, an additional network interface “ppp0″ should be created on your workstation, check with the following command

$ifconfig | grep ppp

the output should be similar to this:

ikhsan@M5mobile:~$ ifconfig | grep ppp
ppp0 Link encap:Point-to-Point Protocol

Done! Thank you for Mr. Made for the fine pointer )

Update@061308
I have updated my wvdial.conf, and here it is in it’s current incarnation :

[Dialer e51]
Modem = /dev/rfcomm0
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,”IP”,”internet”
Stupid Mode = 1
Phone = *99***1#
ISDN = 0
Username = “wap”
Password = “wap123″

9 Comments Add yours

  1. Shafeeq says:

    Very useful. got my n73 connected on ubuntu 8.04..

    Thanks!

  2. et21 says:

    Hi! Thank you very much – the channel setting saved my life 😉

  3. Braulio Gergull says:

    Hi, nice post.

    I’m planning to buy a nokia E52 and wish to use it to connect to the internet. Did you achive 3G speed or just edge?

    regards,
    Braulio gergull

  4. Ikhsan says:

    Unfortunately I don’t currently have a data plan that support 3G connection, so I can’t test it with my current connection 😦

  5. Tamoor says:

    Well, I can even ping on terminal but no browsing on Firefox… Any Ideas???

    1. Ikhsan says:

      Tamoor, please make sure that you are using either 7.10 or 8.04. This guide won’t work if you are using 8.10, as I have experience more or less the exact same thing. Apparently, Intrepid’s Network Manager decided not to play nice with configuration that is set not using Network Manager. The best way to do this on Intrepid is by using Blueman that can help you to “export” the rfcomm interface to Network Manager

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.