What's a bluetooth utility for Linux that will let me pair and unpair devices, display messages coming from a device, send messages to a device (hopefully done using the filesystem!), and set any available flags?
The application in mind is that I just want to have say 10 tiny bluetooth keyboards and map each key on each keyboard to send a MIDI message (obviously the midi part is not part of this OP).
Best Answer
Here's a list of several tools dealing with Bluetooth that you can use to interact with a device.
hciconfig
hciconfig
hcitool dev
should also give some of this infohcitool
hcitool inq
andhcitool scan
hcitool info <BTAddr>
l2ping
l2ping <BTAddr>
sdptool
sdptool browse <BTAddr> or sdptool records <BTAddr>
obexftp
obexftp –nopath –noconn –uuid none –bluetooth <BTAddr> –channel <OPUSHChann elNo> –put <FileToPut>
obexftp -b <BTAddr> -v -p <FileToPut>
passkey-agent
passkey-agent –default <Pin>
obexpushd
obexpushd
Pairing
You can following the directions from this site to pair a device with your Linux box via the command line. The aritcle is titled: How to pair a bluetooth device from command line on Linux.
Example
Find your bluetooth device mac address
Setup bluetooth-agent to pass the expected pairing code
Edit the rfcomm config file
/etc/bluetooth/rfcomm.conf
, and put the MAC address from above, in it.NOTE: An important caveat, if you configure your device to not bind at startup (bind no;) you are going to have to manually spin up rfcomm using this command before using the serial port (which also requires root permissions).
References