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

Setting up the nrfSniffer

Hi,

I am following the nRF_Sniffer_UG_v2.2.pdf to setup the nrfSniffer. Wireshark does not show me my board among the interfaces. I had a look at the troubleshooting part. In part 6.1 the given tests are;

1. Run nrf_sniffer.bat --extcap-interfaces to list the interface.

2. If this exits with a python error, verify that python.exe can be run from the command line c:>python.exe --version, where the Python version is the same as Section 1.2 “Required software” on page 2.

My setup passes the second test. I see the version as 2.7.16. However it fails the first test; the outcome is nrf_sniffer.bat is not recognized as an internal or external command . I think the step I am missing is (correct me if I am wrong);

"For Windows - Verify that the path used for python in the nrf_sniffer.bat file correctly points to the required version as stated in “Required software“ on page 2."

Can someone please explain what this means?

Also is requirements.txt in pyserial-master supposed to be empty?

Thanks. 

Parents
  • Hi.

    "For Windows - Verify that the path used for python in the nrf_sniffer.bat file correctly points to the required version as stated in “Required software“ on page 2."

     It means that you have to verify that it is Python 2.7.xx that is running the nrf_sniffer.bat file:

    @echo off
    python "%~dp0nrf_sniffer.py"  %*

    (The content of the file above).

    Have you checked this?

    Also is requirements.txt in pyserial-master supposed to be empty?

     Looks empty on GitHub, you can install it with pip to be sure;

    python -m pip install pyserial

    Best regards,

    Andreas

  • Hi Andreas,

    Thanks for your assistance.

    I can confirm the the content of the nrf_sniffer.bat file's content is as you showed. 

    Yes, I have checked the stuff under 6.1

    I am not sure if pyserial has been installed correctly. How can I make sure of that. I am not experienced in using the cmd terminal. So I will be happy if you can please direct me as required. I have tried to installed pyserial as you said and the output is;

    C:\Users\Denin\Desktop\pyserial-master>python -m pip install pyserial
    Collecting pyserial
      Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000000004DDDC18>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed',)': /simple/pyserial/
      Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000000004DDDD68>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed',)': /simple/pyserial/
      Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000000004DDDF28>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed',)': /simple/pyserial/
      Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000000004E53128>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed',)': /simple/pyserial/
      Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000000004E532E8>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed',)': /simple/pyserial/
      Could not find a version that satisfies the requirement pyserial (from versions: )
    No matching distribution found for pyserial

    Regards,

    Denin

  • Hi Andreas,

    Ok the above problem was because I was not connected to the internet. I did not know that I had to, since the pyserial files were downloaded beforehand. This is solved. 

    I am now having another problem. Wireshark does not work consistently. Every time I close it (or it crashes) I have to power down the nrf board, wait and power it up again. Only then can Wireshark shows the board when I open it. Otherwise it does not. 

    When it shows the board and I double click on it, Wireshark says it has started capturing packets however, usually it does not show any. In the mean time the led on the board blinks like crazy, which means it is receiving many packets. Wireshark happened to show some packets couple of times and for a limited amount of time, like a few seconds and then stopped. 

    I have been going through the "6.3 nRF Sniffer occasionally works and appears unstable" part of the user guide;

    1)Typed sethwf force to the jlink.exe.

    2)Made sure both host firmware and emulator have the same date. The product is version shown on the guide (V2) is different to what I have (V3), but I have installed whatever version comes in the nrfsniffer folder. Please have a look at the screen shot.

    3)When I run jlink.exe no popups are coming up that says "A new firmware version is available.....Do you want to upgrade...?" So I assume it is up do date?

    What else could you suggest me? I have to be able to use sniffer tool properly and effectively to debug my application because I am stuck there. 

    Best regards,

    Denin

  • And I forgot to say..

    In addition to my previous message, when I click "Restart current capture", Wireshark gives me a warning that says "Unable to send control message:Invalid argument"

  • Hi.

    Which version of Wireshark do you have?

    Best regards,

    Andreas

  • Hello Andreas,

    The Wireshark version is 3.0.3.  

    I have been playing around with things to fix it. I want to give you more input; as said Wireshark starts to capture advertising packets and stops capturing after some random time. If I reset the board, it goes on capturing. Please see the picture below. The red arrows are where I reset the board. This makes me think that it is the board that stops sending packets to Wireshark since it timeouts and goes on giving timeout warning until I reset the board. I am using a custom board which hosts nRF52832 based ISP1507. I have been using it without any compatibility problems. 

    Another thing is that when it captures, it only captures advertising packets. I have tried what it says in part 5.3 however it did not help.

    Best regards,

    Denin

  • Hi.

    Can you try this firmware instead: nrf_sniffer_2.0.0_c87e17d.zip

    It's the latest sniffer and it will be released soon.

    Best regards,

    Andreas

Reply Children
Related