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

nRF Sniffer on nRF52840 Version 3 installation error

Hello,

I am working on a Windows 10 pc. python 3.7 is installed and the requirements.txt has been installed successfully and I have the most current pyserial installed

I have successfully installed firmware hex code on the nRF52840 dev board.

Copied the the contents of Sniffer_Software/extcap to the Wireshark extcap folder

When I run the nrf_sniffer_ble.bat --extcap-interfaces as per the pdf instructions I receive an error.

This results in the following error:

c:\Program Files\Wireshark\extcap>nrf_sniffer_ble.bat --extcap-interfaces
Traceback (most recent call last):
File "c:\Program Files\Wireshark\extcap\nrf_sniffer_ble.py", line 52, in <module>
from SnifferAPI import Sniffer, myVersion, Logger, UART, Devices
File "c:\Program Files\Wireshark\extcap\SnifferAPI\Sniffer.py", line 53, in <module>
from . import SnifferCollector
File "c:\Program Files\Wireshark\extcap\SnifferAPI\SnifferCollector.py", line 37, in <module>
from serial import SerialException
ImportError: cannot import name 'SerialException' from 'serial' (C:\Users\WORK\AppData\Local\Programs\Python\Python37\lib\site-packages\serial\__init__.py)

Can you please help?

Thanks

Rick

Parents
  • Hello Rick,

    Did you copy all of the files and folders from the downloaded extcap folder to the wiresharks extcap folder?

    Can you double check that you have the correct python version in the path when you type "python --version"?

    If it still doesn't work, can you please try to install python 3.8.x? I have this installed on my computer, and I just installed nRF Sniffer version 3, and I didn't experience any problems. If that works, I will report this as a bug internally (because it says that version 3.5 or later should work).

    Best regards,

    Edvin

  •  Thanks Edvin!!! that worked. I am capturing BLE traffic now.

    Thank you for all your assistance, you have enabled me to start developing.

    Regards

    Rick

  • Hi Edvin, I am having issues with loading hex data on my nRF52840 dongle.
    I was unsure of which hex code to load. I started to load hex files using  trial and error to find the correct one.
    Unfortunately after loading the first one I am no longer able to erase and & Write as all the device commands are greyed out except the Reset.

    Also what is the correct hex code?

    Can you please assist?

    Rick

    2020-01-31T14:51:10.965Z INFO Application data folder: C:\Users\WORK\AppData\Roaming\nrfconnect\pc-nrfconnect-programmer
    2020-01-31T14:51:11.180Z DEBUG App pc-nrfconnect-programmer v1.3.1 official
    2020-01-31T14:51:11.181Z DEBUG App path: C:\Users\WORK\.nrfconnect-apps\node_modules\pc-nrfconnect-programmer
    2020-01-31T14:51:11.181Z DEBUG nRFConnect 3.3.0 is supported by the app (^3.3.0)
    2020-01-31T14:51:11.181Z DEBUG nRFConnect path: C:\Users\WORK\AppData\Local\Programs\nrfconnect\resources\app.asar
    2020-01-31T14:51:11.181Z DEBUG HomeDir: C:\Users\WORK
    2020-01-31T14:51:11.181Z DEBUG TmpDir: C:\Users\WORK\AppData\Local\Temp
    2020-01-31T14:51:11.206Z INFO Using nrfjprog library 10.5.0, pc-nrfjprog-js 1.6.0
    2020-01-31T14:51:11.208Z VERBOSE Could not fetch serial number for serial port at COM4
    2020-01-31T14:51:11.208Z VERBOSE Could not fetch serial number for serial port at COM3
    2020-01-31T14:51:35.850Z INFO DFU trigger interface found, changing to bootloader...
    2020-01-31T14:51:36.707Z INFO Using USB SDFU protocol to communicate with target
    2020-01-31T14:51:36.762Z INFO Protocol Version:  1 found
    2020-01-31T14:51:36.802Z INFO Hardware: 52840 found
    2020-01-31T14:51:36.846Z INFO Firmware: Bootloader found
    2020-01-31T14:51:36.846Z INFO Firmware: SoftDevice found
    2020-01-31T14:51:36.846Z INFO Firmware: Application found
    2020-01-31T14:51:58.154Z INFO Parsing HEX file:  C:\Users\WORK\OneDrive - Mohawk College of Applied Arts and Technology\Courses\Bluetooth-LE\nRFSniffer\nrf_sniffer_for_bluetooth_le_3.0.0_129d2b3 (1)\hex\sniffer_pca10031_129d2b3.hex
    2020-01-31T14:51:58.171Z INFO File was last modified at  25/01/2020, 13:53:51
    2020-01-31T14:51:58.184Z INFO Data block: 0x00000000-0x0000359C (0x0000359C  bytes long)
    

  • Hello Rick,

    Sorry if I'm bothering you.

    I just had a few things that I wanted to finish before reporting this internally since you had it up and running. I wanted to check whether I was able to reproduce the issue that you had with the previous version of Python. If it is, in fact, a bug, we should either update the documentation or find a fix, so that others don't need to struggle with the same.

    So which version of Python did you use before you updated to 3.8.1?

    Have a nice weekend.

    Best regards,

    Edvin

  • Sorry Edvin, I should have included that I was using Python version 3.7.6

    Rick

  • cycledude said:
    Sorry Edvin, I should have included that I was using Python version 3.7.6

     No problem :) Thank you!

    I was not aware that you were using the dongle. Unfortunately, the dongle isn't supported in the BLE sniffer. 

    pca100XX is the name of the different HW that we have. pca10056 is the nRF52840 DK, while the pca10059 is the nRF52840 dongle. The reason it doesn't work to use the nRF52840 DK FW on the dongle is because the FW uses UART, via the debugger on board to translate from uart to USB. On the dongle, the UART pins aren't connected to anything, and it doesn't have a debugger to translate from UART to USB. 

    The USB part on the dongle is the actual USB peripheral on the nRF52840. Although technically possible, we don't have any FW for the nRF Sniffer that does this at this point in time. I am sorry.

    Best regards,

    Edvin

  • Thanks. So the Programmer recognizes that the code is invalid and disables all to install it?

    Have a great weekend!

    Rick

Reply Children
  • cycledude said:
    Thanks. So the Programmer recognizes that the code is invalid and disables all to install it?

     Not sure what you mean, but the reason you don't see the dongle in the programmer app is because you programmed it with an application that doesn't use the USB at all, and hence the USB will only be used for power source. If you press the reset button (Not the white button, but the "sideways" button next to it) while the dongle is connected to USB power, it will re-enter bootloader mode, and you can program new applications to it. However, it will still not work with the nRF Sniffer. But now you can at least use it for something else.

    Best regards,
    Edvin

  • Thanks Edwin.

    I have the nRF sniffer working, but all I see are advertising packets.

    Is it possible to have the sniffer follow connection requests it captures?
    If so how do I enable this.

    Rick

  • Yes. If you select the peripheral while it is advertising from the dropdown menu:

    It will follow that device into connection. If you are using pairing or bonding with Out of Band keys, you can also enter the key in the Passkey/OOB field (right next to the dropdown menu), and it will be able to decrypt the encrypted messages as well.

    BR,

    Edvin

Related