NRFSniffer python tools: How to capture the connection phase

Hi

We are using NRF_51422 dongle in our university for Labs development with students

We were able to setup & install the NRF_sniffer. It is working with the command line  python nrf_sniffer.py and we were able to capture traces with the command

   python nrf_sniffer_ble.py --extcap-interface COM6-None --capture --fifo myOutput_connect.pcap

Unfortunately, we cannot for the moment capture CONNECT req messages.

In your doc you mention that (https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_sniffer_ble%2FUG%2Fsniffer_ble%2Fsniffer_usage.html) the 2nd mode of opertation allows

  1. Follow one particular device and try to catch all packets sent to or from this particular device. This mode catches all:
    • Advertisements and Scan Responses sent from the device
    • Scan Requests and Connect Requests sent to the device
    • Packets in the connection sent between the two devices in the connection

But I cannot find any example of command line that allows this capture

In your doc here https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_sniffer_ble%2FUG%2Fsniffer_ble%2Fsniffer_usage.html you refer to wireshark for selecting the peripheral but in our case (cmd.exe not allowed on the PC) the automatic capture from wireshark is not possible. We have to capture manually & then open file from wireshark

We tried the following command

python nrf_sniffer_ble.py --extcap-interface COM6-None --capture --fifo myOutput_connect.pcap --device fd:e0:99:56:27:c2

But not CON_REQ message ..

Which procedure should we follow ?

Thanks a lot for your help

Regards

Parents
  • Hi,

    Thanks very much for your answer.

    I'm very surprised that the capture is not possible on the connection ..?? Are you really sure that I have to develop this  code, meaning that this sniffer_ble.py is only capable of sniffing ADV_IND ?? I'm not a deep expert in python but the code seems much extended and seems to cover this space also..

    Are you aware of any other example of command line that are refering to this code ?

    I'm a bit reluctant trying to recode something that may already work 

    I really thank you for your support

    Regards

    Vincent

Reply
  • Hi,

    Thanks very much for your answer.

    I'm very surprised that the capture is not possible on the connection ..?? Are you really sure that I have to develop this  code, meaning that this sniffer_ble.py is only capable of sniffing ADV_IND ?? I'm not a deep expert in python but the code seems much extended and seems to cover this space also..

    Are you aware of any other example of command line that are refering to this code ?

    I'm a bit reluctant trying to recode something that may already work 

    I really thank you for your support

    Regards

    Vincent

Children
  • Hi Vincent, 

    The sniffer_ble.py expects a command from Wireshark drop down menu (the handle_control_command()) to start tracking the device. It's not something you can input in the commandline arguments when calling python. 


    It's API from Wireshark that communicate to the python application directly. So I afraid the easiest way is still to modify nrf_sniffer_ble.py to add the command in, or you can write your own python code for that. 

Related