This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF Sniffer not finding any advertising devices

Hi, 

I am trying to setup a ble sniffer to make sure another one of my devices is sending the correct data to the central. But the nRF sniffer does not seem to be picking up any devices near me. For clarity I know there are many devices advertising in my vicinity, as I have checked on my phone with nRF Connect and lightBlue. I have followed the installation instructions for the firmware and for the python sniffer software and wireshark interface as closely as possible (i do not have admin privileges on my machine). When I open wireshark I can see the sniffer as an interface option, however it does not seem to be picking up any traffic and when i try to start a capture wireshark crashes. Furthermore I have tried to use the sniffer without wireshark and still i get no results. I have used the 'example.py' script as a starting point just to see if the sniffer is working at all but it keeps on a returning an empty list when i try to print out the devices found.

My setup is as follows:

OS: Windows 10, python ver: 3.7.4, pyserial ver: 3.4, Board: nRF52 DK (PCA10040), Wireshark version: 3.2.0, firmware loaded: sniffer_pca10040_129d2b3.hex (from nrf sniffer ble ver 3.0.0)

Something I though I'd mention that seemed strange was that the baud rate of the port that the sniffer is on is set to 9600 by default and I cannot set it higher than ~120,000 in my device manager. I added 9600 to the list of searchable baudrates in UART.py and the port is found and can be opened but after the 'mySniffer.start()' command is given nothing is found. I'm not sure if this is actually a problem or not, but the API guide seems fairly stringent about the baud rate being either 406,800 or 1,000,000.

Any help is appreciated and I am happy to answer more specific questions, Thanks in advance

Patrick

Parents Reply Children
  • Hi Kenneth, I have downloaded the latest version of J-link, but the sniffer is still not returning anything. I'm wondering whether the problem is with my understanding of the API. Is the 'example.py' script supposed to work right off the bat or do I need to change somethings around (besides enter the port number of the sniffer module when instantiating the sniffer class)? As of now i can run the 'example' module and identify which port the sniffer is on but the sniffer is not picking up any packets.

    def setup():
        global mySniffer
        
        ports = UART.find_sniffer()
        print(ports)
        #Initialize the sniffer on COM port COM19.
        #mySniffer = Sniffer.Sniffer(portnum = 'COM31')
        # Or initialize and let the sniffer discover the hardware.
        # mySniffer = Sniffer.Sniffer()
        # Start the sniffer module. This call is mandatory.
        print(str(ports[0]))
        mySniffer = Sniffer.Sniffer(portnum = str(ports[0]))
        mySniffer.start()
        mySniffer.scan()
    
        # Wait to allow the sniffer to discover device mySniffer.
        time.sleep(5)
        # Retrieve list of discovered devicemySniffer.
        d = mySniffer.getDevices()
        # Find device with name "Example".
        #dev = d.find('')
        
    ##    if dev is not None:
    ##        # Follow (sniff) device "Example". This call sends a REQ_FOLLOW command over UART.
    ##        mySniffer.follow(dev)
    ##    else:
    ##        print("Could not find device")

    above is the only part of the example script that I changed (the setup function), I printed out the com port that was found just to make sure its the right port and got rid of the device filter. my out put looks like this:

  • Did you follow the getting started guide first to verify that it works as described there?
    http://infocenter.nordicsemi.com/pdf/nRF_Sniffer_BLE_UG_v3.0.pdf

    Does it fail at any step?

    Kenneth

Related