LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Linux Answers > Networking
User Name
Password

Notices


By TB0ne at 2006-07-30 19:59
Don't know which forum to put this in, since it's part networking, part software.


I'm using an Anycom PCMCIA bluetooth card, with a Sony Ericsson r520m phone. Other combinations of hardware should work fine, but check to make sure the bluetooth hardware works with Linux/Bluez first, and make sure you've got a modem in your cell phone.

-------------------------------------
1. Obviously, be sure your bluetooth hardware is installed and working
in your system. There are too many permutations to deal with, so
that's up to you to figure out.

2. Put your modem-capable cellphone into discoverable mode, and turn
Bluetooth on, on your phone.

3. Run "hcitool scan" at a command prompt. It will dutifully go out
and look for any bluetooth devices. In my c ase, it finds my phone,
and returns:

Scanning ...
00:80:37:1A:CB:38 Motoko

Make a node of this number and name for later use.

4. To make sure things are working, ping your phone via bluetooth:

l2ping 00:80:37:1A:CB:38

Be sure to do this while your phone is still in discoverable mode,
otherwise it will give you a permission denied message.

5. Bind the phone to a comm channel via Bluetooth by using:

rfcomm bind 0 00:80:37:1A:CB:38

Verify this worked by typing in "rfcomm show" afterwards. You should
then see an open comm channel:

rfcomm0: 00:80:37:1A:CB:38 channel 1 clean

6. So far, you've gotten your Linux box to talk to your phone, via
bluetooth. The only thing that's left is to get a data connection
going via PPP over that /dev/rfcomm0 link, which is easier than it
sounds.

Under /etc/bluetooth, edit the hcid.conf file. Look for the
pin_helper line, and make it read:

pin_helper kbluepin

Save the file and exit the editor. Restart Bluetooth services. On my system, that's "/etc/init.d/bluetooth restart"

7. Now, from the command-prompt, enter "kbluepin". Enter the
pairing code you want to use, when you pair with other devices.
REMEMBER this number, you'll need it.

8. On your system, you've got Bluetooth up and running, and kbluepin
is serving up any pairing requests. On your phone, initiate a pairing
request. It should go out, and find your Linux box, and prompt you
for the pairing code you entered before. Enter it, and the pairing
should take place, showing you a PC-type device on your lists of
paired devices.

9. On my system, I have a small script which will bind the rfcomm
device, and open the channel. it's a one-liner, reading:

rfcomm bind 0 00:80:37:1A:CB:38 1

To explain:

rfcomm bind 0 - This binds the connection to device 0.
You can also have rfcomm bind /dev/rfcomm0, and it'll do the same
thing. Typing in a 0 will make the /dev/rfcomm0 device magically show
up.

The 00:80:etc... is the Bluetooth 'MAC' address of my phone. You'll
naturally want to replace this with the Bluetooth address of YOUR
phone.

The 1 at the end says to open up a data channel, which is defaulted to
1.

The script will save you some typing, and come in handy later.

10. Now, go into your PPP manager (I use kpp). Set up a new modem,
pointing to /dev/rfcomm0. Enter the account params as you normally
would for a dial-up connection to your provider. Enjoy slow, but
totally wireless, goodness, from anywhere you can get a cell signal.


I have two modems, one for my internal modem on my laptop (using /dev/modem, via the Linuxant drivers), and one for my cell phone, using /dev/rfcomm0. I have kppp set up to run the bind-script from above, before trying to initiate a modem connection to my cell device. Otherwise, the device won't be there to dial.

I know there are GPRS cards and connections that will give you far higher speeds. This only goes to 9600 baud on my phone, but for the rare times I need a connection and can't find a WiFi point (i.e. on car trips, or using my laptop for GPS navigation to download map data), it's all I need, and is pretty handy to have.

Hope someone can make use of this.

by The Don on Tue, 2008-07-15 16:45
Hi Andy

I did get the phone up and running with Msndriva 2008.1. It sees the phone and wants to dial ing but as soon as the modem is initializing it drops the bluetooth connection and Kppp is just left high and dry. can u help me to get it up and keep the connection till I'm ready to drop the line.

Thanx a stack
The Don

by The Don on Thu, 2008-11-20 04:14
I have installed mandriva 2009 powerpack+ 64bit, and can't find bluetooth anywhere. What happened to it?

by newtothisworld on Fri, 2009-01-16 19:26
I've had this same problem. Any solutions?

by The Don on Sun, 2009-01-18 13:42
Thanx, TBOne

Everything gave mee worked but kluepin i cannot find it anywhere?

by atulcpu on Fri, 2011-04-01 07:15
Hi Dear,
I have a linux-2.6.9-42
N I want to connect internet connection via bluetooth by sonyericsson C510 with tata docomo service.
although i have tried given mehtod but here in my linux pc /dev/rfcomm0 file is not present.
so plz help me.

by TB0ne on Fri, 2011-04-01 09:39
Quote:
Originally Posted by atulcpu View Post
Hi Dear,
I have a linux-2.6.9-42
N I want to connect internet connection via bluetooth by sonyericsson C510 with tata docomo service.
although i have tried given mehtod but here in my linux pc /dev/rfcomm0 file is not present.
so plz help me.
First, spell out your words, and open your own thread for your own question. Second, this original thread is three years old, so please don't re-open old threads.

And if you bothered to read this thread, you'd see a link in the very first post, that tells you how to do it. Steps 1-5.

by Rajan Chatterjee on Thu, 2011-11-17 22:38
i can't find hcid.cong file in /etc/bluetooth.....help me out

by TB0ne on Fri, 2011-11-18 09:38
Quote:
Originally Posted by Rajan Chatterjee View Post
i can't find hcid.cong file in /etc/bluetooth.....help me out
How can we, when you provide no actual details?? Version/distro of Linux? Have a bluetooth adapter installed and working already? Bluetooth stacks/utilities loaded?

Have you run a find or locate command to find hcid.conf (assuming the .cong is a typo)?


  



All times are GMT -5. The time now is 05:34 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration