There's a bug in macos that causes bluetooth to be powered off when your airpods are nearby, but connected to some other device (like your phone.) This breaks the unlock with Apple Watch feature and makes me so angry that I'm writing this script instead of doing my actual job.
- Requires
blueutil
to be installedbrew install blueutil
-- I haven't vetted this literally at all for licensing or code quality. It was the first result in my search for "macos enable bluetooth command line" and I found it here.
Checks the bluetooth power state every 5 seconds. If disabled, enables.
./btpm.sh
MIT