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.
Now lets untar it.
tar xfvz bluez-4.101.tar.gz
Finally, lets build our package.
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