Packet Sniffer

Setting Up Ubiqua Protocol analyzer

Install the Required Software

Required Hardware

The following board should be used with the Ubiqua Protocol Analyzer:

The CC2531 dongle is pre-programmed with the packet sniffer firmware. It is not necessary to reprogram the CC2531 dongle.

Hardware Setup

  • Connect the CC2531 to the computer with Ubiqua installed.
  • If necessary, use SmartRF Flash Programmer with the cc-debugger to flash the CC2531 dongle. Use the hex image sniffer_fw_cc2531.hex at C:\Program Files (x86)\Texas Instruments\SmartRF Tools\Packet Sniffer\bin\general\firmware.

Running the Packet Sniffer

  1. Connect the CC2531.
  2. Start Ubiqua.
  3. Select MenuDeviceAdd Device, and choose the CC2531.
ubiqua add device

Figure 20. ubiqua add device

  1. Set the Default Protocol to Thread select MenuToolsOptions then select GeneralDefault Protocol Stack and set it to Thread.
ubiqua options

Figure 21. ubiqua options

ubiqua select thread protocol option

Figure 22. ubiqua select thread protocol option

  1. Enter the default Thread Encryption keys.
ubiqua add device

Figure 23. ubiqua add device

  1. From the OptionsSecurity TabKeyChain, choose Add, then select Thread Master Key By default, the OpenThread Thread Master Key is: 00112233445566778899aabbccddeeff Click OK.
ubiqua add key option

Figure 24. ubiqua add key option

  1. Choose the Channel.
CLI device:to choose the channel via the channel command.
NCP device:is told via wpantund what channel to use via various configuration steps. (See the TI OpenThread Linux Quick Start Guide for details)
config channel

Figure 25. config channel

From Ubiqua, select MenuDevice Channel, and choose the matching channel.

ubiqua select channel

Figure 26. ubiqua select channel

  1. Start Capture.

From Ubiqua, Select MenuDeviceStart Device.

ubiqua start

Figure 27. ubiqua start

  1. If required, Select: MenuViewTraffic View (or other selections) to view activity.

Setting Up Wireshark

To use a CC26x2 LaunchPad or other Texas Instruments device with Wireshark, download the SmartRF Protocol Packet Sniffer 2 and follow the User’s Guide to setup the Sniffer Agent.

  1. Open the SmartRF Protocol Packet Sniffer 2 and Wireshark as seen in Figure 28.
Open Wireshark and Sniffer Agent

Figure 28. Open Wireshark and Sniffer Agent

  1. Edit the Wireshark preferences by going to EditPreferences as seen in Figure 29.
Edit Wireshark Preferences

Figure 29. Edit Wireshark Preferences

  1. Select the Thread Protocol dissector configuration by selecting on the right ProtocolThread. Then set the Decode CoAP for Thread option as seen in Figure 30.
Edit Wireshark Thread Preferences

Figure 30. Edit Wireshark Thread Preferences

  1. Select the CoAP Protocol dissector configuration by selecting on the right ProtocolCoAP and make sure that the port matches that seen in Figure 31.
Edit Wireshark CoAP Preferences

Figure 31. Edit Wireshark CoAP Preferences

  1. Select the IEEE 802.15.4 Protocol dissector configuration by selecting on the right ProtocolIEEE 802.15.4 and make sure that the configuration matches that seen in Figure 32.
Edit Wireshark IEEE 802.15.4 Preferences

Figure 32. Edit Wireshark IEEE 802.15.4 Preferences

  1. In the IEEE 802.15.4 Protocol dissector configuration, add a Thread Master key by selecting the Edit... button next to Decryption Keys and clicking the + button as seen in Figure 33.
Add IEEE 802.15.4 Decryption Key

Figure 33. Add IEEE 802.15.4 Decryption Key

  1. Set a key entry with:

    Decryption Key 00112233445566778899aabbccddeeff
    Decryption Key Index 1
    Key hash Thread hash

    As seen in Figure 34.

Note

The Decryption Key is the default value for OpenThread. This should be set to a random value in production. You may have to determine the actual Thread Master Key for a given network. The Thread Test Harness does change these keys in the course of its tests.

Add IEEE 802.15.4 Decryption Key

Figure 34. Add IEEE 802.15.4 Decryption Key

  1. The packets in Wireshark should now be decrypted and dissected correctly as in Figure 35.
Thread Traffic

Figure 35. Thread Traffic