I’m working on remote operated camera pan/tilt device that uses a HC-05 Bluetooth module to connect a GUI written in Processing and running on a Mac to an Arduino. Everything works great when I first pair the HC-05, but if either the HC-05 or the Mac Bluetooth gets power cycled, they won’t reconnect automatically. If I choose the device in the Bluetooth menu or right-click and choose Connect in System Preferences, it spins for a moment and says “connected,” but the LED on the HC-05 still blinks “disconnected” and no data is transmitted.
The problem appears to be a change in the way MacOS (or newer Apple hardware?) handles Bluetooth serial. On a Mac running Catalina, if the HC-05 is power cycled, as long as I also close and re-open the process connected to it (eg Serial Monitor in the Arduino app), the HC-05 reconnects. For some reason, the same device appears in /dev/ as “DeviceName-DevB,” but on Monterey it just appears as “DeviceName” in Catalina, which suggests to me that there’s some under the hood change, but I can’t figure out what it is, and how to get it to reconnect without removing and re-pairing it in System Preferences each time.
Any ideas?