summaryrefslogtreecommitdiff
path: root/web/content/usage/build.html
blob: 582763fb1532440dbfa01d22f74a40b798905bea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
--- 
title: Build Guide
---

<h1>Build Guide</h1>
<p>The Ubertooth has been used with the following platforms:
<ul>
    <li><a href="#ubuntu">Ubuntu</a> (Debian/BackTrack 5 - untested)</li>
    <li><a href="#fedora">Fedora</a> (RedHat/CentOS - untested)</li>
    <li><a href="#gentoo">Gentoo</a></li>
    <li><a href="#windows">Windows</a> (experimental - unsupported)</li>
    <li><a href="#osx">Mac OS X</a> (experimental)</li>
</ul>
<p>The firmware image on the Ubertooth is normally tied to the release version
of the host code that it operates with, instructions for obtaining firmware
images and flashing them to the Ubertooth can be found <a href="#firmware">here.</a></p>

<h2 id="ubuntu">Ubuntu 12.04+</h2>
(Debian/BackTrack 5 - untested)
<br /><br />
<h3>Prerequisites</h3>
<p>There are some prerequisites that can be installed from the apt repositories
on Debian/Ubuntu systems:</p>
<pre>
  sudo apt-get install libusb-1.0-0-dev make gcc pyside-tools
</pre>

<p>PyUSB is not yet available from the apt repositories, so it must be
downloaded and built from sourece as follows:</p>
<pre>
  wget http://sourceforge.net/projects/pyusb/files/PyUSB%201.0/1.0.0-alpha-2/pyusb-1.0.0a2.tar.gz/download -O pyusb-1.0.0a2.tar.gz
  tar xvf pyusb-1.0.0a2.tar.gz
  cd pyusb-1.0.0a2
  sudo python setup.py install
</pre>

<p>Next the Bluetooth baseband library (libbtbb) needs to be built for the
Ubertooth tools to decode Bluetooth packets:</p>
<pre>
  wget http://sourceforge.net/projects/libbtbb/files/libbtbb-2012-10-R1.tar.xz/download -O libbtbb-2012-10-R1.tar.xz
  tar xf libbtbb-2012-10-R1.tar.xz
  cd libbtbb-2012-10-R1
  make
  sudo make install
</pre>
<br />

<h3>Ubertooth tools</h3>
<p>There are three sets of tools that use the Ubertooth - spectrum analyzer,
Bluetooth sniffing tools and firmware update.  All three are built and installed
by default using the following method:</p>
<pre>
  wget http://sourceforge.net/projects/ubertooth/files/ubertooth-2012-10-R1.tar.xz/download -O ubertooth-2012-10-R1.tar.xz
  tar xf ubertooth-2012-10-R1.tar.xz
  cd ubertooth-2012-10-R1/host
  make
  sudo make install
</pre>
<p>If using the ubertooth-follow tool, the Bluetooth library headers are
required and the tools need to be built with the "clock_debug" flag set:</p>
<pre>
  sudo apt-get install libbluetooth-dev
  cd ubertooth-2012-10-R1/host
  make clock_debug=true
  sudo make clock_debug=true install
</pre>
<br />

<h3>Kismet</h3>
<p>The version if kismet provided by Debian/Ubuntu is 2008-05-R1, which is too 
old to support the Ubertooth plugin.  In order to use Ubertooth with Kismet it 
is nessecary to compile Kismet from source:</p>
<pre>
  sudo apt-get install libpcap0.8-dev libcap-dev pkg-config \
  build-essential libnl-dev libncurses-dev libpcre3-dev \
  libpcap-dev libcap-dev
  wget http://www.kismetwireless.net/code/kismet-2011-03-R2.tar.gz
  tar xf kismet-2011-03-R2.tar.gz
  ln -s ubertooth-2012-10-R1/host/kismet/plugin-ubertooth kismet-2011-03-R2/
  cd kismet-2011-03-R2
  ./configure
  make && make plugins
  sudo make suidinstall
  sudo make plugins-install
  Add "pcapbtbb" to the "logtypes=..." line in kismet.conf
</pre>
<br />
<h3>Wireshark</h3>
<p>The Wireshark plugin allows Bluetooth baseband traffic that has been captured
using Kismet to be analysed and disected within the Wireshark GUI.  It is built
separately from the rest of the Ubertooth and libbtbb software:</p>
<pre>
  sudo apt-get install wireshark wireshark-dev \
  libwireshark1 libwireshark-dev
  cd libbtbb-2012-10-R1/wireshark/plugins/btbb
  cmake -DCMAKE_INSTALL_LIBDIR=/usr/lib/wireshark/libwireshark1/plugins .
  make
  sudo make install
</pre>

<p>This completes the install of the Ubertooth tools, the next step is to
look at the <a href="../start">getting started</a> guide.  It may also be
useful to update the <a href="#firmware">firmware</a> on the Ubertooth.</p>


<h2 id="fedora">Fedora 17+</h2>
(RedHat/CentOS - untested)
<br /><br />
<h3>Prerequisites</h3>
<p>There are some prerequisites that can be installed from the yum repositories
on RedHat based systems:</p>
<pre>
  su -c "yum install libusb1-devel make gcc pyside-tools \
  pyusb wget tar"
</pre>

<p>Next the Bluetooth baseband library (libbtbb) needs to be built for the
Ubertooth tools to decode Bluetooth packets:</p>
<pre>
  wget http://sourceforge.net/projects/libbtbb/files/libbtbb-2012-10-R1.tar.xz/download -O libbtbb-2012-10-R1.tar.xz
  tar xf libbtbb-2012-10-R1.tar.xz
  cd libbtbb-2012-10-R1
  make
  su -c "make install"
</pre>
</pre>
<p>If using the ubertooth-follow tool, the Bluetooth library headers are
required and the tools need to be built with the "clock_debug" flag set:</p>
<pre>
  su -c "yum install libbluetooth-dev"
  cd ubertooth-2012-10-R1/host
  make clock_debug=true
  sudo make clock_debug=true install
</pre>
<br />

<h3>Ubertooth tools</h3>
<p>There are three sets of tools that use the Ubertooth - spectrum analyzer,
Bluetooth sniffing tools and firmware update.  All three are built and installed
by default using the following method:</p>
<pre>
  wget http://sourceforge.net/projects/ubertooth/files/ubertooth-2012-10-R1.tar.xz/download -O ubertooth-2012-10-R1.tar.xz
  tar xf ubertooth-2012-10-R1.tar.xz
  cd ubertooth-2012-10-R1/host/bluetooth_rxtx
  make
</pre>
<br />

<h3>Kismet</h3>
<p>The version if kismet provided by Fedora does not have a corresponding
development package, so in order to build the Ubertooth plugin it is nessecary
to compile Kismet from source:</p>
<pre>
  su -c "yum install libpcap-devel libcap-devel libnl-devel \
  libstdc++-devel gcc-c++ ncurses-devel"
  wget http://www.kismetwireless.net/code/kismet-2011-03-R2.tar.gz
  tar xf kismet-2011-03-R2.tar.gz
  ln -s ubertooth-2012-10-R1/host/kismet/plugin-ubertooth kismet-2011-03-R2/
  cd kismet-2011-03-R2
  ./configure
  make && make plugins
  su -c "make suidinstall"
  su -c "make plugins-install"
  Add "pcapbtbb" to the "logtypes=..." line in kismet.conf
</pre>
<br />
<h3>Wireshark</h3>
<p>The Wireshark plugin allows Bluetooth baseband traffic that has been captured
using Kismet to be analysed and disected within the Wireshark GUI.  It is built
separately from the rest of the Ubertooth and libbtbb software:</p>
<pre>
  su -c "yum install wireshark wireshark-devel"
  cd libbtbb-2012-10-R1/wireshark/plugins/btbb
  cmake .
  make
  su -c "make install"
</pre>


<p>This completes the install of the Ubertooth tools, the next step is to
look at the <a href="../start">getting started</a> guide.  It may also be
useful to update the <a href="#firmware">firmware</a> on the Ubertooth.</p>


<h2 id="gentoo">Gentoo</h2>
<p>Libbtbb, Ubertooth and the Kismet and Wireshark plugins are all supported
out of the box in Gentoo.  To install, simply use emerge as follows:</p>
<pre>
  emerge libbtbb
  emerge kismet-ubertooth
</pre>
<p>This completes the install of the Ubertooth tools, the next step is to
look at the <a href="../start">getting started</a> guide.  It may also be
useful to update the <a href="#firmware">firmware</a> on the Ubertooth.</p>
<br />


<h2 id="windows">Windows</h2>
<p>Experimental Windows support is available under Cygwin.  Although this is
unsupported.</p>
<br />

<h3>Prerequisites</h3>
<p>The first step is to download Cygwin from <a href="http://cygwin.com/setup.exe">
http://cygwin.com/setup.exe</a> and install it.  When installing Cygwin, the
following tools are required:</p>
<pre>
  gcc
  automake
  python
  libusb-1.0
  libusb-1.0-dev
</pre>

<p>Libbtbb needs to be built before the Ubertooth tools, it is available from
SourceForge as follows:</p>
<pre>
  wget http://sourceforge.net/projects/libbtbb/files/libbtbb-2012-10-R1.tar.xz/download -O libbtbb-2012-10-R1.tar.xz
  tar xf libbtbb-2012-10-R1.tar.xz
  cd libbtbb-2012-10-R1
  make
  make cygwin-install
</pre>
<br />

<h3>Ubertooth tools</h3>
<p>There are three sets of tools that use the Ubertooth - spectrum analyzer,
Bluetooth sniffing tools and firmware upload.  All three are built and installed
by default using the following method:</p>
<pre>
  wget http://sourceforge.net/projects/ubertooth/files/ubertooth-2012-10-R1.tar.xz/download -O ubertooth-2012-10-R1.tar.xz
  tar xf ubertooth-2012-10-R1.tar.xz
  cd ubertooth-2012-10-R1/host/bluetooth_rxtx
  make
  make cygwin-install
</pre>
<br />

<h3>Kismet</h3>
<p>It is not possible to build Kismet with pcap support on Windows.
Unfortunatley the Ubertooth plugin requires pcap support to function, so it
cannot currently be built on Windows.</p>

<p>This completes the install of the Ubertooth tools, the next step is to
look at the <a href="../start">getting started</a> guide.  It may also be
useful to update the <a href="#firmware">firmware</a> on the Ubertooth.</p>


<h2 id="osx">Mac OSX</h2>
<br /><br />
<h3>Prerequisites</h3>
<p>There are some prerequisites that can be installed from the
<a href="http://www.macports.org/">MacPorts</a> systems:</p>
<pre>
  sudo port install libusb py26-pyside-tools py26-pyusb-devel
</pre>

<p>PyUSB is not yet available from the apt repositories, so it must be
downloaded and built from sourece as follows:</p>
<pre>
  wget http://sourceforge.net/projects/pyusb/files/PyUSB%201.0/1.0.0-alpha-2/pyusb-1.0.0a2.tar.gz/download -O pyusb-1.0.0a2.tar.gz
  tar xvf pyusb-1.0.0a2.tar.gz
  cd pyusb-1.0.0a2
  sudo python setup.py install
</pre>

<p>Next the Bluetooth baseband library (libbtbb) needs to be built for the
Ubertooth tools to decode Bluetooth packets:</p>
<pre>
  wget http://sourceforge.net/projects/libbtbb/files/libbtbb-2012-10-R1.tar.xz/download -O libbtbb-2012-10-R1.tar.xz
  tar xf libbtbb-2012-10-R1.tar.xz
  cd libbtbb-2012-10-R1
  make osx
  sudo make osx-install
</pre>
<br />

<h3>Ubertooth tools</h3>
<p>There are three sets of tools that use the Ubertooth - spectrum analyzer,
Bluetooth sniffing tools and firmware update.  All three are built and installed
by default using the following method:</p>
<pre>
  wget http://sourceforge.net/projects/ubertooth/files/ubertooth-2012-10-R1.tar.xz/download -O ubertooth-2012-10-R1.tar.xz
  tar xf ubertooth-2012-10-R1.tar.xz
  cd ubertooth-2012-10-R1/host
  make
  sudo make osx-install
</pre>
<br />

<h3>Kismet</h3>
<p>In order to use Ubertooth with Kismet it is nessecary to compile Kismet from
source, with the plugin linked to the source tree:</p>
<pre>
  First, create a kismet user group
  wget http://www.kismetwireless.net/code/kismet-2011-03-R2.tar.gz
  tar xf kismet-2011-03-R2.tar.gz
  ln -s ubertooth-2012-10-R1/host/kismet/plugin-ubertooth kismet-2011-03-R2/
  cd kismet-2011-03-R2
  ./configure --prefix=/opt/local --with-suidgroup=kismet
  make && make plugins
  sudo make suidinstall
  sudo make plugins-install
  Add "pcapbtbb" to the "logtypes=..." line in kismet.conf
</pre>
<br />

<h3>Wireshark</h3>
<p>The Wireshark plugin allows Bluetooth baseband traffic that has been captured
using Kismet to be analysed and disected within the Wireshark GUI.  It is built
separately from the rest of the Ubertooth and libbtbb software:</p>
<pre>
  sudo port install wireshark wireshark-devel
  cd libbtbb-2012-10-R1/wireshark/plugins/btbb
  cmake -DCMAKE_INSTALL_LIBDIR=/usr/lib/wireshark/libwireshark1/plugins .
  make
  sudo make install
</pre>

<p>This completes the install of the Ubertooth tools, the next step is to
look at the <a href="../start">getting started</a> guide.  It may also be
useful to update the <a href="#firmware">firmware</a> on the Ubertooth.</p>


<div id="firmware"></div>
<h2>Firmware</h2>
<p>Binary firmware images are available as part of the release package.  They
are specific to the version of the Ubertooth being used (Ubertooth one,
Ubertooth zero, Toorcon 13 badge).  To write a firmware image to a device, use
the ubertooth-dfu tool:</p>
<pre>
  ubertooth-dfu --write bluetooth_rxtx.dfu --detach
</pre>
<br />
<h3>Building firmware</h3>
<p>Firmware images are built using the Arm Cortex M3 version of gcc, which is
available <a href="https://launchpad.net/gcc-arm-embedded">here</a>.</p>
<pre>
  wget https://launchpad.net/gcc-arm-embedded/4.6/4.6-2012-q2-update/+download/gcc-arm-none-eabi-4_6-2012q2-20120614.tar.bz2
  tar xf gcc-arm-none-eabi-4_6-2012q2-20120614.tar.bz2
  sudo cp -R gcc-arm-none-eabi-4_6-2012q2 /opt/
</pre>
<p>You will probably need to add the compiler to your path as follows:</p>
<pre>
  export PATH=$PATH:/opt/gcc-arm-none-eabi-4_6-2012q2/bin
</pre>
<p>To add this permanently to your path, run the following:</p>
<pre>
  echo "export PATH=$PATH:/opt/gcc-arm-none-eabi-4_6-2012q2/bin" >> ~/.bashrc
</pre>
<br />
<p>In order to flash a firmware image to the Ubertooth the ubertooth-dfu tool
can be used; it should have been installed along with the Ubertooth tools
earlier.  It is used as follows:</p>
<pre>
  ubertooth-dfu --write bluetooth_rxtx --detach
</pre>
<br />
<p>If for some reason the image flashed to the Ubertooth makes the device
unresponsive the inbuilt bootloader allows the device to be reflashed.  To
trigger bootloader (flashing) mode, use the following steps:</p>
<pre>
  Disconnect the Ubertooth from the host system
  Using a paperclip, short pins 1 and 3 on the expansion header (<a href="../../hardware/one/#pins">shown here</a>)
  Reconnect to the  host system
</pre>
<br />