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

trouble capturing using nrf_sniffer_2.0.0-beta-1_51296aa

Hello,

I'm unable to capture packets using the sniffer.  Here are details regarding my set-up:

System: Debian 9.4 with kernel 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3 (2017-12-03) x86_64 GNU/Linux

Sniffer target: pca10040.

Wireshark version: 2.6.1 (built from source, with all default options, except --enable-setuid-install)

Segger J-Link version:  SEGGER J-Link Commander V6.16c (Compiled Jun 16 2017 18:16:23)

Observations and symptoms:

The target shows up as interface /dev/ttyACM0.  I can use minicom to verify that data is being received on that interface.  On the pca10040 target, LED1 is dark; LED2 is blinking quite fast and at a somewhat random cadence, probably indicating received packets; LED3 and LED4 are on solid.

I checked for a permissions problem.  Here are some things I checked:

saturn:~> l /dev/ttyACM0
crw-rw-rw- 1 root dialout 166, 0 Jul 6 10:48 /dev/ttyACM0
saturn:~> groups
ken dialout cdrom floppy audio dip video plugdev scanner bluetooth netdev plex wireshark eclipse
saturn:~>

So, it seems like permissions are OK.  Also, I can use minicom on that interface from a non-root account.  And, I have run a lot of other applications on the same target with no connectivity issues.

I installed the python script nrf_sniffer.py and the subdirectory SnifferAPI in the wireshark extcap directory as specified in the documentation:

saturn:/usr/local/lib/wireshark/extcap> l
total 436
-rwxr-xr-x 1 ken ken 20294 Jan 1 1980 nrf_sniffer.py
-rw-r--r-- 1 ken ken 43 Nov 23 2017 nrf_sniffer.bat
drwxr-sr-x 4 root staff 4096 Jul 3 12:05 ..
-rwxr-xr-x 1 root staff 198864 Jul 5 18:00 androiddump
-rwxr-xr-x 1 root staff 107648 Jul 5 18:00 randpktdump
-rwxr-xr-x 1 root staff 97168 Jul 5 18:00 udpdump
drwxr-sr-x 3 root staff 4096 Jul 5 18:00 .
drwxr-sr-x 2 ken ken 4096 Jul 6 10:20 SnifferAPI

When I start up wireshark, highlight the "nRF Sniffer: /dev/ttyACM0" interface, and then begin a capture, a window pops up immediately indicating "No packets captured."

Additionally, the following appears on the default console:

CaptureEvent [ 1 ]: 256 with session
CaptureEvent [ 2 ]: 1
CaptureEvent [ 257 ]: 2 with session
CaptureEvent [ 257 ]: 4 with session
CaptureEvent [ 2 ]: 8
CaptureEvent [ 2 ]: 16

Any ideas on what's going on or what to try next?

Thanks.

--ken

Parents Reply Children
  • Martin,

    I didn't find much on the wireshark forum on this topic.

    So I decided to try to get this up and running on MacOS. No luck there either.

    Here is my set-up:

    System: MacBook Pro (Retina, 15-inch, Mid 2014) running macOS High Sierra Version 10.13.5.

    Sniffer target: pca10040

    Segger J-Link version: SEGGER J-Link Commander V6.16c (Compiled Jun 16 2017 18:19:39)

    Wireshark version: v2.6.1 (binary downloaded from Wireshark website)

    Python version:

    Kens-MBP:~ ken$ python --version
    Python 2.7.15

    nrf_sniffer test:

    Kens-MBP:extcap ken$ nrf_sniffer.py --extcap-interfaces
    extcap {version=2.0.0}{display=nRF Sniffer}{help=www.nordicsemi.com/.../nRF-Sniffer
    control {number=0}{type=selector}{display=Device}{tooltip=Device list}
    control {number=1}{type=string}{display=Passkey / OOB key}{tooltip=6 digit temporary key or 16 byte Out-of-band (OOB) key in hexadecimal starting with '0x', big endian format. If the entered key is shorter than 16 bytes, it will be zero-padded in front'}{validation=\b^(([0-9]{6})|(0x[0-9a-fA-F]{1,32}))$\b}
    control {number=2}{type=string}{display=Adv Hop}{default=37,38,39}{tooltip=Advertising channel hop sequence. Change the order in which the siffer switches advertising channels. Valid channels are 37, 38 and 39 separated by comma.}{validation=^\s*((37|38|39)\s*,\s*){0,2}(37|38|39){1}\s*$}{required=true}
    control {number=3}{type=button}{role=help}{display=Help}{tooltip=Access user guide (launches browser)}
    control {number=4}{type=button}{role=restore}{display=Defaults}{tooltip=Resets the user interface and clears the log file}
    control {number=5}{type=button}{role=logger}{display=Log}{tooltip=Log per interface}
    value {control=0}{value= }{display=All advertising devices}{default=true}


    Observations and symptoms:

    Target is plugged in and operating as described above in my original post. The interface appears to be /dev/tty.usbmodem1411:

    crw-rw-rw- 1 root wheel 21, 2 Jul 10 12:03 /dev/tty.usbmodem1411

    When wireshark is invoked, no nRF Sniffer shows up in the interface list. Also, there is no Interface Toolbar showing, or even available from the View menu, as described in the User's Manual pdf (note: this was also the case with Wireshark running on Linux).

    See attached screenshot of Wireshark window in macOS context below.

    --ken

Related