Monday, June 7, 2010

Using Bluetooth on Linux

I love Linux in most cases but the bluetooth package on Linux BlueZ is just a mess. The first problem was because of a rewrite of BlueZ product to run under Dbus and UDEV and then it was expected that the applications developers would come and build GUI apps for it but the only app seems to be blueman and a kde one, and blueman sucks and I just refuse to build out kde any more, being the massive thing it is .


BlueZ http://bluez.org has like no documentation, now connecting a strange device is never easy but with no documentation it just sucks, and the debug flags are there but don't produce very many messages thus setting this up again sucks. Now if you google this you will not find a hole lot of current documentation, yes lots of doc for the old bluez but almost nothing for the new bluez.

I have connected in the past and current GPS devices using BT and rfcomm and this still seems to work without issues, but just try to create a network using pand with GN, OMG a little doc would be nice. After 2 days of work I got it working and it wasn't that hard, but if you Google stuff like this you just get people stuck in the networking end which is easy, but not the BT connecting end which is all magic with no doc. It turns out that the new Bluez still has the old daemons and utils in it, on Gentoo you need some magic flags and out they come. Now with the old daemons and utils it kinda follows the old documents and some new documents and there are even a few examples and up comes a network. The one thing that took me 2 hours was figuring out that you need to run something like a simple-agent as root on the server machine to auth the connection. Once that was found up came the network and it works, the rest is just normal Linux routing/networking which is normal/easy for me.

Of course where is my document for all of this ?  I'm just keeping it in a safe place for now ...

Some wastland posts

Some wastland posts