Bluetooth

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

Bluetooth

Post by ^rooker »

This thread will contain several 'funny' things we've encountered playing around with Bluetooth devices.
=============================================

Here's my first one for today:

[PROBLEM]
Bluetooth support on an IBM Thinkpad R51:
With WinXP SP1 things don't even seem to work at all with the driver that windows "thinks" is best - There is an unsigned driver from IBM which works perfectly (driver's date is January 2004).

BUT:
This notebook had to be reinstalled - this time it was SP2. I knew that the driver mentioned above worked properly and it also installed the "my bluetooth places" and everything, so I wanted to uninstall the 'new' SP2-driver (Date: March 2004) and use the older one (Jan04).

Well... not with windows...
Although I was able to uninstall the new, signed driver I ended up with a mixture of old and new stuff hopelessly colliding with each other. When trying to enable bluetooth it even told me that I wasn't allowed to install an older BT-software version if a newer one was already installed. GREAT!
:evil:

[SOLUTION]
Although I haven't figured out how to get the "my bluetooth places" without installing the vendor's (IBM) software, but in my case things only work when using the SP2 (Mar04) driver.
Last edited by ^rooker on Sat Oct 15, 2005 1:27 am, edited 1 time in total.
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

Bluetooth: Wrong COM port

Post by ^rooker »

[PROBLEM]
GPRS over Bluetooth-cellphone was once installed on this notebook, but the phone got lost and the DialUp didn't work with the replacement phone.

[SOLUTION]
The new phone had to be re-installed as modem (on the Laptop-side) with a different COM-Port assigned to it.
(see "Remap COM ports" for how to re-assign COM ports in Win2k)
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

finally: Bluetooth & Linux

Post by ^rooker »

ok, ok... I admit. It took "Das Werkstatt" quite long to get its hands on BT-equipment running under linux, but finally I think I've made it.

Here's my first problem I encountered:

[PROBLEM]
"Protocol not supported" - this message might appear when running l2cap, rfcomm, etc...


[SOLUTION]
:oops: I forgot to enable all the bluetooth protocols when compiling the kernel modules (btw: Running 2.6.12) - Check if things like "L2CAP protocol" (basically everything under Bluetooth, named "protocol" is checked)
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

RFCOMM: "Connection refused"

Post by ^rooker »

Several reasons why trying to connect with "rfcomm" end up with:

"Can't connect RFCOMM socket: Connection refused"

1) Try a different value for channel in your "/etc/bluetooth/rfcomm.conf".


2) Make sure that "bluepin" is properly executable.

There are 2 main reasons why it may fail:
- You don't have Python
Solution: Install it.

- The default bluepin program wants to prompt for a PIN using X.
Solution:
if you (like me) insist on shell-only, replace "bluepin".
Check the following thread for an example:
Last edited by ^rooker on Sat Oct 15, 2005 1:16 pm, edited 1 time in total.
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

Making "bluepin" run without X.

Post by ^rooker »

The application "bluepin" is there to prompt for a PIN, but unfortunately it wants to do this graphically.

If you want to do bluetooth stuff from within the shell only, here's my suggestion for replacing "bluepin":

Code: Select all

#!/bin/bash








MYPIN="1234";
PINFILE="/etc/bluetooth/pin";

function enterpin ()
{
    echo "Please enter PIN:"
    read MYPIN;
}


echo $MYPIN > $PINFILE
echo "PIN:$MYPIN";
NOTE:
I didn't manage to get the interactive prompt for the PIN running (works when running it directly, but you never see it when running rfcomm), so this piece of code currently assumes a hardcoded PIN.
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

gsmlib: Problems with Nokia

Post by ^rooker »

I've tried accessing SMS and phonebook of 2 different phones. One was Siemens S55 and the other one a Nokia 6822.

The apps coming with gsmlib worked perfectly with the S55, but throw a nasty error when trying to access the Nokia:
ME/TA error '<unspecified>' (code not known)
As far as I've
found out
, Nokia's not "cooperating" too well with gsmlib, so I will try using "gammu" instead.

I will update this post with things I find out...
Last edited by ^rooker on Sat Oct 15, 2005 11:06 pm, edited 1 time in total.
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

RFCOMM: Service temporarily unavailable

Post by ^rooker »

Now here's a good one:

[PROBLEM]
when trying to connect rfcomm and you encounter the errormessage:
"Can't connect to RFCOMM socket: Resource temporarily unavailable"

[SOLUTION]
Verify that the "hcid" is running.
Post Reply