3 status
=$
(bluetoothctl info FC
:A8
:9A
:57:A4
:8A |
grep "Connected" |
awk '{print $2}')
6 if [ "$status" = "yes" ]
10 #sudo rfkill unblock bluetooth
11 bluetoothctl power off
12 #bluetoothctl power on
13 #sudo systemctl restart bluetooth
14 #sudo systemctl enable bluetooth
15 #sudo systemctl start bluetooth
18 bluetoothctl remove FC
:A8
:9A
:57:A4
:8A
19 timeout
7s bluetoothctl scan on
20 bluetoothctl pair FC
:A8
:9A
:57:A4
:8A
21 bluetoothctl trust FC
:A8
:9A
:57:A4
:8A
22 bluetoothctl connect FC
:A8
:9A
:57:A4
:8A