This Bluetooth serial link is nothing new. I had it working on the existing setup to send data from the ReactorForge control board to the Processing visualization program. The HC-06 Bluetooth module enabled me to see the live telemetry coming from the ReactorForge. That helps you to understand what is going on and tweak parameters such as the PID settings.
Consolidation of Development Process
I’m excited to get the entire development process in one operating system. Before, I was bouncing between macOS, Windows in VMWare Fusion on the Mac, and a separate Windows machine. It’s a long story, but this was partly due to the Windows-only compiler I used at the time. Other shortcuts I made early in the process just to get things working enough to get the induction heater to Daniel’s shop also helped put me in that spot.
Problems Connecting to the HC-06 Bluetooth Module on Mac
Getting the HC-06 Bluetooth to Serial module working on macOS wasn’t hard, but I did have one issue. The HC-06 seemed to just disconnect randomly after a minute or two of being connected. Then when I would try to reconnect to it, the port would be busy. I knew it wasn’t busy or open using lsof | grep HC-06 or whatever your’s is named, Reactor-Link in my case.
I fired up Windows in VMware Fusion and paired the HC-06 Bluetooth module. Then I opened a connection to it using a terminal program. I also began a screen session (terminal) on the Mac side with a USB to serial adapter. The USB serial adapter was connected to the HC-06 Bluetooth module to monitor it (and send data from it).
Anyway, this worked fine, and the HC-06 Bluetooth module never lost connection on the Windows side. I did notice that on the Windows side, the HC-06 Bluetooth module asked me for asked me for the pin number during the pairing process, but it did not ask on the Mac side. I removed the device from on the Mac side in the Bluetooth manager and re-Paired it. To my annoyance and relief, this fixed the disconnecting issue. Maybe I changed the pin in the past since the last time it had been connected to the Mac.
Bluetooth on macOS
So this is the simple test setup. The photos say it all I think.
Libraries, Drivers, Etc.
With that working, I’m going to work on the libraries now. I’m looking at whether or not to get the existing libraries working in the new environment or use new libraries. I’m leaning toward new libraries because there are quite a few compiler warnings and even some errors from the old ones. I’ll have to update function names and setup code, but I’d prefer to start with something cleaner and updated. I’m pushing it all to GitHub as I go!