0

Bluetooth Sniffer - OSX - Not showing as interface in wiresh
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Bluetooth Sniffer - OSX - Not showing as interface in wiresh

by bikr on Mon Jan 14, 2019 7:33 pm

Hello all!

I've installed the software per the manual (including testing with beta 1 and beta 3) of the nrf sniffer.

I confirmed python is working with the test in terminal (running the python script directly) giving no arguments given.

The Sniffer's blue LED (comm) is flashing very fast.

However, when I launch wireshark the interface doesn't show up as an option. The files from the nrfsniffer extcap folder were extracted to the folder represented in the wireshark / about page folders tab for Extcap.

Any ideas?
bikr
 
Posts: 8
Joined: Sat May 11, 2013 8:32 am

Re: Bluetooth Sniffer - OSX - Not showing as interface in wi

by bikr on Mon Jan 14, 2019 7:35 pm

Further:

I got the package from adafruit today.

My mac has USB-C and I'm using the apple brand media adapter for USB conversion from usb-c.
bikr
 
Posts: 8
Joined: Sat May 11, 2013 8:32 am

Re: Bluetooth Sniffer - OSX - Not showing as interface in wi

by bikr on Mon Jan 14, 2019 8:42 pm

Running Wireshark in Terminal shows this error:

Code: Select all | TOGGLE FULL SIZE
joshs-mbp:extcap josh$ /Applications/Wireshark.app/Contents/MacOS/Wireshark
/Applications/Wireshark.app/Contents/MacOS/extcap/nrf_sniffer.bat: line 1: @echo: command not found
python: can't open file '%~dp0nrf_sniffer.py': [Errno 2] No such file or directory
19:37:22.750  Capture Warn sync_pipe_wait_for_child: waitpid returned EINTR. retrying.
bikr
 
Posts: 8
Joined: Sat May 11, 2013 8:32 am

Re: Bluetooth Sniffer - OSX - Not showing as interface in wi

by bikr on Wed Jan 16, 2019 8:26 pm

I was under the impression this forum was for official support. Does no one monitor these posts?
bikr
 
Posts: 8
Joined: Sat May 11, 2013 8:32 am

Re: Bluetooth Sniffer - OSX - Not showing as interface in wi

by merrysmith on Tue Jan 22, 2019 7:31 am

The WiFi doesn't work properly after updating Windows 8 to Windows 10. It is showing Windows 10 Preparing Automatic Repair Error again and again.

merrysmith
 
Posts: 1
Joined: Tue Jan 22, 2019 7:20 am

Re: Bluetooth Sniffer - OSX - Not showing as interface in wi

by ktownsend on Mon Jan 28, 2019 8:25 am

There is something wrong with the system config that it is trying to run that .bat file at all, which is for Windows only (you state you are on OS X). That file contains the following:

Code: Select all | TOGGLE FULL SIZE
$ cd /Applications/Wireshark.app/Contents/MacOS/extcap/
$ cat nrf_sniffer.bat
@echo off
c:\Python27\python.exe "%~dp0nrf_sniffer.py"  %*


As you can see, it's trying to run a Windows only executable and should only be executing on Windows.

What SHOULD be executing is nrf_sniffer.py.

I'm not sure at all why that .bat file is being executed for you. What happens if you run the .py file from the command line? For example:

Code: Select all | TOGGLE FULL SIZE
$ python nrf_sniffer.py --extcap-interfaces

ktownsend
 
Posts: 1447
Joined: Thu Nov 05, 2009 2:18 am

Re: Bluetooth Sniffer - OSX - Not showing as interface in wi

by anikin on Wed Jan 30, 2019 2:57 pm

After a couple of days of tinkering, I finally got Sniffer to work on my mac. There were three steps involved. Two of them are mentioned in the instructions as well as posts above and one step is new. Here are the directions:

1. After downloading and copying nrf_sniffer files into extcap directory, edit nrf_sniffer.py and change the first line to point to your python2.7 executable. I use macports version, so mine resides in /opt/local/bin:

Eugene-MacBook:extcap anikin$ head nrf_sniffer.py
#!/opt/local/bin/python2.7

# Copyright (c) 2017, Nordic Semiconductor ASA

2. Install pyserial package. Ideally it should be as simple as "pip2 install pyserial", but if you have my kind of luck, you may get an error "Could not find a version that satisfies the requirement..." which means that you too have been bitten by TLSV1 vs TLSV2 fiasco. In that case download pyserial directly from https://pypi.org/simple/pyserial/ and install that: "sudo python2.7 -m pip install ~/Downloads/pyserial-3.4/"

If you feel lucky, try launching Wireshark, it may now work. If not, try step 3.

3. Bluefruit LE Friend REQUIRES hardware flow control, whereas Nordic API doesn't specify any. Which means that depending on OS/driver/tty defaults it may or may not work for you. To force hardware flow control, edit SnifferAPI/UART.py and each time you see a line with "ser.baudrate=460800" in it, add "ser.rtscts=True" in a line after it. In my case these are lines 58 and 86. This is Python, you must match indentation exactly!

After these steps it works on my oldish laptop.
Good luck!

anikin
 
Posts: 5
Joined: Fri Sep 07, 2018 6:45 pm

Re: Bluetooth Sniffer - OSX - Not showing as interface in wi

by ktownsend on Mon Feb 04, 2019 11:40 am

Thanks for taking the time to post this. Python conflicts are sadly frequent, especially on OS X which ships with it's own (somewhat locked down) 2.x release, and people may have 3.x available in addition to another (brew, etc.) 2.x release. I've updated the FAQ with a link to your results!

ktownsend
 
Posts: 1447
Joined: Thu Nov 05, 2009 2:18 am

Re: Bluetooth Sniffer - OSX - Not showing as interface in wi

by devangs3 on Mon Apr 29, 2019 12:40 pm

ktownsend wrote:Thanks for taking the time to post this. Python conflicts are sadly frequent, especially on OS X which ships with it's own (somewhat locked down) 2.x release, and people may have 3.x available in addition to another (brew, etc.) 2.x release. I've updated the FAQ with a link to your results!


Hi Kevin, can you tell me what link should I follow to get around this problem on Mac OS? I tried the 3 points above, but cannot make this sniffer work :/

devangs3
 
Posts: 1
Joined: Thu Apr 25, 2019 5:43 pm

Re: Bluetooth Sniffer - OSX - Not showing as interface in wi

by paulsc on Wed Jul 03, 2019 10:48 am

Hi all - also just got a Bluetooth LE Friend Sniffer V2 and having trouble getting it to work. It won't show up in Wireshark.

I tried all the above recommendations.

How can I test the device works with the python script ? The --help output is a little cryptic. Here's what I get when I run "python nrf_sniffer.py --extcap-interfaces":

Code: Select all | TOGGLE FULL SIZE
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}

paulsc
 
Posts: 1
Joined: Wed Jul 03, 2019 10:47 am

Please be positive and constructive with your questions and comments.