nrf_sniffer fails for non-superuser on raspbian

I'm developing a BTLE sniffer app to run on a headless raspberry pi 4 with html/php/js access. The application runs well on the development platform - Ubuntu 22.04.

On the raspberry pi, logged in as the user that installed everything:

  tshark -D

shows /dev/ttyACM0-4.0 (nRF Sniffer for Bluetooth LE)

  wireshark -Hkw <file-name> -i "nRF Sniffer for Bluetooth LE" -platform offscreen

works fine.

Via appache2/php (user www-data) it doesn't work. tshark doesn't see the sniffer.

Logged in as user www-data (sudo -s -u www-data), tshark -D does *not* show the sniffer.

In experimenting with permissions, I set all the nrf_sniffer files to execute, and this started happening with tshark -D:

/usr/lib/aarch64-linux-gnu/wireshark/extcap/nrf_sniffer_ble.bat: 1: @echo: Permission denied
: Permission deniednux-gnu/wireshark/extcap/nrf_sniffer_ble.bat: 2:
/usr/lib/aarch64-linux-gnu/wireshark/extcap/nrf_sniffer_ble.bat: 3: rem: Permission denied
/usr/lib/aarch64-linux-gnu/wireshark/extcap/nrf_sniffer_ble.bat: 18: Syntax error: Unterminated quoted string
/usr/lib/aarch64-linux-gnu/wireshark/extcap/nrf_sniffer_ble.bat: 1: @echo: Permission denied
: Permission deniednux-gnu/wireshark/extcap/nrf_sniffer_ble.bat: 2:
/usr/lib/aarch64-linux-gnu/wireshark/extcap/nrf_sniffer_ble.bat: 3: rem: Permission denied
/usr/lib/aarch64-linux-gnu/wireshark/extcap/nrf_sniffer_ble.bat: 18: Syntax error: Unterminated quoted string

Meaning, of course, tshark is trying to run the bat file on a linux system. It still works anyway, and removing execute from the bat file makes it go away.

So how do I get the extcap sniffer to work for user www-data?

Operating System: Debian GNU/Linux 12 (bookworm)  
          Kernel: Linux 6.6.28+rpt-rpi-v8
    Architecture: arm64

Wireshark 4.0.11 (Git v4.0.11 packaged as 4.0.11-1~deb12u1).

TShark (Wireshark) 4.0.11 (Git v4.0.11 packaged as 4.0.11-1~deb12u1).

nrf_sniffer_for_bluetooth_le_4.1.1.zip

Thanks!

Related