Install and configure an Ubertooth One device on Ubuntu 16.04

Well, to configure this open hardware we need to install a lot of tools. Let's go:

$ cd ~
$ git clone https://github.com/greatscottgadgets/ubertooth.git
$ sudo apt-get install python-numpy python-pyside

If you try to run the spectral scanner, you might have this problem:

$ ~/ubertooth/host/python/specan_ui/ubertooth-specan-ui

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "./ubertooth-specan-ui", line 50, in run
    for frequency_axis, rssi_values in frame_source:
  File "/home/nboettcher/ubertooth/host/python/specan_ui/specan/Ubertooth.py", line 46, in specan
    self.proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

This problem, it's because you need to install the ubertooth tools first. To do it, please follow these steps:

$ cd ~/ubertooth/host/
$ mkdir build
$ cd build
$ cmake ..

Checking for module 'libusb-1.0'
--   No package 'libusb-1.0' found
-- Could NOT find LIBUSB (missing:  LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIR) 
-- Building shared library
-- Checking for module 'bluez'
--   No package 'bluez' found

As you see, you need more dependencies. So please install them and run again:

$ sudo apt-get install libusb-1.0-0-dev bluez python-bluez libbluetooth-dev

$ ./ubertooth-specan-ui 
Could not open Ubertooth device
('Failed to run: ', 'ubertooth-specan -d - -l 2400 -u 2483 -U -1')

As you see, we have a probem in specan (without ui). We rut it to see more details:

$ ubertooth-specan -d - -l 2400 -u 2483 -U -1
ubertooth-specan: error while loading shared libraries: libubertooth.so.0: cannot open shared object file: No such file or directory

To fix it, just run ldconfig to refresh our libraries

$ sudo ldconfig
$ sudo ubertooth-specan -d - -l 2400 -u 2483 -U -1
lower: 2402
upper: 2480
libUSB Error: Command Error:  (-9)
Ubertooth running very old firmware found.
Please upgrade to latest released firmware.

Now you have the software running ok, but the firmware is too old. To upgrade, we need move to the firmware folder and install a cross compiler:

$ cd ~/ubertooth/firmware
$ sudo apt-get install gcc-arm-none-eabi
$ make clean
$ DISABLE_TX=1 make bluetooth_rxtx
$ cd bluetooth_rxtx

#backup firmware
$ sudo ubertooth-dfu -u ubertooth-one-bin-firmware-backup.dfu

#upgrade firmware
$ sudo ubertooth-dfu -d bluetooth_rxtx.dfu

$ ubertooth-specan -d - -l 2400 -u 2483 -U 1
lower: 2402
upper: 2480
could not open Ubertooth device

To open the device you need unplug and plug it

$ ubertooth-specan-ui












UPDATE FOR 2017-03-R2 version

After update the code from github, and install libbtbb 2017-03-R2 version from here maybe you will see the following issue:

$ ubertooth-specan-ui         
Could not open Ubertooth device
('Failed to run: ', 'ubertooth-specan -d - -l 2400 -u 2483 -U -1')

If you try to run ubertooth-rx you will see this:

$ ubertooth-rx 
Ubertooth API version 1.01 found, libubertooth 1.0 requires 1.02.
Please upgrade to latest released firmware.

Now, we need to re-install the new firmware which is located in ubertooth/firmware/bluetooth_rxtx folder:

$ ubertooth-dfu -d bluetooth_rxtx.dfu -r
Switching to DFU mode...
Checking firmware signature
........................................
........................................
.........
Detached

Now, remove the USB and plug it again
If we check the firmware version you will see the new:

$ ubertooth-util -v                     
Firmware version: git-3356e5b (API:1.02)

Enjoy!

Comments

Popular posts from this blog

Exception: Could not find a default OpenFlow controller in Mininet

How to fix Android when developer options are not available for this user

Webcam streaming throught VLC with YUY2 compatibility