Tuesday, June 5, 2012

Installing the latest bluez software in ubuntu 12.04 along with the test suite tools

Compiling the bluez software in linux is fairly straight forward, but getting getting the bluez test applications to build can be a pain your first time doing it. The test tools included with the source give us many cool applications not typically installed with ubuntus binary bluez package (i.e. apt-get install bluez). One of the applications included in the test tools that I use all the time is bdaddr. The bluez bdaddr tool allows users to change thier bluetooth mac address which can be useful for mitm attacks on bluetooth devices.
This tutorial is really short, but it should save you tons of time if you have never done this before. The thing that hung me up my first time was the build dependancy in the test tools called "check". If check is not installed, the test tools build fails, but the rest of the bluez source is compiled. This can lead to some frustration if you cant figure out why your test tools are not being compiled. Lets get started...
First, lets install some required tools.
sudo apt-get install build-essential libdbus-1-dev check
Now, lets download the latest bluez software.
wget http://www.kernel.org/pub/linux/bluetooth/bluez-4.101.tar.gz
Now lets untar it.
tar xfvz bluez-4.101.tar.gz
Finally, lets build our package.
cd bluez-4.101
./configure --enable-test
If you want, you can now run "sudo make install" to install the binaries to your distro packages. I typically dont do this. Also, if you are looking for the bdaddr tool, it is built in the bluez source's "test" directory

1 comment:

  1. Hi,
    Glib 2.28 missing.
    I had to install libglib2.0-dev