Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

NRF 802154 Thread / BT LE - capture packages without PCAP

Hi community,

For debugging / a project in very early stage I need to sniff Thread packages and (later on) Bluetooth (LE) and ZigBee packages.

I would like to use the kindly provided and good Python SDK but want to evaluate captured packages within Python (not within Wireshark from a PCAP). One of the reasons is the need to store some data in a MariaDB database.

Is it possible to handle captured Thread (and BT [LE] + ZigBee) packages within Python? If not, is someone aware of an alternative for this scenario?

Thanks in advance,

Mart.

Parents Reply Children
  • Hi Mart,

    My mistake, you are correct that the documentation only explains how to use the script for pcap files. 

    We do not have anything ready to use for getting the sniffer log as something other than pcap, but you do have some options. One is to export the pcap file to a different file type in Wireshark by going to File > Export Packet Dissection, and then selecting file type. Another option is to convert the pcap file in your Python script using tshark or similar. For this you can look into pyshark (https://github.com/KimiNewt/pyshark/), which is a Python wrapper for tshark. I would suggest trying to integrate the nRF Sniffer Python module into your script as described in the documentation, and then after you stop the sniffer and is done capturing, you use pyshark to process the pcap file.

    Best regards,

    Marte

  • Hi Marte,

    Thanks!

    I will implement the Pyshark solution. As for future releases of the SDK it would be nice if there would be an option to handle packets captured within Python. I can imagine more customers have use for this Slight smile.

    Best regards,

    Mart

Related