Nokia 2630, Linux, Bluetooth, Safaricom, and you!
I bought a Nokia 2630 phone a few weeks ago. It has Bluetooth and GPRS, the latter meaning that I can browse the net on the go. The former plus the latter meaning that I can browse the net from my computer via the phone using the Bluetooth. I got it working in a few minutes on my Zenwalk (Slackware) laptop, and now you can too!
A lot of the Bluetooth/Linux/GPRS tutorials are a bit old and use a few things which will really mess you up, like pppd and chat scripts, pin numbers, pand. Let me just tell you, you don’t need any of that stuff. You need a working Bluetooth stack, userland Bluetooth tools (BlueZ), wvdial, and pppd, all of which should come on any recent Linux distribution. I’ve tried this on Ubuntu 8.10 and it took less than two minutes to get working. I use Slackware because I like to do everything myself, but I’m going to assume you’re on Fedora, Suse, Ubuntu, etc, and skip all the painful details.
First things first, make sure your phone’s Bluetooth is turned on. The next step is to establish a serial connection over Bluetooth with your phone. In order to connect to the phone you’ll need to find it’s address; use hcitool to scan for Bluetooth devices:
[aorth@shamba: ~]$ hcitool scan
Scanning ...
00:13:E4:7D:2E:42 Breeee
My sample scan shows my phone’s name and address; don’t ask what my phone’s name means, haha. Now you have to edit the /etc/bluetooth/rfcomm.conf file. If it doesn’t exist, create it. If it exists, change the settings to match your phone:
#
# RFCOMM configuration file.
#rfcomm0 {
# Automatically bind the device at startup
bind no;# Bluetooth address of the device
device 00:13:E4:7D:2E:42;# RFCOMM channel for the connection
channel 1;# Description of the connection
comment “Nokia 2630 DUN”;
}
If you have a Nokia phone the channel should be 1, you can make sure by using sdptool to check the capabilities of your phone. The command should be sdptool browse 00:13:E4:7D:2E:42, but of course use your phone’s address. That command should output a lot of text, but you’re only interested in the “Dial-up Networking” section. Confirm the channel number and then make the appropriate changes to the rfcomm file above.
Next comes the configuration of the computer’s PPP settings. Wvdial makes using PPP painless. Open up /etc/wvdial.conf and add the following:
[Dialer Defaults]
Phone = *99#
Username = doesnt
Password = matter
Stupid Mode = 1
Dial Command = ATDT[Dialer nokia]
Modem = /dev/rfcomm0
Baud = 115200
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem
Init4 = AT+CGDCONT=1,”IP”,”SAFARICOM”
Before connecting to Safaricom we have to create the “serial” (radio) link with the phone (device 0 from /etc/bluetooth/rfcomm.conf:
[aorth@shamba: ~]$ sudo rfcomm bind 0
[aorth@shamba: ~]$ rfcomm
rfcomm0: 00:13:E4:7D:2E:42 channel 1 clean
You should see rfcomm0’s status as “clean.” You will only have to rebind after a reboot, sleeping or walking away from the computer with the phone will not affect the bind. Now use wvdial to connect to the phone and dial the ISP:
[aorth@shamba: ~]$ sudo wvdial nokia
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> 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=1,"IP","SAFARICOM"
AT+CGDCONT=1,"IP","SAFARICOM"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
~[7f]}#@!}!} } }2}#}$@#}!}$}%\}"}&} }*} } g}%~
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Sun Dec 21 19:47:21 2008
--> Pid of pppd: 1103
--> Using interface ppp0
--> pppd: Ðk[06][08]Ðk[06][08]lentÜk[06][08]
--> pppd: Ðk[06][08]Ðk[06][08]lentÜk[06][08]
--> pppd: Ðk[06][08]Ðk[06][08]lentÜk[06][08]
--> pppd: Ðk[06][08]Ðk[06][08]lentÜk[06][08]
--> pppd: Ðk[06][08]Ðk[06][08]lentÜk[06][08]
--> pppd: Ðk[06][08]Ðk[06][08]lentÜk[06][08]
--> local IP address 172.27.23.229
--> pppd: Ðk[06][08]Ðk[06][08]lentÜk[06][08]
--> remote IP address 10.6.6.6
--> pppd: Ðk[06][08]Ðk[06][08]lentÜk[06][08]
--> primary DNS address 196.201.208.2
--> pppd: Ðk[06][08]Ðk[06][08]lentÜk[06][08]
--> secondary DNS address 209.244.0.3
--> pppd: Ðk[06][08]Ðk[06][08]lentÜk[06][08]
You should see a lot of gibberish like this, and that means it worked. You may have to add the two DNS addresses to your /etc/resolv.conf if your Linux distribution’s pppd doesn’t add them automatically (mine doesn’t, and I never bothered to figure it out). I hope some of this was helpful.
Links which helped me:
http://ubuntuforums.org/showthread.php?t=651852
Possibly related posts (generated automagically):
- Nokia, GPRS, Linux, USB, and you! I’ve written a few times about using GPRS with Linux...
- Safaricom, Huawei e220, Linux and you! I live next to nowhere in Kenya, so Internet access...
- FFmpeg, Linux, 3gp, Nokia, and you! If you have a relatively-new Nokia phone it should be...
- Empty Words Telecommunications companies in Kenya are extremely profitable. Just the other...
18 Comments to “Nokia 2630, Linux, Bluetooth, Safaricom, and you!”
Leave a reply



Yeah, I am just doing my part to help the community!
Hallo allan. Hows ukambani stumbled upon your site and have been trying to configure my 2630 on ubuntu 8.04 bu am getting an error connection refused when calling “sudo wvdial nokia”. My rfcomm is as you indicated and my wvdial is purely like yours and also i have enable auto connect on the phone and marked it as trusted on ubuntu. so it cant be authentication issues. Assist!!
Daggi,
Make sure your phone is not already using the EDGE connection (put the phone’s setting to “Connect when needed”). Is that what you meant by “auto connect?”
Also, when you dial with wvdial your phone should say “Connected to _____” Did you see anything like that?
I only tested in Ubuntu 8.10 while booted to the live CD. I’ll try again and see if there is another step I missed for Ubuntu.
Alan
Hi Alan,
Many thanks for the write-up.
I am unable to connect to with Fedora 10, I keep getting the following error message…
[root@dev waa]# wvdial bluetooth
–> 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=1,”IP”,”WEB.SAFARICOM.COM”
AT+CGDCONT=1,b [1d]IPb [1d],b [1d]WEB.SAFARICOM.COMb [1d]
ERROR
–> Bad init string.
–> Cannot open /dev/rfcomm0: Input/output error
–> 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=1,”IP”,”WEB.SAFARICOM.COM”
AT+CGDCONT=1,b [1d]IPb [1d],b [1d]WEB.SAFARICOM.COMb [1d]
ERROR
–> Bad init string.
[root@dev waa]#
Can you figure out what the problem could be?
Best Regards,
Peter Waa.
I just pasted this config to an Ubuntu netbook I am working on, and I got the same error. In my case it was that the blog uses some different characters which wvdial doesn’t like, namely the “pretty” quotes around the IP and SAFARICOM. Replace them with normal quotes and it should work.
cool it worked with my nokia 2630!!!
Really the Linux/GPRS/Bluetooth forums r old but urs helped
Thankx a lot…
Peter, you’re missing the *99#- the number your phone has to dial to initialize a gprs connection. Allan, not a bad job done- but this kind of knowledge should be rudimentary to any linux user, lol. Anyway, good work:-).
I found your blog on google and read a few of your other posts. I just added you to my Google News Reader. Keep up the good work. Look forward to reading more from you in the future.
Cudnt do it guys
hi im new to linux
i v installed fedora 10
i have use nokia 2630 as modem via bluetooth on both xp an vista
but im having trouble to do that on my fedora10
i edited ext/bluetooth/rfcomm.config but when i tried saving it, this is what it said
The document could not be saved, as it was not possible to write to /etc/bluetooth/rfcomm.conf.
Check that you have write access to this file or that enough disk space is available.
For file /etc/bluetooth/rfcomm.conf no backup copy could be created before saving. If an error occurs while saving, you might lose the data of this file. A reason could be that the media you write to is full or the directory of the file is read-only for you.
but i think im the main user for i installed it and only i use it
please some1 help
and iv installed the fedora in a drive with about8 gb and there are still more than 2 gb free
i alos tried changing the permision of all kinds lf user to read write and…
but when i press ok to save the permision setting it changes back
i discovered that i cannot edit or delete anything from the root drive
can any1 tell me y?
could it b anything wrong i did while the system installation?
i installed fedora on logical drive
could that b any problem?
please some1 help
i badly wanna use internet on fedora using my 2630 via bluetooth
Touhid,
You need to read about Unix and Linux permissions. You probably forgot to edit the rfcomm.conf file as root. You see, in Linux you must be the “root” user to edit most files outside of your home directory. Good luck.
I tried each step exactly the way you explained and the EDGE connection gets activated still I am not able to browse the internet. Can you suggest me of the possible reasons? The messages that I get are:
–> WvDial: Internet dialer version 1.60
–> Cannot get information for serial port.
–> Initializing modem.
–> Sending: ATZ
ATZ
OK
–> 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=1,”IP”,”www.e.pr”
AT+CGDCONT=1,”IP”,”www.e.pr”
OK
–> Modem initialized.
–> Sending: ATDT*99#
–> Waiting for carrier.
ATDT*99#
CONNECT
~[7f]}#@!}!} } }2}#}$@#}!}$}%\}”}&} }*} } g}%~
–> Carrier detected. Starting PPP immediately.
–> Starting pppd at Mon Nov 2 05:10:21 2009
–> Pid of pppd: 2405
–> Using interface ppp0
–> pppd: Ðk[06][08]Ðk[06][08]lentÜk[06][08]
–> pppd: Ðk[06][08]Ðk[06][08]lentÜk[06][08]
–> pppd: Ðk[06][08]Ðk[06][08]lentÜk[06][08]
–> pppd: Ðk[06][08]Ðk[06][08]lentÜk[06][08]
–> pppd: Ðk[06][08]Ðk[06][08]lentÜk[06][08]
–> pppd: Ðk[06][08]Ðk[06][08]lentÜk[06][08]
–> local IP address 10.6.52.1
–> pppd: Ðk[06][08]Ðk[06][08]lentÜk[06][08]
–> remote IP address 10.6.6.6
–> pppd: Ðk[06][08]Ðk[06][08]lentÜk[06][08]
–> primary DNS address 218.248.240.23
–> pppd: Ðk[06][08]Ðk[06][08]lentÜk[06][08]
–> secondary DNS address 218.248.240.79
–> pppd: Ðk[06][08]Ðk[06][08]lentÜk[06][08]
That’s ok, you’re almost there. What you need to do is add the DNS servers to /etc/resolv.conf! Your wvdial output has two DNS addresses, place them in /etc/resolv.conf like this:
nameserver 218.248.240.23
nameserver 218.248.240.79
Then you should be able to browse just fine. Good luck.
I did that but still can’t browse. pinging too doesn’t yield any result!
I am thinking about blueman. Will that work?
I installed blueman (now available in the repository) with the command:
yum install blueman
and it works like a charm. Slowly linux is gaining popularity and is reaching towards linux challenged people too.
Great idea. Blueman really simplifies the detection and pairing of devices. You can always pair the phone with Blueman and then dial with wvdial.