This page is to get you a good start for using Bluetooth on Debian.
We asume that you have a mobile phone and want to exchange data between that device and your Debian system.
Install as root the Bluetooth main package.
aptitude install bluez-utils
Read /usr/share/doc/bluez-utils/README.Debian.gz
You will now have an idea that Bluetooth high tech is.
Also you have seen the term pairing. For the pairing you need a passkey-agent
aptitude install gnome-passkey-agent or apt-get install bluez-pin
On your mobile you can now try to pair. Steps involve going to a "setup","connect" or "Bluetooth" menu and then select to search for BT devices. Your Bluetooth phone will/should see a BT device that is named bahrain-0, where bahrain the hostname your Debian GNU/Linux computer is. Select the computer on your phone. Next will the phone ask for a PIN, you can make one up. ( chose four digits, say 2309 )
On your computer will gnome-passkey-agent pop-up an information balloon with text like Pairing request from BtPhone (19:25:12:16:50:53) where BtPhone is the name of your Bluetooth phone and 19:25:12:16:50:53 is it's BT MAC address.
Click in the information balloon.
Another window will pop-up. It asks for the PIN, enter the one you just made up. (e.g. 2309 ) and press enter.
Your phone sees that the PIN matches and shows it on it's display.
Both devices are now paired.
further help requested
Tips
For some reason, my broadcom bluetooth dongle starts off in hidden mode (so my phone can't see it).
run:
# dbus-send --system --dest=org.bluez /org/bluez/hci0 org.bluez.Adapter.SetMode string:discoverable
This should probably be added to /etc/init.d/bluetooth. If I do that, I'll post back where it should be done. For now, the command has to be run after ever reboot, or every time you plug the bluetooth dongle in.
Helpful Commands
display your bluetooth device (for proof that it was installed properly)
hcitool dev
search for remote bluetooth devices
hcitool scan
KDE Issues
apt-get install kdebluetooth
Since the pin should be implemented on a user level, we need to make some changes to /etc/bluetooth/hcid.conf
comment out the line
passkey "1234";
and add the following line directly below it (make sure the package bluez-pin is installed) Note: kdebluetooth includes the program /usr/lib/kdebluetooth/kbluepin, but I couldn't get it working:
# passkey "1234"; pin_helper /usr/bin/bluez-pin;
KDE also expects a file /etc/bluetooth/link_key to be present.
# touch /etc/bluetooth/link_key # chmod 644 /etc/bluetooth/link_key # /etc/init.d/bluetooth restart
In KDE (logged in as user), kick off kbluetoothd. Now singleclicking the bluetooth icon in the system tray will bring up konqueror with the bluetooth:/ url. You should be able to see your device and do some simple file transfers by clicking on the device, and then the proper obex transfer protocol.
Scanning for the PC from your phone (or whatever) should bring up a window in KDE that asks you for a PIN. Now you can send files to your PC (KDE should automagically bring up a program to handle this.
some of this information was gleamed from http://ubuntuforums.org/showthread.php?t=225703&highlight=dbus-send+-system+-dest%3Dorg.bluez+%2Forg%2Fbluez%2Fhci0+org.bluez.Adapter.SetMode+string%3Adiscoverable