schollz / find3-cli-scanner

The command-line scanner that supports Bluetooth and WiFi
https://www.internalpositioning.com/doc/tracking_your_computer.md
149 stars 55 forks source link

Bluetooth scanner does not work on Fedora because of the missing btmgmt dependency #9

Closed hit0ri closed 6 years ago

hit0ri commented 6 years ago

Since btmgmt is declared as noinst[1] upstream it is not part of the bluez package in Fedora.

2018-04-05 20:51:17 [INFO] main.go main:76 scanning with wlan0
2018-04-05 20:51:17 [INFO] bluetooth.go scanBluetooth:19 scanning bluetooth
2018-04-05 20:51:17 [DEBUG] utils.go RunCommand:15 btmgmt find
2018-04-05 20:51:17 [DEBUG] utils.go RunCommand:15 /sbin/iw dev wlan0 scan -u
2018-04-05 20:51:17 [ERROR] utils.go RunCommand:25 exec: "btmgmt": executable file not found in $PATH
2018-04-05 20:51:17 [ERROR] utils.go RunCommand:39 exec: not started: btmgmt find
2018-04-05 20:51:17 [DEBUG] utils.go RunCommand:15 service bluetooth restart
...
schollz commented 6 years ago

You can then either use Docker to just run it, or you can install Bluez from source:

sudo apt-get install -y libusb-dev libdbus-1-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev libdbus-glib-1-dev unzip systemd
mkdir /tmp/bluez
cd /tmp/bluez
wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.9.tar.xz
tar xf bluez-5.9.tar.xz
cd /tmp/bluez/bluez-5.9
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-library
make
make install
ln -svf /usr/libexec/bluetooth/bluetoothd /usr/sbin/
install -v -dm755 /etc/bluetooth
install -v -m644 src/main.conf /etc/bluetooth/main.conf
systemctl daemon-reload
systemctl start bluetooth