Thursday, 18 June 2009

gdb trick

I had a problem with gnome-bluetooth's wizard, a couple of days ago, that I couldn't reproduce when running under gdb. Turns out that I'm too slow at typing or something, and the problem was a race (though a slow one).

There's a few tips and tricks in this class material. The one I was interested in was:
(gdb) break foobar_new
(gdb) commands
thread apply all bt
continue
end

Then, every time you hit that break point, you'll get a backtrace, and the program will continue. I fixed that bug I saw :)

I'm upstream!

Or at least, my Wacom Bluetooth tablet driver is. I was wondering in which tree it was lost. You'll still need a patch to bluetoothd though.

Tuesday, 16 June 2009

Simplez! Simple Pairing support now in gnome-bluetooth.

After a furious hacking session (and a bunch of paper-drawn mockups), Simple Pairing support is now in gnome-bluetooth.


Simple Pairing is an optional part of the Bluetooth 2.1 spec, which makes pairing Bluetooth device simpler. For most devices, simply check that the passkey matches on your computer and the device, or for headsets, do nothing, and voila, paired.

Code is in git master, release to follow shortly.

Thursday, 4 June 2009

Entrevue

Just got back from France, where my best friend was getting married to his best friend. I didn't see civilisation for 5 days, and enjoyed food, wine, and the swimming-pool instead.

Just before I left Jackaboutboul interviewed me about the fingerprint reader support in Fedora 11. I hope I gave enough credit to Daniel Drake and Ray Strode for their work, without which mine wouldn't look half as good.

PS: I was tired when I wrote the answers, and my grammar and vocabulary is sub-par. I'm ashamed :)

Thursday, 28 May 2009

Plugins, here they come


We now have plugins in gnome-bluetooth. The purpose is to allow third-party applications to offer additional setup steps for the Bluetooth device you just configured.

The above screenshot shows an example plugin that NetworkManager could provide, and with the click of a button, you'd have PAN set up between your computer and your mobile phone.

If your phone supports SyncML, then Conduit could show a button to allow setting up syncing, or when setting a GPS, you could have a button to set it up as the default GPS device for GeoClue.

Those plugin-provided widgets will also be available in a device properties dialogue for the Bluetooth preferences, when I get to it.

PS: Diego has kindly agreed to help out with the FreeFA organisation.
PPS: The widget layout is pretty broken, feel free to send patches through bugzilla.

Wednesday, 27 May 2009

Dear Diego, let's have a wager

Diego, here's a little bet for you. The supporter of the losing team in tonight's final will organise the FreeFA tournament?

Friday, 22 May 2009

Sixaxis support in BlueZ

Getting the Sixaxis PlayStation 3 joypad to work with Linux (in Bluetooth mode) is a bit of a pain. There were my various attempts at cleaning up the code lying around on the Internet, and hacks involving hidd.

The way to set the pad up in Bluetooth mode is fairly straight forward:
  • Open the USB device
  • Get the device's Bluetooth address through magic USB commands
  • Write your Bluetooth adapter's address in the pad (magic USB commands again), and then give the device back to the USB HID driver, so that it works as a pad through USB.
  • Set up the internals of bluetoothd so it recognises the device, and allows it to connect to your computer
  • When the device connects through Bluetooth, poke at it with magic commands again to enable its HID mode (code is already in bluetoothd's input plugin)
Yesterday I refactored my code as a bluetoothd plugin.

First up, detecting the device being plugged in. I wanted to use DeviceKit's GObject helper library, but it uses the D-Bus DeviceKit daemon which will be going away (note, this is just the DeviceKit daemon itself, not the -power, or -disks "sub"-daemons), in favour of libudev usage.

So I ported devkit-gobject to use libudev directly. Patch is currently being reviewed (it's in DavidZ's inbox), and it should show up soon in udev-extras under a different namespace.

After a bit of work, I had a bluetoothd plugin that detected PS3 pads being plugged in, and did the necessary work to make bluetoothd recognise it on plug.


Next, finishing up the libudev GObject helper library, and getting the bluetoothd plugin reviewed. And it would be nice to finally get the extra functionality merged into a hid driver in the kernel.

PS: Any info on the PS3 Headset or the keypad?