Skip to main content

How To: Building a BlueSniper Rifle - Part 2


Updated August 13, 2005

Way back in March, I gave you plans on how to build your own "BlueSniper" rifle in How To: Building a BlueSniper Rifle Part 1. With the BlueSniper rifle, you can discover Bluetooth devices and perhaps perform exploits such as copying an address book. But the physical construction of the rifle is only half of the battle.

Building Your Toolchain

Using a Linux computer, you will be downloading all the necessary packages and then cross-compiling a custom ARM-compatible image. It is essential that your Linux computer be quite fast, as cross-compiling translates the C code into ARM-compatible code and it's pretty compute intensive.

You will need to install a Subversion client on your Linux box, which you can get here. Subversion is an open source version control system alternative to CVS that will build a catalog of necessary files for the build and then download them from a central repository on the Internet . You'll then make a custom Linux distribution for the Gumstix ARM processor from those files. Subversion will also install files necessary for you to cross-compile the Bluetooth hacking programs, which are described later in this article.

After you install Subversion, issue the following command from a shell prompt to start building the library tree:

The Subversion client will make a directory called gumstix-buildroot. Go into the directory by typing in the following.

Now, you need to change the make file to add in the Bluetooth-libs and utils. Edit the make file with a text editor of your choice (I used EMACS).


within the makefile, and change the line following it to

Figure 2 shows the changed line. This will substitute the newest BlueZ drivers for the standard Bluetooth modules. After making the edit, save the file and exit.

Figure 2: Modifying the make file
(click image to enlarge)

Update August 13, 2005

It is also a good idea to add PERL support on the Gumstix, which will allow you to run and make your own Bluetooth PERL scripts. Add in the following line to the make file.

You can add this line right after the edited Bluetooth line and add a comment above it. Remember to start the comment line with a "#"!

You're now ready to start the "make" or compile. Type in

and gcc will start compiling the custom kernel. It will take around an hour or so for make to download and compile the files, so you may want to grab lunch. After the compile is finished, you will have a file around three megaBytes in size called root_fs_arm, located in the directory that you started the make from. This is the file that you will transfer to the Gumstix.