Ubuntu, WvDial, Bluetooth and my GSM phone as GPRS Modem

Here are the links that were of much help:

Archived post by togume in Ubuntu forum
Tom’s attempts to get GPRS working over bluetooth with his laptop
Bayan ni Juan

So now, here are the steps that I did to finally connect to the internet using my Nokia 6151 as my gprs modem over bluetooth.

1. Activate my GPRS setting.

Since I am subscribed to Smart, I sent this keyword to 211, SET N6151. The message prompted me to save the settings which also activated not only the GPRS but also MMS and 3G services.

2. Install Bluetooth utilities.

I am using an Acer Aspire 4720 (thanks to Girl Bawang for the “pamana”) which has a built-in Bluetooth so all I need to do is press the Bluetooth button and I’ll get the Bluetooth applet after making sure that I have the latest of the following:

    • bluez-utils
    • bluez-gnome
    • wvdial

$ sudo apt-get upgrade bluez-utils bluez-gnome wvdial

else,

$ sudo apt-get install bluez-utils bluez-gnome wvdial

or, from the Synaptic Package Manager, search for bluez then mark bluez-utils and bluez-gnome for installation. Same goes for wvdial.

3. The Pairing

I set my laptop as my phone’s paired device. And on my laptop’s Bluetooth menu, set my phone as a trusted device.

4. The Binding

Now, I have to make sure that my phone and laptop can communicate and discuss things like creating connection and sending/receiving packet data. =)

Typing,

$ hcitool scan

showed my MAC or BD address:

Scanning …
00:11:22:33:44:55 Japot

Then, typing

$ sdptool search dun

showed my DUN channel which is 1.

Searching for dun on 00:11:22:33:44:55 …
Service Name: Dial-up networking
Service RecHandle: 0x1005f
Service Class ID List:
“Dialup Networking” (0x1103)
“Generic Networking” (0x1201)
Protocol Descriptor List:
“L2CAP” (0x0100)
“RFCOMM” (0x0003)
Channel: 1
Language Base Attr List:
…..

After knowing what MAC and Channel to use, I typed:

$ rfcomm bind 0 00:11:22:33:44:55 1

To check if my GPRS modem and my phone was ready to meet, I typed:

$ rfcomm

and it showed,

rfcomm0: 00:11:22:33:44:55 channel 1 clean

Seeing clean, I edited  /etc/bluetooth/rfcomm.conf to create the binding:

# RFCOMM configuration file.

rfcomm0 {
bind yes;
device 00:11:22:33:44:55;
channel 1;
comment “Jajabinx’s N6151“;

Then, I edited /etc/wvdial.conf

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,”IP”,”Internet”
Modem = /dev/rfcomm0
Phone = *99#
Username = jajabinx
Password = wordpass
New PPPD = yes
ISDN = no
BAUD = 115200
Stupid Mode = yes
Carrier Check = no

The Init3 line is what I exactly used. If you’re using Globe, better call customer service to know your APN.

5. The Connection

Now, my laptop is ready to communicate with my phone and discuss things like creating connection and sending/receiving packet data. =)

To refresh my bluetooth, I typed

sudo /etc/init.d/bluetooth restart

Then the final command,

$ wvdial

And here’s what my terminal showed..

–> WvDial: Internet dialer version 1.60
–> Initializing modem.
ATZ
OK
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
AT+CGDCONT=1,”IP”,”Internet”
OK
ATDT*99#
CONNECT
[… ppd logs]
–> local  IP address 10.157.192.194
–> remote IP address 10.6.6.6
–> primary   DNS address 203.84.191.216
–> secondary DNS address 121.1.3.250

6. The Surfing

Now, everytime I need to use the gprs modem connection, I only need to open my terminal and execute,

$ wvdial

The boxed “G” showing on my phone’s upper left phone display signals that I am connected to the net. The concern I have now is having to monitor how long I’m connected to the net. You see, I can easily get carried away with reading mails, checking forums and reading updates. But P20/hr, I guess is not so bad especially when I’m at home on weekends. The nearest i-cafe from our place is a  taxikel+jeepney ride away. And the PCs there are still using IE. Whew!

  1. thank you…. i have been searching the whole night for a fix…. sending from NOK.BLUE.GPRS.UBUNTU………THANK YOU

  2. Thank you for keeping me posted. I hope to see more about the bluetooth headset cases because that’s what I need.

  3. Excellent minimalistic solution, very well explained. Worked great for me (after many frustrating attempts with other methods). Thanks a lot. [-:

  4. Where to give the apn?Please make it clear

  5. Where to give my apn?Please make it clear.

  6. I finally got around to getting my Ubuntu laptop connecting to the Internet over Bluetooth through my Palm Treo 680 based on the information you have provided here. Much appreciated.

  7. Hi
    I was following your step. After entering $ rfcomm bind 0 00:11:22:33:44:55 1
    computer responded “Can’t create device: Operation not permitted”
    Please advice what to do now.
    Regards
    Bidyut

  8. Absolutely fantastic article!! I followed this step by step, and it worked 100% with my Sony Ericsson W705.

    The only two things i had to research further were:

    1. How to get wvdial to allow for blank username and password, for which i used this page to clear it up: https://bugs.launchpad.net/ubuntu/+source/wvdial/+bug/72400

    2. When i launch wvdial, i need to run ‘sudo wvdial’ or Ubuntu complains about a permissions error when trying to access pppd

    Thanks for your help.

  9. Hello there,

    thanks for the help – followed your instructions but I get:

    “Cannot open /dev/rfcomm0: No such file or directory” when running second time around.

    Could you please inform me how I create the file in /dev?

    Kind regards

    • hello pj! when you typed
      $ rfcomm
      you should have seen there the available channel and the MAC address that you can use when you edit your rfcomm settings. you can edit it by typing
      $ sudo /etc/bluetooth/rfcomm.conf
      then editing it and inputting the data you got in your previous scans. mine is:
      # RFCOMM configuration file.
      rfcomm0 {
      bind yes;
      device 00:11:22:33:44:55;
      channel 1;
      comment “Jajabinx’s N6151“;

      hope that helps.

  10. It works just fine!!

  11. Nothing when you’re using Iceweasel? How about other browsers?

    I am still checking if there’s any configs done in my ppp0 settings when I did wvdial and…

    I still have to try Iceweasel. Will let you know. Bear with me.

  12. Very helpful indeed, thank you very much!
    I’m almost there, just short of browsing…

    My wvdial connects, my phone indicates there’s internet…but now what?
    If I start Iceweasel I get no websites. Do I need to configure Iceweasel to use PPP0?
    If so, what do I need to do?

    Thanx in advance,

    Leon

  13. You’re much welcome. Happy browsing. =)

  14. Thanks. I finally got around to getting my Ubuntu laptop connecting to the Internet over Bluetooth through my Palm Treo 680 based on the information you have provided here. Much appreciated.

  15. Hi Rhoma,

    Well, that would be good to know right? But as far as WHERE I am is concerned, free browsing anywhere and anytime is not possible… yet. It would depend on where you are and what you are using really. If you’re browsing using your GPRS-enabled cellphone, your mobile provider may offer free browsing on their wap site. If you’re using your wifi-enabled laptop, then you can freely browse when there’s an available and unsecured (no need for password) access point. Nonetheless, it’s not really free because someone else did pay to get that connectivity up and they’re willing to share it with you. Thank their good hearts! =)

    I read somewhere some utilities that you can install if your laptop is wifi ready. It chooses an access point for you. I’m not too keen in using them though since my network manager does that for me too. =)

  16. Hey

    I want to know which type of utilities will I used to get a free browing anywhere and anytime

  1. Pingback: Configuring wvdial.conf file

  2. Pingback: Dyenibib

  3. Pingback: dcroci.com » Blog Archive » Dialling Optus Internet over Sony Ericsson W705 connected via bluetooth to Ubuntu 9.04

  4. Pingback: Using my GSM phone as my GPRS modem via Bluetooth « BuzzStop

Leave a comment

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