NRF Sniffer BLE UG v3.1
NRF Sniffer BLE UG v3.1
v3.0.0
User Guide
v3.1
1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
6 Troubleshooting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Legal notices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4393_261 v3.1 ii
Revision history
Date Version Description
January 2020 3.1 Corrected Python requirements
December 2019 3.0 • Editorial changes to all sections
• Updated to match nRF Sniffer for Bluetooth® LE v3.0.0
November 2017 2.0 • nRF Sniffer updated to work more closely with Wireshark
• Updated software to support the nRF52 DK
April 2014 1.1 Updated firmware, now supports all versions of PCA10000 and
PCA10001
December 2013 1.0 First release
Previous versions
PDF files for relevant previous versions are available here:
• nRF Sniffer User Guide v2.2 (corresponds to nRF Sniffer v2.x)
4393_261 v3.1 iv
1 Introduction
The nRF Sniffer for Bluetooth LE is a useful tool for learning about and debugging Bluetooth Low Energy
applications. It provides a near real-time display of Bluetooth packets that are sent between a selected
Bluetooth Low Energy device and the device it is communicating with, even when the link is encrypted.
When developing a Bluetooth Low Energy product, knowing what happens over-the-air between devices
can help you identify and fix issues quickly.
On startup, the Sniffer lists all nearby Bluetooth Low Energy devices that are advertising, providing the
Bluetooth address and address type, complete or shortened name, and RSSI.
Supported devices
• nRF52 Development Kit (PCA10040)
• nRF52840 Development Kit (PCA10056)
• nRF51 Development Kit (PCA10028)
• nRF51 Dongle (PCA10031)
• nRF51822 Evaluation Kit (PCA10001)
• nRF51422 Evaluation Kit (PCA10003) v3.0.0 or later
• nRF51822 Development Kit dongle (PCA10000)
4393_261 v3.1 5
2 Installing nRF Sniffer
The nRF Sniffer for Bluetooth LE software consists of firmware that is programmed onto a development
board or dongle and a capture plugin for Wireshark that records and analyzes the detected data.
Before you start setting up the nRF Sniffer, make sure that you have the following prerequisites installed
on your computer:
• Wireshark v2.4.6 or later (v3.0.7 or later recommended on Windows). Wireshark is a free software tool
that captures wireless traffic and reproduces it in a readable format.
• Python v3.6 or later.
Download nRF Sniffer for Bluetooth LE v3.x or later and extract the archive into a folder of your choice. In
the following sections, we will refer to this folder as Sniffer_Software.
Then program the firmware to the board, install the nRF Sniffer capture tool, and add a Wireshark profile
for the Sniffer as described in the following sections.
Note: On Windows, the J-Link software is included in nRF Connect for Desktop, so you can skip
this step.
4393_261 v3.1 6
Installing nRF Sniffer
2. Copy the Sniffer capture tool into Wireshark's folder for external capture plugins:
a) Open Wireshark.
b) Go to Help > About Wireshark (on Windows or Linux) or Wireshark > About Wireshark (on macOS).
4393_261 v3.1 7
Installing nRF Sniffer
3. Make sure that the nRF Sniffer files can be run correctly:
a) Open a command window in Wireshark's folder for external capture plugins.
b) Run the Sniffer tool to list available interfaces.
On Windows, type nrf_sniffer_ble.bat --extcap-interfaces. On macOS or Linux,
type nrf_sniffer_ble.sh --extcap-interfaces.
You should see a series of strings, similar to what is shown in the following screenshot.
4393_261 v3.1 8
Installing nRF Sniffer
4393_261 v3.1 9
Installing nRF Sniffer
4393_261 v3.1 10
3 Running nRF Sniffer
To start sniffing, place the board or dongle that runs the nRF Sniffer for Bluetooth LE firmware between
the two devices that are communicating. Then open Wireshark and start recording packets.
Connect the development board or dongle to your computer and turn it on. Then place it between the
Central and Peripheral device that you want to sniff.
When you open Wireshark, the Wireshark capture screen is displayed. It includes the Wireshark interface
for managing packets that are captured, the nRF Sniffer toolbar, and the hardware interfaces connected to
the nRF Sniffer.
Note: If the nRF Sniffer toolbar is not visible, select View > Interface Toolbars > nRF Sniffer for
Bluetooth LE.
To start sniffing, double-click on the hardware interface (nRF Sniffer for Bluetooth LE COM18 in the
following figure).
4393_261 v3.1 11
Running nRF Sniffer
4393_261 v3.1 12
4 nRF Sniffer usage
Once the nRF Sniffer for Bluetooth LE is running, it reports advertisements and lists nearby devices in the
Device List. The software interface has several commands for controlling the operating mode of the Sniffer.
Note: The Sniffer may not pick up all connect requests and will not always pick up on a connection.
In such cases, reconnect and try sniffing again. If you do not see any activity in your Wireshark
console, see Troubleshooting on page 20.
Hardware interface
This list shows the available hardware interfaces. If you have more than one board with the nRF
Sniffer firmware connected, you can choose which one to control with the toolbar. To use several
hardware interfaces at the same time, see Capturing from multiple hardware interfaces on page
14.
Device list
This list shows nearby devices that are advertising. When you start sniffing All advertising devices
is selected. Choose a device from the list to sniff that specific device. When you select a different
device while in a connection, the current connection is lost.
4393_261 v3.1 13
nRF Sniffer usage
RSSI filter
You can apply an RSSI filter on the packets that are being received. Only packets that match the filter
are displayed.
You must set the capture filter in the capture screen in Wireshark. Use the keyword "rssi". For
example, the filter rssi >= -70 will capture only packets that have an RSSI greater than or equal
to -70 dBm.
4393_261 v3.1 14
nRF Sniffer usage
Note: On Windows, this feature is available in Wireshark v3.0.7 and v3.2.0 and later. If you are
using an older version of Wireshark, you must run one instance of Wireshark for each Sniffer
hardware attached to the computer. Select only one hardware interface in each of the Wireshark
instances.
To capture from multiple hardware interface simultaneously, select the hardware interfaces in the capture
screen and click Start Capturing packets.
The captured data contains the interface identifier used by Wireshark to identify the capture interface
(frame.interface_id) and the hardware identifier for the board running the nRF Sniffer firmware
(nordic_ble.board_id).
4393_261 v3.1 15
nRF Sniffer usage
Filtering
PACKET LIST
Extra packet
information
PACKET DETAILS
BLE packet
Use display filters to display a chosen packet subset. Most filters are based on the values of the packets,
such as length or access address. The filter expressions use Boolean operators (&& || == != !). To
construct a filter, click Expression in the filtering bar. See the following table for some examples.
4393_261 v3.1 16
nRF Sniffer usage
• Apply a value as a filter to, for example, see only operations affecting a particular handle. To filter
packets that have a specific value for some field:
a) Right-click the value in the packet details.
b) Click Apply as Filter.
c) Click Selected.
• Save a set of captured packets to be able to look at them later. To do so:
a) Click the Stop button to stop capturing packets.
b) Click File > Save As to save all packets, or click File > Export Specified Packets to save a selection of
packets.
• Clear the packet list and restart a capture by clicking the Restart button.
See the documentation on the Wireshark website for more information.
4393_261 v3.1 17
5 Common sniffing actions
The nRF Sniffer for Bluetooth LE can help you explore and debug Bluetooth Low Energy communication in
a number of typical scenarios.
Note: If the board running the nRF Sniffer firmware is reset, stored pairing information is lost.
4393_261 v3.1 18
Common sniffing actions
b. Type the 6-digit passkey that is displayed on either the Central or the Peripheral device into the
Passkey / OOB key field in Wireshark.
c. Press Enter.
d. Enter the passkey into the other device.
• For connections that use legacy pairing with OOB:
a. Before the devices initiate pairing, type the OOB key in big-endian, hexadecimal format with a
leading "0x" into the Passkey / OOB key field in Wireshark.
b. Press Enter.
c. Connect the Central to the Peripheral device.
d. Initiate pairing between the devices if it does not happen automatically.
• For connections that use LE Secure Connections:
a. Enable Secure Connections debug mode on one or both of the devices.
b. Initiate pairing between the devices if it does not happen automatically.
In debug mode, the connection uses the debug keys specified in the Bluetooth Core Specification.
The Sniffer uses the same keys to decrypt the encrypted packets.
4393_261 v3.1 19
6 Troubleshooting
If you have problems installing or using the nRF Sniffer for Bluetooth LE, see the following sections for
troubleshooting information.
4393_261 v3.1 20
Troubleshooting
4393_261 v3.1 21
Legal notices
By using this documentation you agree to our terms and conditions of use. Nordic Semiconductor may
change these terms and conditions at any time without notice.
Liability disclaimer
Nordic Semiconductor ASA reserves the right to make changes without further notice to the product to
improve reliability, function, or design. Nordic Semiconductor ASA does not assume any liability arising out
of the application or use of any product or circuits described herein.
Nordic Semiconductor ASA does not give any representations or warranties, expressed or implied, as to
the accuracy or completeness of such information and shall have no liability for the consequences of use
of such information. If there are any discrepancies, ambiguities or conflicts in Nordic Semiconductor’s
documentation, the Product Specification prevails.
Nordic Semiconductor ASA reserves the right to make corrections, enhancements, and other changes to
this document without notice.
Trademarks
All trademarks, service marks, trade names, product names, and logos appearing in this documentation
are the property of their respective owners.
Copyright notice
© 2019 Nordic Semiconductor ASA. All rights are reserved. Reproduction in whole or in part is prohibited
without the prior written permission of the copyright holder.
4393_261 v3.1 22