Pages

17 June 2010

Use your mobile phone as modem via bluetooth in ubuntu

hello ubuntu users. today i will tell you how to use your mobile phone as a modem via bluetooth. you can do that in windows using the application provided by your cell phone vendor, but what about ubuntu linux. i will tell you how. just follow the steps below.

1. turn on your mobiles bluetooth(bt) and insert ur bt device in ur pc.

2. open a terminal and type this comman.
hcitool scan
this will show ur phones mac address and name.

3. now execute this command
sudo hcitool cc your-phone-mac-address

4. again execute this command
sudo hcitool auth your-phone-mac-address

step 3 and 4 will pair ur mobile with ur pc. you can do that using bt manager. it will appear in the upper right corner in the screen. click on it and click Set up new device.

5. you need to find out ur phones channel number. execute
sudo sdptool browse your-phone-mac-address

6. Under "Protocol Descriptor List:" and "RFCOMM", there should be a number after "Channel:". Remember that number; you'll need it for the rfcomm configuration.

7. execute
gksudo gedit /etc/bluetooth/rfcomm.conf

8. Paste the following into the file, replacing your-phone-mac-address and your-phone-rfcomm-channel with appropriate values-
rfcomm0 {
bind yes;
device your-phone-mac-address;
channel your-phone-rfcomm-channel;
comment "Bluetooth PPP Connection";
}

9. you have to bind the phone with ur pc. execute this command -
sudo rfcomm bind 0 your-phone-mac-address your-phone-rfcomm-channel

If you get the wrong channel (or if the wrong channel was bound at startup as a result of rfcomm.conf) then you need to release it before you can bind it again:
sudo rfcomm release 0

10. Run the following -
gksudo gedit /etc/ppp/peers/BluetoothDialup

11. Paste the following into the file -
debug
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/BluetoothDialup"
usepeerdns
/dev/rfcomm0 115200
defaultroute
crtscts
lcp-echo-failure 0
12. Run the following -
gksudo gedit /etc/chatscripts/BluetoothDialup

13. Paste the following into the file replacing your-apn-here and your-data-profile-number-here with correct value-
TIMEOUT 35
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
OK 'AT+CGDCONT=2,"IP","your-apn-here"'
OK ATD*99***your-data-profile-number-here#
CONNECT ""
for me they are gpinternet and 1 respectively.

14. now to connect ur phone as modem execute -
sudo pon BluetoothDialup

15. you will find a new mobile broadband connection in the notification area. if you had any connection previously configured you will see that connection there.you can create a new profile or use existiong profile to connect. just click on the profile.

the configuration process is not easy, specially for new users. it is very much possible to have problem. feel free to tell me about ur problem. i will try my best to solve. enjoy ubuntu......Very Happy Very Happy Very Happy

No comments:

Post a Comment