From cf2c5ea5c4bfd83ed7ea9a4c9a83e7d5137d01d9 Mon Sep 17 00:00:00 2001 From: Gustav Behm Date: Tue, 29 Oct 2024 07:31:10 +0100 Subject: [PATCH] Try harder to connect to headphones --- bluetooth-fix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/bluetooth-fix b/bluetooth-fix index 7181e4e..3e977bf 100755 --- a/bluetooth-fix +++ b/bluetooth-fix @@ -39,21 +39,28 @@ connect() { exit 0 else notify <<< "waiting for sink to appear..." - sleep 1 + sleep 3 fi done else notify <<< "unable to connect, wait and retry..." - sleep 1 + sleep 3 fi done } connect +notify <<< "try: bluetooth power off/on..." bluetoothctl -- power off -sleep 1 +sleep 2 bluetoothctl -- power on -sleep 1 +sleep 2 + +connect + +notify <<< "try: bluetooth service restart..." +sudo -A systemctl restart bluetooth.service +sleep 2 connect -- 2.45.2