greatscottgadgets / ubertooth

Software, firmware, and hardware designs for Ubertooth
https://greatscottgadgets.com/ubertoothone/
GNU General Public License v2.0
1.92k stars 430 forks source link

libUSB Error: Access denied (insufficient permissions): (-3) could not open Ubertooth device #518

Closed wdyst closed 1 year ago

wdyst commented 1 year ago

Steps to reproduce

  1. Install libbtbb
    tar -xf libbtbb-2020-12-R1.tar.gz
    cd libbtbb-2020-12-R1
    mkdir build
    cd build
    cmake ..
    make
    sudo make install
    sudo ldconfig
  2. Install ubertooth tools
    tar -xf ubertooth-2020-12-R1.tar.xz
    cd ubertooth-2020-12-R1/host
    mkdir build
    cd build
    cmake ..
    make
    sudo make install
    sudo ldconfig
  3. Install wireshark
  4. Run any ubertooth-util, such as ubertooth-util -v or ubertooth-btle -f -c /tmp/pipe

Expected behaviour

Command should execute, for -v it should display ubertooth-util version. (Without sudo)

Actual behaviour

ubertooth-util -v:

Without sudo: libUSB Error: Access denied (insufficient permissions): (-3) could not open Ubertooth device ubertooth-util - command line utility for Ubertooth Zero and Ubertooth One

With sudo: Firmware version: MP-2017-03-R2-V1 (API:1.02)

ubertooth-btle -f -c /tmp/pipe

Without sudo: libUSB Error: Access denied (insufficient permissions): (-3) could not open Ubertooth device

With sudo: ubertooth-btle: lell_pcap_ppi_create_file: : Permission denied

Version information

Operating system: Linux Asahi (aarch64) 6.3.0-asahi-7-1-edge-ARCH (64-bit)

Ubertooth tools version (ubertooth-rx -V): libubertooth 1.1 (git-3c70829)

libbtbb version: libbtbb 1.0 (git-b92743c)

Ubertooth firmware version (ubertooth-util -v): Firmware version: MP-2017-03-R2-V1 (API:1.02)

If you are reporting a problem that involves third party software (Wireshark/Kismet/etc), please report the version here. Wireshark: Version 4.0.5 (Git v4.0.5 packaged as 4.0.5-1).

Comments

I can provide any additional info as needed. I've gone through all previous issues and attempted troubleshooting with those posts but nothing has solved the issue yet. Wondering if there was something obvious I am missing here, setup error, etc. Thanks!

martinling commented 1 year ago

You need to install some udev rules, to tell your system to make the device available to regular users. See this section in the host README.

wdyst commented 1 year ago

Solution process:

  1. Run the command provided in the documentation on this page. $ echo 'ACTION=="add" BUS=="usb" SYSFS{idVendor}=="1d50" SYSFS{idProduct}=="6002" GROUP:="plugdev" MODE:="0660"' > /etc/udev/rules.d/99-ubertooth.rules
  2. Got could not open Ubertooth device when running ubertooth-specan-ui Followed instructions #294
  3. Attempted to update firmware by following the documentation on this page. by running ubertooth-dfu -d bluetooth_rxtx.dfu -r
  4. Ran into "libUSB Error: Command Error: (-1" Followed documentation again and ran make clean all && make ubertooth-dfu -r -d bluetooth_rxtx/bluetooth_rxtx.dfu
  5. Reran ubertooth-dfu -d bluetooth_rxtx.dfu -r
  6. Success.

    Hope this helps someone lol, and thanks @martinling