more reliable re-pairing

This commit is contained in:
Alexander Bocken 2021-06-29 16:33:08 +02:00
parent 82e4b34438
commit 2b950cf60d
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8

6
bt
View File

@ -250,7 +250,11 @@ case $choice in
then then
bluetoothctl disconnect "$dev_id" bluetoothctl disconnect "$dev_id"
else else
bluetoothctl paired-devices | grep -q "$dev_id" || bluetoothctl pair "$dev_id" if bluetoothctl paired-devices | grep -q "$dev_id"; then
scan on
bluetoothctl pair "$dev_id"
scan off #maybe do not force off? -> implement return codes for scan()?
fi
bluetoothctl connect "$dev_id" bluetoothctl connect "$dev_id"
fi fi
fi;; fi;;