Bluetooth file transfer in Ubuntu 13.10 Saucy Salamander or How to accelerate obexftp?

As Ubuntu’s GUI front-end for bluetooth file transfers tends to crash for large files, I am reverting to command line tool obexftp from time to time. It is part of the standard ubuntu distribution and may be installed with

sudo apt-get install obexftp

However, obexftp turns out to be annoying slow. The reason for this are hard-coded settings for the maximum transmission unit (MTA). Increasing these accelerates obecftp significantly and makes it competitive with other tools. However, changing the settings requires patching the source code. The following builds upon a patch posted to a mailing list of the Fedora project.

Obtaining obexftp (and openobex, the core libraray) is a bit tricky, as there are various source code repositories out there. This sourceforge account seems to be the latest with a pretty recent release for download. Obtain both openobex and obexftp and extract the files to your local hard disk. Open file include/openobex/obex_const.h in the openobex directory and change the line

#define OBEX_DEFAULT_MTU 1024

to

#define OBEX_DEFAULT_MTU 16384

Building openobex and eventually obexftp gives you a great boost for bluetooth file transfers.