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

The nRF sniffer is not listed in the Wireshark interface.

Recently i have purchased nrF51 Dongle.

Am using Windows 10 (64Bit OS) on my PC.

1. installed nrfgostudio_win-64_1.21.2_installer.msi setup for flashing

2. installed "JLink_Windows_V616c.exe " as well.

3. But used nrFGOStudio and flashed the Dongle with nrf_sniffer_2.0.0-beta-1_51296aa\hex\sniffer_pca10031_51296aa.hex

4. Installed Wireshark version Wireshark v2.4.2

5. Referred the "nRF_Sniffer_UG_v2.1.pdf" 

Section 2.0  Setting up the nRF Sniffer 

Followed all the steps 1 to 8 mentioned under the Install nRF Sniffer heading

Question 1 :Still nRF sniffer is not listed in the Wireshark interface.Please help me.

Question 2: There is no clear steps how to run the sniffer using the beta version of the Python. if i try to run the "nrf_sniffer.py"

C:\Users\20036863>nrf_sniffer.py
Traceback (most recent call last):
File "C:\Users\20036863\nrf_sniffer.py", line 62, in <module>
from SnifferAPI import Sniffer, myVersion, Logger, UART
ImportError: No module named SnifferAPI

if i try to install the package "SnifferAPI"

C:\Python27\Scripts>pip install SnifferAPI
Collecting SnifferAPI
Could not find a version that satisfies the requirement SnifferAPI (from versions: )
No matching distribution found for SnifferAPI

These are the observatrions. Can any one please help me to fix this issue.

  • If you're using the NRF51 development dongle, you want to be using the firmware for board PCA10000. I suggest your read through the user guide and follow the instructions (PDF included with software).

  • You seem to have python 3 and python 2 installed.

    1. Verify that the correct version of python which is python 2.7.x is being used to call the sniffer.

    python --version 

    should report "Python 2.7.x"

    2. Verify that the pyserial 3.4 for Python 2.7.x is installed.

    <path to the Python 2.7.x install>/Scripts/pip list

    should list the pyserial module and the version

    3. Follow the installation instructions to verify that you have executed them with the required software versions in the nRF sniffer user guide

  • nrfsniffer200beta312oct20181c2a221.zip included script "extcap/SnifferAPI/UART.py" is changed baud-rate of the opened serial port.

    But, this way is not as expected on macOS and Windows.

    I made patch for UART.py

    It works well if you can patch follow.

    --- UART.py.orig	2018-10-10 14:48:56.000000000 +0900
    +++ UART.py	2019-04-05 10:26:38.000000000 +0900
    @@ -51,10 +51,9 @@
             try:
                 ser = serial.Serial(
                     port=port,
    -                baudrate=9600,
    +                baudrate=460800,
                     timeout=0.5
                 )
    -            ser.baudrate=460800
                 if write_data:
                     ping_req = ''.join([chr(b) for b in SLIP_ENCODED_PING_REQ])
                     ser.write(ping_req)
    @@ -78,10 +77,9 @@
             try:
                 self.ser = serial.Serial(
                     port=portnum,
    -                baudrate=9600,
    +                baudrate=460800,
                     timeout=0.5
                 )
    -            self.ser.baudrate = 460800
     
             except Exception as e:
                 if self.ser:
    

  • The baudrate change is to work around issues in the Jlink OB COM port for the DKs. I would leave it as it stands.

Related