Skip to content

Commit a3ef745

Browse files
committed
bt-nap backing out while wlan is active
1 parent 672ee71 commit a3ef745

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/bt-nap.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ try_pair()
1818

1919
echo "Waiting for remote request"
2020
counter=1
21-
while [ $counter -le 19 ]
21+
while [ $counter -le 12 ]
2222
do
2323
((counter++))
2424
sleep 10
@@ -38,7 +38,7 @@ try_pair()
3838
try_connect_bt() {
3939
get_paired_devices
4040

41-
if [[ -z "${paired_devices}" ]] || [[ $bt_connection_retries -ge 4 ]]; then
41+
if [[ -z "${paired_devices}" ]] || [[ $bt_connection_retries -ge 6 ]]; then
4242
echo "starting remote initiated pairing procedure"
4343
bt_connection_retries=0
4444
try_pair
@@ -75,6 +75,8 @@ do
7575
if [[ -z "${wlan_config}" ]]; then
7676
echo "no wlan connection, trying bt"
7777
try_connect_bt
78+
sleep 10
79+
else
80+
sleep 120
7881
fi
79-
sleep 60
8082
done

0 commit comments

Comments
 (0)