Tuesday, 12 November 2013

Bluetooth file sharing (ObexPush) in GNOME 3.10

As you might remember, GNOME 3.10 switched to using BlueZ 5.x as its Bluetooth backend.

Switching to BlueZ 5.x meant that the old obex-data-server (which was used in both the gvfs ObexFTP backend, and gnome-user-share) couldn't be used anymore. The previously stand-alone obexd was to be used.

Its API is quite different, and it obviously didn't get much testing apart from its target use case, the single-user phone case.

I fixed a number of bugs this week-end, which should make Obex Push server-side (sending files from your phone to your computer) work as expected.

Distributors' homework

First, distributors will need to do a bit of work for you:
- Ship and apply this (not yet upstreamed) patch if you don't have a systemd-based session, so that obexd can be started via D-Bus.
- And ship this patch to have obexd write to the user's cache dir by default.

With both of those patches to BlueZ and gnome-user-share 3.10.1, you should be golden.

Note that the first patch is also required if you want to send files using bluetooth-sendto.

ObexFTP

You'll notice that we didn't mention ObexFTP yet, but we'll do, one last time. ObexFTP support client side hasn't seen any updates for a couple of years, and the server side support for it in obexd didn't match our expectations (such as the inability to kill existing, already made connections).

So ObexFTP support was never finished porting and re-enabled in gnome-user-share. And given that apart from computers and very few phones, the client side support was lacking, we decided to kill the support for it in gnome-user-share.

TL;DR

ObexPush server support is fixed in gnome-user-share 3.10.1, and ObexFTP server support is gone.

5 comments:

Looking forward to try gnome-bluetooth once the fixes land in archlinux' repositories! Since I got 3.10 I haven't quite figured out how to setup a connection between my android phone and GNOME properly, but perhaps it might just be a result of one of the bugs, you mentioned to be fixed now. :)

Pawel: As mentioned in the post, gvfs-obexftp is completely bitrotten, and doesn't work with the new BlueZ. Seeing as it also worked badly in previous releases (as opposed to not at all) and that nobody stepped up to support it, I don't think it will reappear any time soon.

I can no longer send files from my mobile phone to my computer even with Bluez 5.18. Please can you have a look at the bug I reported against Mageia Linux 4? https://bugs.mageia.org/show_bug.cgi?id=13447