Home

Awesome

Python API for nRF BLE Sniffer

This repository contains the Python API for Nordic's BLE Sniffer, and easy to use sniffer tool.

Features

It has been tested on the following platforms using Python 2.7:

Hardware support

Using sniffer.py

Running sniffer.py in this folder will cause the device to scan for Bluetooth LE devices in range, and log any data from the selected device to a libpcap file (in logs/capture.pcap) that can be opened in Wireshark.

Please specify the serial port where the sniffer can be found (ex. COM14 on Windows, /dev/tty.usbmodem1412311 on OSX, /dev/ttyACM0 on Linux):

python sniffer.py /dev/ttyACM0

You can also start Wireshark in live capture mode:

python ./sniffer.py --pipe /dev/ttyACM0

This will create a log file and start scanning for BLE devices, which should result in the following menu:

$ python sniffer.py /dev/ttyACM0
Logging data to logs/capture.pcap
Connecting to sniffer on /dev/ttyACM0
Scanning for BLE devices (5s) ...
Found 2 BLE devices:

  [1] "" (14:99:E2:05:29:CF, RSSI = -85)
  [2] "My device" (E7:0C:E1:BE:87:66, RSSI = -49)

Select a device to sniff, or '0' to scan again
> 

Simply select the device you wish to sniff, and it will start logging traffic from the specified device.

Type CTRL+C to stop sniffing and quit the application, closing the libpcap log file.

Requirements

This Python script will require that both Python 2.7 and pySerial are installed on your system. For Windows live capture support, you need to install PyWin32.

Known issues and limitations