]> git.plutz.net Git - rpi_small/commitdiff
autotrust all bluetooth devices
authorPaul Hänsch <paul@plutz.net>
Thu, 1 Nov 2018 15:50:56 +0000 (16:50 +0100)
committerPaul Hänsch <paul@plutz.net>
Thu, 1 Nov 2018 15:50:56 +0000 (16:50 +0100)
files/etc/rc.local

index b4663afe6a5947c9ccde280b0e2d1d6d2c681ba1..5e8e42cd43f2b6b465adab081c75be299dc79c3b 100755 (executable)
@@ -4,3 +4,11 @@ bt-network -s nap br0 &
 hciconfig hci0 up
 hciconfig hci0 sspmode 1
 hciconfig hci0 piscan
+
+while sleep 5; do
+  bt-device -l \
+  | grep -oE '[0-9A-F:]{17}' \
+  | while read mac; do
+    bt-device --set "$mac" Trusted 1
+  done
+done &