more reliable re-pairing
This commit is contained in:
parent
82e4b34438
commit
2b950cf60d
6
bt
6
bt
@ -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;;
|
||||||
|
Loading…
Reference in New Issue
Block a user