Skip to content

Packet sniffer

When debugging/verifying a Mira network a packet sniffer will help showing the actual network traffic.

Quick start guide

The quickest way to getting a Packet sniffer running is to use a MiraUSB module.

Install packet sniffer firmware

On a MiraUSB module:

nrfutil dfu usb-serial -p /dev/[YOUR_SERIAL_DEVICE] -pkg packet-sniffer-nrf52840ble.dfu

On a development board without DFU bootloader:

nrfjprog --program packet-sniffer-nrf52840ble-bare.hex --sectorerase

Run packet sniffer

./mira_sniffer.py -d /dev/[YOUR_SERIAL_DEVICE] -p 0x12ab34cd -k ab55aaffba55aaffcd55aaffdc55aaff -a 1 > fil.pcap

Note

(change serial-port, PAN-id and key as needed)

Install dissectors to wireshark config

On unix-like OSes:

mkdir $HOME/.config/wireshark/plugins
cp dissectors/*.lua $HOME/.config/wireshark/plugins/

On Windows:

mkdir %APPDATA%\Wireshark\plugins
xcopy dissectors\*.lua %APPDATA%\Wireshark\plugins
  1. Start wireshark and go to the menu Edit → Preferences → Protocols → DLT_USER (Wireshark → Preferences... → Protocols → DLT_USER on MacOS)

  2. Click "Encapsulations Table Edit..."

  3. Click on the "+" button.

  4. Choose User 1 (DLT=148)

  5. In the "Payload protocol" field of the new row, add "mirav2ip"

  6. Click Ok and Ok

  7. Open the fil.pcap file via the File → Open menu (Ctrl+O on GNU/linux).

Tip

On GNU/linux you can reload the pcap file by Ctrl+R (On Mac Cmd+R)

Make MiraUSB module go to DFU mode

To temporarly set the module in DFU mode, run the following command:

reset_to_dfu.py -d /dev/[YOUR_SERIAL_DEVICE]

Platform support

Packet sniffer software has been tested on the following platforms:

  • Linux
    • x86_64
    • ARMv7-A (Cortex A7, etc)
    • ARMv8-A (Cortex A53, etc)
  • Mac OS
    • x86_64
    • ARM64

For questions and requests, please contact LumenRadio.

Back to top