Problem fixed: How to keep a bluetooth connection on forever!

Joined
Dec 25, 2022
Messages
1
Reaction score
0
Hi everyone

Recently I bought a bluetooth speaker and I noticed that when my mac goes to sleep, the bluetooth connection is lost and I have to reconnect to the speaker every time I wake up my mac.

I tried to searching for a solution but I couldn't find anything that worked for me. So I decided to write my own.

Here is the result:

This script will keep a bluetooth connection alive by checking if the device is connected every X minutes and if not, it will try to connect to it.

I'm not a bash expert, so if you have any suggestions, please let me know.

I hope this will help someone else.
Thanks!

Please star this repo if you found it useful ⭐️. I need a dose of motivation to keep going
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top