Adafruit BLE Sniffer Installation on Windows 10
Tom Hildebrand
9/17/2021
The installation requires the following components and steps:
(1) Hardware
Adafruit BLE Sniffer hardware. The product has an on-board Silicon Labs CP210x USB-to-UART bridge, and is preloaded with Silicon Labs sniffer firmware version 2. With the proper driver (see below), it looks to Windows like a COM port. Install the driver (step 2 below), then plug the sniffer dongle into a USB port. The product description is here: https://www.adafruit.com/product/2269
(2) USB/UART bridge driver
Silicon Labs CP210x USB to UART bridge VCP driver
https://www.silabs.com/documents/public ... Driver.zip Other operating systems drivers are also available at their website https://www.silabs.com
Install the USB/UART bridge driver (see above) by extracting the downloaded zip file and running the 64-bit installer CP210xVCPinstaller_x64.exe (or the 32-bit x86 version if your Windows is still 32bit). After the installation, insert the sniffer dongle into a USB port on your computer (direct USB, avoid USB hubs). The sniffer should now be visible in Computer Management > Device Manager > Ports (COM and LPT). It will be listed as “ Silicon Labs CP210x UART Bridge (COMxyz)”.
(3) Python 2
The extcap code below (plugin for Wireshark) was written in/for Python2. Although this is an old version of Python (everybody uses Python3 these days) you need Python2 for this project. The extcap code will not run under Python3. Download the latest (terminal) release of Python2 https://www.python.org/ftp/python-2718/ ... .amd64.msi
Run the downloaded .msi installer. When asked, choose an installation target directory, e.g.
- Code: Select all | TOGGLE FULL SIZE
C:\Program Files\Python27
Now add Python to the command search paths: Search bar > Search “env”. Select the suggested “Edit System Environment Variables” > Tab “Advanced” > Environment variables. In the System Variables list (bottom) highlight “Path” > Edit. Press “NEW” to add a new path. Enter
- Code: Select all | TOGGLE FULL SIZE
C:\Program Files\Python2
(or wherever you installed Python2 in the previous step) and press OK. Then add a path to
- Code: Select all | TOGGLE FULL SIZE
C:\Program Files\Python27\Scripts
and press “OK” , then “OK” on the parent windows that led here. To test the new paths, close all open command prompt windows (if any), open a new command prompt window and type
- Code: Select all | TOGGLE FULL SIZE
path
The new Python27 paths should be in there. In the command prompt window, type
- Code: Select all | TOGGLE FULL SIZE
python
and you should get the interactive Python shell. We don’t need it now, so close it by typing
- Code: Select all | TOGGLE FULL SIZE
<CTRL-Z> <Return>
(4) Python installer “PIP”
We will soon need to install the pyserial package for Python. You can either install pyserial manually (cumbersome) or install a package installer “pip” first (easy), and then pyserial (now also easy). So let’s do that. Open a command window with administrator privileges: in the Windows search box type “command”. In the best match search result, right-click on “Command Prompt” and select “Run as administrator”. In the window that opens, type
- Code: Select all | TOGGLE FULL SIZE
python -m ensurepip –upgrade
That will install “pip”, the Python Package Installer. Try it by typing
- Code: Select all | TOGGLE FULL SIZE
pip
in the same command window, it should just show a help page.
(5) pyserial (Python Serial library)
While still in the administrator command window from the previous step, type
- Code: Select all | TOGGLE FULL SIZE
pip install pyserial
That’s all. You will get a warning that Python2 is old and you should consider Python3. Ok we know that. You may also get a warning that the version of pip we just installed is already outdated. Optionally follow the suggested command to update pip to the latest (but it’s not required for this project).
(6) extcap (plugin for Wireshark)
Install the Nordic Semiconductor extcap (version2.0.0 Beta 1) plugin for Wireshark. Use only this version, do not use version 4 or any other version, they will not work. Download it from the Adafruit website https://cdn-learn.adafruit.com/assets/a ... extcap.zip Extract the contents of the .zip file into the Wireshark extcap folder
- Code: Select all | TOGGLE FULL SIZE
C:\Program Files\Wireshark\extcap
(unless you used a different install path). To test the installation, open a command window and go to the Wireshark extcap folder.
- Code: Select all | TOGGLE FULL SIZE
cd C:\Program Files\Wireshark\extcap
You should see -among other perhaps- a file nrf_sniffer.py and nrf_sniffer.bat. The .bat file is just a helper file to invoke the .py script which for some reason Windows cannot run directly. The code is to be invoked by Wireshark with certain parameters (arguments), but let’s first see if it can be compiled / interpreted without compile errors by typing in the command shell (while in the extcap directory):
- Code: Select all | TOGGLE FULL SIZE
nrf_sniffer.bat
You should get no compiler errors, but you should get the message “No arguments given!”, which is the outcome we were hoping for. We did, after all, invoke nrf_sniffer without any parameters (arguments).
(7) Wireshark
Download and run the latest Windows Installer (64bit) for Wireshark from https://www.wireshark.org/download.html During the installation, accept all suggested components. Accept (or modify) the suggested install path. Accept the suggestion to install Npcap (it is needed). When offered, select installation of USBpcap too. Now Reboot Windows.
(8) Using Wireshark with the BLE sniffer
Start Wireshark. The sniffer should now appear as one of the data sources:
- Code: Select all | TOGGLE FULL SIZE
rNF Sniffer (COMxyz)
Double click on it to start capturing Bluetooth Low Energy (BLE) data packets.