-
02-03-2012, 12:54 PM #1InfoSec Consultant
- Join Date
- Jul 2010
- Posts
- 43
- Thanks
- 2
- Thanked 26 Times in 13 Posts
Bluetooth Dial Up Networking on Linux
Hello Hackers;
I am just documenting this topic because I tend to forget it all the time.
On this same laptop I have banged my head everytime after a fresh linux installation.
The GUI tools for this given with any linux distro never worked for me. I always had to go the old Linux way.
So finally, I am documenting it here.
Might follow it if you need to do the same.
You would need bluez package and wvdial package. Bluez for bluetooth connectivity and wvdial for dialing to a network.
For example on a Gnome Ubuntu box:
# apt-get install bluez-utils bluez-gnome wvdial
Now you need to pair up your machine and your phone device. When done, we can proceed with binding.
First scan for devices
# hcitool scan
Would get result something like this
Scanning …
xx:xx:xx:xx:xx:xx Austin (xx:xx:xx:xx:xx:xx is your devices bluetooth ID)
Now just check if that device supports DUN or not
# sdptool search dun xx:xx:xx:xx:xx:xx
This should give output something like following
Inquiring ...
Searching for dun on xx:xx:xx:xx:xx:xx ...
Service Name: Dial-Up Networking
Service RecHandle: 0x10005
Service Class ID List:
"Dialup Networking" (0x1103)
"Generic Networking" (0x1201)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 1
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100
I see that my device supports L2CAP protocol and on top of that RFCOMM is available. I see that the service may be accessed via channel 1.
This should be the thing with most of of devices today.
Now lets just bind them up:
# rfcomm bind <rfcomm interface> <Target BT addr> <channel>
In my case:
# rfcomm bind 0 xx:xx:xx:xx:xx:xx 1
Now check if it worked.
# rfcomm
If it does show a clean report like this, then it worked !
rfcomm0: xx:xx:xx:xx:xx:xx channel 1 clean
Now rfcomm config has to be changed accordingly.
The config normally is placed at /etc/bluetooth/rfcomm.conf
Just make it look like this:
# RFCOMM configuration file.
rfcomm0 {
bind yes;
device 00:xx:xx:xx:xx:xx:xx;
channel 1;
comment “My_BT_device“;
}
#End of config
Now restart the bluetooth service:
# /etc/init.d/bluetooth restart
Now you are done with your bluetooh stuff.
Going to Dial Up stuff:
You will have to check for specific settings for your service provider.
Here is the config file for Idea Internet:
#Start
[Dialer Defaults]
Modem = /dev/rfcomm0
Baud = 30720000
Dial Command = ATDT
Init1 = ATE1
Init2 = AT+CGDCONT=1,"IP","Internet","",0,0
FlowControl = CRTSCTS
Init3 = ATM0
Phone = *99***1#
Username = (empty)
Password = (empty)
Stupid Mode = 1
#End
Hope it helps you and saves me from banging head again !
--
Godwin AustinLast edited by Godwin Austin; 02-03-2012 at 12:59 PM.
I love geology ... because its tells me, "ITS ALL ABOUT PRESSURE AND TIME".
-
The Following User Says Thank You to Godwin Austin For This Useful Post:
b0nd (02-09-2012)
-
02-03-2012, 01:15 PM #2Web Security Consultant


- Join Date
- Jul 2011
- Location
- webr00t
- Posts
- 230
- Blog Entries
- 3
- Thanks
- 15
- Thanked 149 Times in 87 Posts
Nice article Austin.
Do you/anybody used USB internet modem like Tata Photon+ on ubuntu?
Wanted to check how to configure it and issues faced.
AMol NAik
-
02-03-2012, 02:48 PM #3InfoSec Consultant
- Join Date
- Jul 2010
- Posts
- 43
- Thanks
- 2
- Thanked 26 Times in 13 Posts
Actually for USB modems too wvdial should work.
Instead of Modem = /dev/rfcomm0 in above configuration you could use /dev/ttyACM0 or /dev/ttyUSB0.
Check for device name in your /dev/ after connecting the device to your machine.
Change the 'internet' in Init2 of config to your APN. For idea, the APN is internet.
You have your username and password for it. Normally its the phone number. Replace username, password feild accordingly.
You should be good to go.
Might even try to run command 'wvdialconf' after connecting your modem. The command autoconfigures for your modem.
Then you will just have to add the APN, username and password.
Hope that helps
Last edited by Godwin Austin; 02-03-2012 at 03:23 PM.
I love geology ... because its tells me, "ITS ALL ABOUT PRESSURE AND TIME".
-
02-08-2012, 07:22 PM #4InfoSec Consultant
- Join Date
- Jul 2010
- Location
- the blue no-where
- Posts
- 140
- Blog Entries
- 1
- Thanks
- 35
- Thanked 30 Times in 11 Posts
Above things should generally work. However, if you are facing a problem such as the device is being detected as mass storage device and not as modem, do not install that package mentioned in most of the solution post regarding this (forgot the name) directly. be careful as it might not allow installing anything after that. I lost my BT instance once because of that.
old-------------before noticing austin's post----------
what version of ubuntu and the Photon card ur using Amol. I might come of some help maybe .. done it quite a lot of times.
However I am in love with bt5 now because it takes all the pain and lets us configure these devices easily
Regards,
the_emptyLast edited by the_empty; 02-08-2012 at 07:26 PM.
ACCESS is GOD



1Likes
LinkBack URL
About LinkBacks



Reply With Quote

Research Resources for MS...
Today, 12:25 PM in Web Application Penetration Testing