This post describes how to connect GPRS from mobile phones via bluetooth in Ubuntu. This procedure is explained for Aircel connection. However, the changes that need to be done for Airtel users are mentioned at the end. Similar procedure works for other network service providers as well.
1. First you need to pair your bluetooth enabled mobile with Ubuntu. You can do that by clicking on the bluetooth icon on the top right of the screen. Or you can find it in System->Preferences.
2. Then, Open a terminal and type:
$ sdptool search DUN
You should get this
Code:
Searching for DUN on 00:13:FD:CC:F6:5C ...
Service Name: Dial-Up Networking
Service RecHandle: 0x10005
Service Class ID List:
"Dialup Networking" (0x1103)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 2
Language Base Attr List:
code_ISO639: 0x454e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100
3. Note your phones mac address and channel number which is in red.
In my case phone's mac address is 00:13:FD:CC:F6:5C and channel number is 2
You should get this
Code:
Searching for DUN on 00:13:FD:CC:F6:5C ...
Service Name: Dial-Up Networking
Service RecHandle: 0x10005
Service Class ID List:
"Dialup Networking" (0x1103)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 2
Language Base Attr List:
code_ISO639: 0x454e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100
3. Note your phones mac address and channel number which is in red.
In my case phone's mac address is 00:13:FD:CC:F6:5C and channel number is 2
4. Next type this command:
$ sudo gedit etc/bluetooth/rfcomm.conf
And add the following
Code:
rfcomm0 {
bind yes;
device 00:13:FD:CC:F6:5C;
channel 2;
comment "Nokia 3230 via Bluetooth";
}
Enter your phones's mac address and channel number
save and exit.
5. now test the connection by following commands
Code:
$ sudo rfcomm release 0
$ sudo rfcomm connect 0
After a delay you will get the following
Code:
Connected /dev/rfcomm0 to 00:13:FD:CC:F6:5C on channel 2
Press CTRL-C for hangup
Now you have data connection to your phone!.
Press ctrl+C to break connection.
6. Now we have to setup ppp. In my case service provider is Aircel, Type in
Code:
$ sudo gedit /etc/ppp/peers/aircel
And enter the following
Code:
# Aircel PPP initialisation/termination script
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/aircel-connect"
disconnect "/usr/sbin/chat -v -f /etc/chatscripts/aircel-disconnect"
silent
debug
/dev/rfcomm0
115200
defaultroute
usepeerdns
Save and exit
7. Now type in
Code:
$ sudo gedit /etc/chatscripts/aircel-connect
Enter the following
Code:
# Aircel PPP CONNECT script
TIMEOUT 5
ECHO ON
ABORT '\nBUSY\r'
ABORT '\nERROR\r'
ABORT '\nNO ANSWER\r'
ABORT '\nNO CARRIER\r'
ABORT '\nNO DIALTONE\r'
ABORT '\nRINGING\r\n\r\nRINGING\r'
'' \rAT
TIMEOUT 12
OK ATE1
OK 'AT+cgdcont=1,"IP","aircelgprs"'
OK ATD*99***1#
Note- In place of aircelgprs you have to put in your APN.
Now save and exit.
8. Now type in
Code:
$ sudo gedit /etc/chatscripts/aircel-disconnect
And enter the following
Code:
# Aircel PPP DISCONNECT script
ABORT "BUSY"
ABORT "ERROR"
ABORT "NO DIALTONE"
SAY "\nSending break to the modem\n"
"" "\K"
"" "\K"
"" "\K"
"" "+++ATH"
"" "+++ATH"
"" "+++ATH"
SAY "\nPDP context detached\n"
Save and exit.
Now we are ready to connect to internet! for first time
9. Open terminal and type in
Code:
$ sudo rfcomm connect 0
Don't close this terminal and open another terminal
Code:
$ sudo pon aircel
Congratulation now your phone must be connected to internet verify it by GPRS icon in your phone.
Now bring up firefox and hit any site.
10. To disconnect from internet type this in same terminal as where you typed pon aircel
Code:
$ sudo poff aircel
For Airtel users, just replace the word 'aircel' to 'airtel' everywhere in this post. And enter suitable APN in the PPP connect script mentioned above. For Airtel it would be AT+CGDCONT=1,"IP","airtelgprs.com","",0,0. Or simply, airtelgprs.com for Nokia users.
Please comment if you have problems.
Samsung Metro S5350 has 2.2 inches 256K colors TFT screen with 240 x 320 pixels resolution.
i have done everything you said!!! only thing that is not working for me is ctrl+c to disconnect. i dont know why... also even before i give pon airtel it starts the connection!!!