Hello guys, just wanted to share how setup bluetooth under my slackware 13.37. \\
The objective of this post is to connect a device via bluetooth, a phone or broadband modem, to connect to the internet.
It's a little bit techy but it gets the job done.I will try to make it easy on you guys. \\
You might also refer to http://slackwiki.org/Bluetooth as it is complete.
I'm on IBM Thinkpad R61i, \\ Slackware 13.37, \\ Kernel 2.6.37.
To summarize what I did,
====== Install bluez subsystem. ======
It handles all bluetooth communication to the kernel) - http://www.bluez.org/download/ \\
http://www.kernel.org/pub/linux/bluetooth/bluez-4.96.tar.gz \\ \\
For OBEX connectivity: \\ \\
http://www.kernel.org/pub/linux/bluetooth/obexd-0.42.tar.gz \\ \\
For Bluetooth data dump and protocol analysis: \\ \\
http://www.kernel.org/pub/linux/bluetooth/bluez-hcidump-2.1.tar.gz
====== Create bluetooth ON/OFF switch ======
Since my internal bluetooth device manufacturer is IBM, the switch can be located in **/proc/acpi/ibm/**
Depending on your hardware, you can find your bluetooth switch in **/proc/acpi/**
Copy this file to **/usr/bin** and make it executable **chmod +x /usr/bin/blu**
#!/bin/bash
cat /proc/acpi/ibm/bluetooth | awk '{ print $2 }' | while read line;
do
if [ $line == "enabled" ]; then
echo disable > /proc/acpi/ibm/bluetooth
else
echo enable > /proc/acpi/ibm/bluetooth
fi
break
done
====== Get a PIN Helper ======
For any bluetooth connection, you will need to have a pin helper agent to complete a pairing.
Old distribution of bluez includes a utility passkey_agent. However the new one does not include one.
So we will need to use either
**bluez-gnome**
http://www.kernel.org/pub/linux/bluetooth/bluez-gnome-1.8.tar.gz
or **kdebluetooth**
http://sourceforge.net/projects/kde-bluetooth/files/kdebluetooth4/
I'm using KDE so I chose kdebluetooth. To run it, in konsole, type
kdebluetooth4 &
Make sure the Agent is registered with dbus. A bluetooth tray icon will appear at the taskbar.
====== Connecting a modem via bluetooth ======
First, you need to bring up the internal bluetooth device by typing
hciconfig
Your output should be like this. The hci0 should be up
{{:slackware:1.png?direct&300|}}
If not, you need to bring it up. Check your blu switched too in case it is turned off.
hciconfig hci0 up
Scan for bluetooth devices, type
hcitool scan
A list of your bluetooth devices will show up. Take note of your MAC Address of your modem device / phone.
Next, search for DUN (Dialup Networking) capabilities of the device.
sdptool search DUN
The output should be something like this.
{{:slackware:2.png?direct&300|}}
Take note of the channel, which in this case is 1. Next step is to bind the phone modem to rfcomm via bluetooth.
rfcomm bind 0 11:22:33:44:55:66 1
Note the syntax is, rfcomm bind ** [channel]** . The dev is 0 for **/dev/rfcomm0**, **bdaddr** is your phone's MAC and **channel** is **1**, the DUN channel from the sdptool command.
Your bluetooth modem is now binded to **/dev/rfcomm0**. You can use your favorite dialer such as [[wp>kppp]] or [[wp>wvdial]] to connect to your network carrier.
Thanks. I hope this helps.
[tag:rfcomm wvdial hciconfig hcitool sdptool maxis broadband kdebluetooth4 bluez bluez-gnome slackware thinkpad]