Bluetooth support in Linux is maturing. OBEX support is however not available in the Bluez Bluetooth stack yet. With minimal effort you can add support for
this yourself! The tools already exist, you will have to download, compile and install them. This How-To is intended for users who are familiar with Linux.
It is assumed that you have a working Bluez installation. All commands should be run as root, regular users do not have access to required Bluez functionality.
These instructions will probably be useful for using OBEX in general. I had to complete these steps to be able to push files to my Nokia 6600. I am now able to
transfer applications and sound/image files to my phone.
You will probably need the source for your Linux kernel to be able to build this software. Make sure it is available if you run into problems.
OpenOBEX is an open source implementation of the OBEX protocol. It will work with the Bluez Bluetooth stack. Go to http://openobex.sourceforge.net/ for downloads and more information.
Download the software packages called:
OpenOBEX tar gz
OpenOBEX Apps tar gz
As root, copy them to: /usr/src
untar them with:
tar xvzf openobex-1.0.0.tar.gz
tar xvzf openobex-apps-1.0.0.tar.gz
Two directories will be created, containing the source code for OpenOBEX. Enter the openobex-1.0.0 directory to build this software first. A configure script is
included, run the following commands to configure, compile and install OpenOBEX.
./configure
make
make install
Check output from all commands to be sure everything went well. If everything seemed ok, enter the openobex-apps-1.0.0 directory. Use the same commands to build
this software. As always, check the output to make sure everything is in order.
OpenOBEX is now installed. It's time to test the software. Enter:
obex_test
Everything is fine if you get:
Using IrDA transport
OBEX Interactive test client/server.
If it complains about a missing library, you'll have to add the following path to your /etc/ld.so.conf
/usr/local/lib
Then you should run the following command:
ldconfig -v
Now obex_test should run fine. If it does, just Ctrl+C it. We are ready to install another nifty tool.
Obextool is available in the uspp-push package. This can be downloaded from
http://www.unrooted.net/openSource/bluez/index.html. Check the bottom of the page. The ussp-push and obextool link is what you are looking for.
This software can be built as a regular user. Download it to an empty folder in your home folder. Untar it:
tar xvzf ussp-push-0.2.tgz
Enter the ussp-push-0.2 directory and build the software with:
make
As always, check output. This software must be run as root since regular users are incapable of creating connections with Bluez. As root, make a bin directory
in the root home folder. Copy the obextool executable you just built to this bin folder. You will then be able to run it as root from any location.
So far so good! Then it's time to push some data over the Bluetooth link to another Bluetooth device. Find the Bluetooth address of nearby devices:
hcitool scan
Find the OBEX Push service on the device to obtain correct channel number:
sdptool search OPUSH xx:xx:xx:xx:xx:xx (use device Bluetooth address you just found)
Note channel number. You'll need it for obextool. Transfer some file to the device with the following command:
obextool push filename xx:xx:xx:xx:xx:xx y (y is the channel number of the OBEX Push service on the device)
This page was last updated 14. Jul. 2006
Comments and feedback are highly appreciated.
You can reach me at: klings (at) nowires (dot) org