From e7d0244615c72e1bc9cc18412ad03ae02c53222d Mon Sep 17 00:00:00 2001 From: kevjs1982 <1839810+kevjs1982@users.noreply.github.com> Date: Sun, 28 Oct 2018 11:15:22 +0000 Subject: [PATCH] Update device_tracker.bluetooth_le_tracker.markdown (#7174) hcitool generates permission denied unless you perform a similar setcap option as you need to with python3 --- .../_components/device_tracker.bluetooth_le_tracker.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/_components/device_tracker.bluetooth_le_tracker.markdown b/source/_components/device_tracker.bluetooth_le_tracker.markdown index 421a6e0708b..3cef5e1b2d2 100644 --- a/source/_components/device_tracker.bluetooth_le_tracker.markdown +++ b/source/_components/device_tracker.bluetooth_le_tracker.markdown @@ -54,11 +54,12 @@ Some BTLE devices (e.g., fitness trackers) are only visible to the devices that ## {% linkable_title Rootless Setup %} -Normally accessing the Bluetooth stack is reserved for root, but running programs that are networked as root is a bad security wise. To allow non-root access to the Bluetooth stack we can give Python 3 the missing capabilities to access the Bluetooth stack. Quite like setting the setuid bit (see [Stack Exchange](http://unix.stackexchange.com/questions/96106/bluetooth-le-scan-as-non-root) for more information). +Normally accessing the Bluetooth stack is reserved for root, but running programs that are networked as root is a bad security wise. To allow non-root access to the Bluetooth stack we can give Python 3 and hcitool the missing capabilities to access the Bluetooth stack. Quite like setting the setuid bit (see [Stack Exchange](http://unix.stackexchange.com/questions/96106/bluetooth-le-scan-as-non-root) for more information). ```bash $ sudo apt-get install libcap2-bin $ sudo setcap 'cap_net_raw,cap_net_admin+eip' `readlink -f \`which python3\`` +$ sudo setcap 'cap_net_raw+ep' `readlink -f \`which hcitool\`` ``` A restart of Home Assistant is required.