Working to sniff Bluetooth Low Energy with the adafruit sniffer
For more information, see this blog post
Going the python route, as described here
before installing pySerial, did ...
apt-get update
apt-get upgrade
which was probably unnecessary and took a long time :-(
then did
sudo pip install pyserial
downloaded the adafruit python sniffer package, sniffer.py
sudo git clone https://github.com/adafruit/Adafruit_BLESniffer_Python.git
changed into that directory
cd Adafruit_BLESniffer_Python/
tried their example command, which worked:
sudo python sniffer.py -h
in order to get pyserial to talk with the usb port, apparently need to do this, to add the "pi" user to the dialout group:
sudo usermod -a -G dialout pi
ok, so now I need a port to listen to ... where the sniffer device is. so apparently I do this:
ls -l /dev/tty*
which lists a whole bunch of things I don't understand, except that the last lines are:
crw------- 1 root root 4, 7 Dec 31 1969 /dev/tty7
crw------- 1 root root 4, 8 Dec 31 1969 /dev/tty8
crw------- 1 root root 4, 9 Dec 31 1969 /dev/tty9
crw-rw---- 1 root tty 204, 64 May 16 13:09 /dev/ttyAMA0
crw-rw---T 1 root dialout 5, 3 Dec 31 1969 /dev/ttyprintk
crw-rw---T 1 root dialout 188, 0 Dec 31 1969 /dev/ttyUSB0
Tried the AMA0 one, which didn't work. The USB0 one, did!
sudo python sniffer.py /dev/ttyUSB0
Results:
Scanning for BLE devices (5s) ...
Found 2 BLE devices:
[1] "" (B8:78:2E:1C:2F:10, RSSI = -104)
[2] "MetaWear" (EA:A1:88:31:45:21, RSSI = -88)
Select a device to sniff, or '0' to scan again
>
Very cool.