The Trident Zigbee sniffer is composed of 2 pieces, a sniffer application that runs on embedded hardware and a PC application that communicates to the embedded hardware. The hardware component is used to capture the Zigbee packets and send them over a USB interface to the PC application. The PC application supported today is Wireshark, though there is an AI powered wireless protocol sniffer coming soon from Trident IoT!
To set up hardware that can be used to sniff Zigbee packets, all that is needed is to use elcap to create a new project for the zigbee sniffer application, build it, and flash it to the desired PCBA target. The sniffer application has been provided as a project template so that the end user can build the sniffer application for Trident development boards AND can build the application to run on custom hardware. Once the sniffer application is running on the desired hardware target, the next step is to use the files found at the [your_sniffer_app]/wireshark directory to add the sniffer capabilities into Wireshark. The Extcap extension script, trident_wireshark.py, will look for the USB PID and VID for the Trident development board to allow it to show up in Wireshark so development board must be used to detect by default. If you wish to modify this script to detect other USB targets, you are free to do so as well.
Once the dependencies have been installed, the next step is to extend wireshark to support the Trident Zigbee sniffer. To do this, locate the "wireshark" directory found in the sniffer project created using elcap. This was covered in Sniffer Hardware Setup.
Next, copy the trident_wireshark.py file into the Wireshark Extcap path directory. This can be found by opening Wireshark and going to help->About Wireshark->Folders. As long as python is on your PATH, then this is sufficient to run the extension on MacOS and Linux. For Windows you will also need to copy the trident_wireshark.bat into the same directory. If you run into issues on MacOS then you can also copy the trident_wireshark.sh into the same directory.
Once the file(s) have been copied over, restart wireshark. Once wireshark is open, make sure the "External Capture" interface is enabled. If you have a compatible sniffer hardware device plugged in to your computer then it should appear at this point.
Summary:
Wireshark allows you to create custom color profiles to highlight specific types of Zigbee network traffic. This can be particularly useful when analyzing Zigbee captures to quickly identify different types of packets and network behavior. The color filter configuration file has been provided as part of the sniffer application directory that is created using elcap.
A Trident provided colorfilters file is in the [your_sniffer_app]/wireshark directory along with the other trident_wireshark.* files. Follow the below steps to add this colorfilters file in to your wireshark setup to add color formatting to your Zigbee capture!
Step 1: Create a New Profile in Wireshark
Step 2: Locate the Profile Directory
The profile directory location varies by operating system:
Step 3: Navigate to Profile Directory
Windows:
Linux/macOS:
Step 4: Import Color Filters
Step 5: Activate Your Profile
Step 6: Verify Color Filters
Using the sniffer alongside ZUTH can be challenging because ZUTH requires the system level python version to be set to v3.7. The Extcap extension requires a newer version of python to run so this creates a conflict. This can be resolved by using either the trident_wireshark.bat or trident_wireshark.sh scripts for Windows and MacOS respectively to set the python version to use when running the trident_wireshark.py script from within Wireshark. This is done by specifying the specific version of python to use.
For example,
Plugging a USB-C cable from a computer into the DKNCM11C10 will enable a COM port to appear on the computer. This can be connected used to open a connection to the sniffer app that is running on the device.
| COM Port Settings | |
|---|---|
| Baud | 115200 |
| Data Bits | 8 |
| Stop Bits | 1 |
| Parity | None |
| Flow Control | None |
| Button | Action | Description |
|---|---|---|
| BTN0 | Press | Hardware reset |
| BTN1 | Press | None |
| BTN2 | Press | None |
The LEDs are used to display the status of the running sniffer application. Anytime a new LED state activates, the other LEDs are turned off.
| LED | Behavior | Description |
|---|---|---|
| Green | On solid until new LED behavior overrides | Turns on solid when sniffer starts |
| Red | On solid until new LED behavior overrides | Turns on solid when sniffer is in stopped state |
| Blue | On for 50ms | Turns on for 50ms when packet is received |