Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Sniffer on OSX - revisited

It looks like the last discussion of Sniffer on Devzone was 2-3 yrs ago.

I’ve ordered the nRF Dongle and will download the Windows-based nRF Sniffer app.

i can run this with WireShark on a Windows VM on my Mac, though I would like a Mac OSX option.

- Any news on that front?

- Any way the Bluetooth hardware built into the MacBook could serve a Mac Sniffer app?

thanks!

Parents
  • Still looking for a solution here.  I think a few others are having the same trouble.

    , what is the next steps?

  • Can you summarize your versions so I can look at it.

    OS Version:
    Wireshark version:
    Python version:
    Pyserial version:

    Segger jlink version on PC:
    Segger jlink version or build date on the jlink emulator on nRF5x-DK:

    nRF Sniffer version:

    PCA board number: 

    =

    Python 32 bit or 64 bit:

    Use: 

    import ctypes
    ctypes.sizeof(ctypes.c_void_p)

    8 -> 64 bit
    4 -> 32 bit

  • Thanks!

    Here's the config.   ?????? where I don't know how to look for it

    OS Version:            OSX 10.13.3 (High Sierra)
    Wireshark version: 2.4.5
    Python version:      2.7.14
    Pyserial version:    3.2.1

    Segger jlink version on PC:    6.16c
    Segger jlink version or build date on the jlink emulator on nRF5x-DK:               ??????

    nRF Sniffer version:   nrf_sniffer_2.0.0-beta-1_51296aa

    PCA board number:    
    - PCA10040 (Dev Kit)
    - PCA10031 (Dongle)

    =

    Python 32 bit or 64 bit:                                 ??????

    Use: 

    import ctypes                                                ??????
    ctypes.sizeof(ctypes.c_void_p)                    ??????        

    8 -> 64 bit                                                     ??????
    4 -> 32 bit                                                     ??????

  • Segger jlink version or build date on the jlink emulator on nRF5x-DK: 

    Look at the nRF Sniffer User guide v2.1 section "Verify that Jlink emulator firmware is correct version"

    =

    Find if the python program running on your computer is 32 bit or 64 bit:

    type "python" to enter the python interpreter

    Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    > import ctypes
    > ctypes.sizeof(ctypes.c_void_p)
    4

  • I don see the bit-ness of the python from this, though the physical machine is a 64-bit, intel-based Mac, less than a year old.

    Davids-MacBook-Pro-2:~ davidelvig$ python
    Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 12:01:12) 
    [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> 
    

    and ctypes...

    >>> import ctypes
    >>> ctypes.sizeof(ctypes.c_void_p)
    8
    >>> 

    and jlinkexe in the OSC terminal app shows:

    Davids-MacBook-Pro-2:~ davidelvig$ jlinkexe
    SEGGER J-Link Commander V6.16c (Compiled Jun 16 2017 18:19:39)
    DLL version V6.16c, compiled Jun 16 2017 18:19:20
    
    Connecting to J-Link via USB...O.K.
    Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 24 2017 17:30:12
    Hardware version: V1.00
    S/N: 682504093
    VTref = 3.300V
    
    
    Type "connect" to establish a target connection, '?' for help
    J-Link>
    

    Thanks a bunch for sticking with this!

    Dave

  • You need to downgrade the firmware as stated in the nRF Sniffer User Guide v2.1. I see that the jlink emulator firmware is "J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 24 2017 17:30:12", which is clearly not what was shipped with jlink 6.16c.

    Use the section "Downgrade the J-Link emulator version on the hardware" in the nRF sniffer user guide v2.1 to downgrade.

    Please do the downgrade and post the jlinkexe in the OS X terminal app again.

  • Thanks.

    I did the following:
    1)    dragged the j-link folder (said 6.16c) to trash.
    2)    deleted the old nrf_sniffer files from the Applications\Wireshark.app...extcap\ directory
    3)    downloaded the sniffer V2 at nrf sniffer V2
    4)    copied the downloaded extcap folder contents into Wireshark's extcap dir, and assured execute privileges for any user
    5)    ran the j-link installation from the v6.16c included with the sniffer download
    6)    ran Terminal and jlinkexe, and then the "exec invalidatefw" command... exited and restarted jlinkexe, resulting in this display

    Davids-MacBook-Pro-2:extcap davidelvig$ jlinkexe
    SEGGER J-Link Commander V6.16c (Compiled Jun 16 2017 18:19:39)
    DLL version V6.16c, compiled Jun 16 2017 18:19:20
    
    Connecting to J-Link via USB...O.K.
    Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jun  9 2017 14:57:23
    Hardware version: V1.00
    S/N: 680476627
    VTref = 3.300V
    
    
    Type "connect" to establish a target connection, '?' for help
    J-Link>

    I can't seem to get the same date on my j-link files as you note above (Jul 24. 17).  Mine are June 16, 17.
    I do see a version 6.16j on the Segger site with that date (Jul 24 17).

    7)    ran "python ./nrf_sniffer.py --extcap-interfaces" from terminal to list interfaces outside of WireShark, resulting in this (which I can't interpret):

    Davids-MacBook-Pro-2:extcap davidelvig$ python ./nrf_sniffer.py --extcap-interfaces
    extcap {version=2.0.0}{display=nRF Sniffer}{help=http://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF-Sniffer#Downloads}
    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}
    Davids-MacBook-Pro-2:extcap davidelvig$ 
    

    Still no interface shows in Wireshark.

    Dang!

    Edit: Just for kicks, I downloaded 6.16j from Segger and installed that, and erased and reprogrammed the dongle.

    Still no luck.

    Am I the only one with these challenges?  I can try to start from scratch (or perhaps on a different Mac).

Reply
  • Thanks.

    I did the following:
    1)    dragged the j-link folder (said 6.16c) to trash.
    2)    deleted the old nrf_sniffer files from the Applications\Wireshark.app...extcap\ directory
    3)    downloaded the sniffer V2 at nrf sniffer V2
    4)    copied the downloaded extcap folder contents into Wireshark's extcap dir, and assured execute privileges for any user
    5)    ran the j-link installation from the v6.16c included with the sniffer download
    6)    ran Terminal and jlinkexe, and then the "exec invalidatefw" command... exited and restarted jlinkexe, resulting in this display

    Davids-MacBook-Pro-2:extcap davidelvig$ jlinkexe
    SEGGER J-Link Commander V6.16c (Compiled Jun 16 2017 18:19:39)
    DLL version V6.16c, compiled Jun 16 2017 18:19:20
    
    Connecting to J-Link via USB...O.K.
    Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jun  9 2017 14:57:23
    Hardware version: V1.00
    S/N: 680476627
    VTref = 3.300V
    
    
    Type "connect" to establish a target connection, '?' for help
    J-Link>

    I can't seem to get the same date on my j-link files as you note above (Jul 24. 17).  Mine are June 16, 17.
    I do see a version 6.16j on the Segger site with that date (Jul 24 17).

    7)    ran "python ./nrf_sniffer.py --extcap-interfaces" from terminal to list interfaces outside of WireShark, resulting in this (which I can't interpret):

    Davids-MacBook-Pro-2:extcap davidelvig$ python ./nrf_sniffer.py --extcap-interfaces
    extcap {version=2.0.0}{display=nRF Sniffer}{help=http://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF-Sniffer#Downloads}
    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}
    Davids-MacBook-Pro-2:extcap davidelvig$ 
    

    Still no interface shows in Wireshark.

    Dang!

    Edit: Just for kicks, I downloaded 6.16j from Segger and installed that, and erased and reprogrammed the dongle.

    Still no luck.

    Am I the only one with these challenges?  I can try to start from scratch (or perhaps on a different Mac).

Children
  • we could try one more thing:

    Can you use screen or any other terminal program on OS X to connect over UART to the board at 19200 baud and disconnect.

    The run the ./nrf_sniffer.py --extcap-interfaces

    Let me know the results.

  • I've not done that before, though I expect I have all I need in equipment.

    Are we able to connect by phone (I could message you)?

    I'm in US Central time

  • I found the modem name, and typed in terminal

         screen cu.usbmodem1461 19200 -L

    ---> blanks, promptness terminal window (? screen window?) from which I can exit with Ctrl-A, Ctrl-K

    Is that helpful? 

  • Davids-MacBook-Pro-2:extcap davidelvig$ ./nrf_sniffer.py --extcap-interfaces
    extcap {version=2.0.0}{display=nRF Sniffer}{help=http://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF-Sniffer#Downloads}
    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}
    Davids-MacBook-Pro-2:extcap davidelvig$ 

  • did you actually give the right path to the UART, it is usually in /dev .

    Verify that by using the "screen <port> 460800", you should see some characters on the screen.

Related