Sunday, May 31, 2009

NTC's GPRS in Linux via Bluetooth using Nokia phone

The following guide explains how to connect to Nepal Telecom's GPRS service from Linux via Bluetooth using Nokia phone. This guide is based on Linux GPRS Guide. The steps have been tested on Nokia 6600, 6630 and 5300 but should work on all Nokia phones.

NTC's GPRS is *really* slow so I won't recommend it for everyday use. However simple mail checking and tweeting ;) should do just fine.

1. Nokia Phone
2. Nepal Telecom GPRS Account
3. Bluetooth Dongle (if not inbuilt in your PC/laptop)
4. Linux (the following steps were tested on Ubuntu)


1. Download ntgprs.tar.gz and extract (ntgprs, ntgprs-wvdial.conf and ntgprs-disconnect)
2. Copy the files to /etc/ppp/peers/ (you need root or sudo access)
3. Turn on Bluetooth on your Nokia phone
4. Plug in Bluetooth Dongle to PC or enable it (if inbuilt)
5. Fire up terminal (the commands to be entered are in bold-face):

Make sure the bluetooth is running on PC:

$ hciconfig
hci0: Type: USB
BD Address: 11:11:11:11:11:11 ACL MTU: 672:3 SCO MTU: 48:1
RX bytes:149397 acl:1046 sco:0 events:764 errors:0
TX bytes:40320 acl:628 sco:0 commands:74 errors:0

The following command will find bluetooth address of your phone
$ hcitool scan
Scanning ...
00:0E:6D:C2:99:42 Nokia

Create a RFCOMM port and bind it to phone's Bluetooth address.
$ sudo rfcomm bind /dev/rfcomm0 00:0E:6D:C2:99:42 1

Please note that the bluetooth address in the above command should match the address found by 'hcitool scan' command.

Check if the port has been created
$ rfcomm -a
rfcomm0: 00:0E:6D:C2:99:42 channel 1 closed

Now dial.
$ sudo pon ntgprs

--> WvDial: Internet dialer version 1.60
--> Initializing modem.
--> Sending: ATH
--> Sending: ATE1
--> Sending: AT+CGDCONT=1,"IP","internet","",0,0
--> Sending: AT+CBST=0,0,1;+CHSN=6,0,0,0;+CGDCONT=,,"ntnet"
--> Modem initialized.
--> Sending: ATD*99#
--> Waiting for carrier.
~[7f]}#@!}!} } }2}#}$@#}!}$}%\}"}&} }*} } g}%~
--> Carrier detected. Waiting for prompt.
~[7f]}#@!}!} } }2}#}$@#}!}$}%\}"}&} }*} } g}%~
--> PPP negotiation detected.
Serial connection established.
using channel 9
Using interface ppp0
Connect: ppp0 <--> /dev/rfcomm0
sent [LCP ConfReq id=0x1 ]
rcvd [LCP ConfAck id=0x1 ]
rcvd [LCP ConfReq id=0x0 ]
sent [LCP ConfAck id=0x0 ]
sent [PAP AuthReq id=0x1 user="user" password="pass"]
rcvd [PAP AuthAck id=0x1 ""]
PAP authentication succeeded
sent [IPCP ConfReq id=0x1 ]
rcvd [IPCP ConfReq id=0x0 ]
sent [IPCP ConfNak id=0x0 ]
rcvd [IPCP ConfNak id=0x1 ]
sent [IPCP ConfReq id=0x2 ]
rcvd [IPCP ConfReq id=0x1 ]
sent [IPCP ConfAck id=0x1 ]
rcvd [IPCP ConfAck id=0x2 ]
Cannot determine ethernet address for proxy ARP
local IP address
remote IP address
primary DNS address
secondary DNS address
Script /etc/ppp/ip-up started (pid 9902)
Script /etc/ppp/ip-up finished (pid 9902), status = 0x0

To disconnect
$ sudo poff ntgprs


  1. first of all, how to enable "bluetooth" in laptap...i use Dell and ubuntu..but cannot figure out how to use it..need help?

  2. @basanta:
    if u have cable,
    edit ntgprs file and comment out /dev/rfcomm0, and uncomment /dev/ttyUSB0. no need to do rfcomm binding n bluetooth stuffs, rest is similar.

    or, buy bluetooth dongle. costs < NRs. 500

  3. @basanta: i havent tried this with usb cable though. but the above steps should work. i'll confirm once i get to test it.

  4. well my cell phone noe is help me not only to make some calls, now aslo to have information about Linux in my cell phone men what a nice news, and right now I gonna test this with my own cell phone.