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
I know there currently is an issue with Wireshark version: 3.2.0, so you may try Wireshark version: 3.0.7 and/or wait for 3.2.1 that is supposed to be released any day now.
You can also try to install the latest SEGGER j-link / nRF command line tools:https://www.segger.com/downloads/jlink/#J-LinkSoftwareAndDocumentationPackhttps://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Command-Line-Tools/Download
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.
ports = UART.find_sniffer()
#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.
mySniffer = Sniffer.Sniffer(portnum = str(ports))
# Wait to allow the sniffer to discover device mySniffer.
# 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.
## 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?
No, it seems to pass all of those steps