I've managed to get bluetooth to work to connect my bluetooth keyboard on Raspbmc. Using
/usr/bin/bluez-test-input connect 20:42:A1:00:96:34 in /etc/rc.local I can even get it connected for when I boot up the computer - so long as the keyboard is in connect mode. The problem is that if the keyboard loses the connection, I can't seem to get it reconnected with the GUI session.
I built a small cron job that checks the output of
hcitool con and reconnects when the connection dies, and it seems to work (as long as the keyboard is in connect mode). It connections according to
hcitool con and the keyboard indicates a connection, but it doesn't appear 'active' for the raspbmc gui session.
How can I get it to reconnect as such?