Capturing the packets between devices is important to learn and debug Bluetooth Low Energy (LE) applications. In this project we'll see how to program the nRF52840 Dongle as a Bluetooth LE Sniffer and by using Wireshark Network Protocol Analyzer with the dongle, we'll be able to capture packets in the surrounding. Particularly we'll sniff a BTLE communication between a Thingy:91 IoT device and a Mobile App and capture the environment sensor data that the Thingy:91 is sending.
The steps for installing and running the sniffer are explicitly described in Nordic's related page, however in the following sections I'll again give the particular instructions for the nRF52840 Dongle:
RequirementsSoftware requirements
Supported operating systems:
In addition to the above, you'll need nRF Connect for Desktop Environment (specifically nRF Connect Programmer) for installing the Sniffer Firmware to the Dongle.
Download the Necessary Files for SnifferYou need to download the necessary zip file(which includes fw hex files, extcap folder and profiles for Wireshark etc.) from the Nordic link and extract it in a folder as you wish.
Programming the nRF52840 DongleUsing the Programmer tool from nRF Connect for Desktop, you'll write the sniffer FW (Click on "Add file" choose "sniffer_nrf52840dongle_nrf52840_**", click on write) file to the Dongle. Before writing, you should make sure that your device is in DFU Bootloader mode by pressing on the reset button on the board (which makes the RGB Led blink in RED), You'll see your device's name as "Open DFU Bootloader" in the list on top left.
Once programming is complete, you'll see your device as "nRF Sniffer for Bluetooth" in the Programmer tool.
-Install requirements by running the following in cmd prompt:
python -m pip install -r requirements.txt
and paste them in the new created extcap folder in wireshark:
-Run the following command in Wireshark extcap folder:
nrf_sniffer_ble.bat --extcap-interfaces
and paste it to the Profiles folder in Wireshark:
And we are ready to run the Sniffer...
Sniffing Packets Between Thingy:91 and nRF Connect for Mobile APPIn the last section of the video (starting from 8:53) you can observe how we sniff the BTLE packets with the nRF52840 Dongle and Wireshark:
Comments