Has anyone encountered issues establishing Bluetooth connections to Spike Prime or RI5 Hubs with third party tools or via Python’s ‘PySerial’ module?
Python programs appear to connect to the /dev/cu.xxxxxxx and/or /dev/tty.xxxxxx devices whether Mac side bluetooth is turned on or not (they don’t throw exceptions etc.) but rarely establish a working connection, even though it always seems to think it has successfully opened a connection. I think I have managed to send messages via serial.write() just once.
I also have a very useful app called ‘Serial’ which is a powerful Mac terminal emulator. I have managed to establish a working bluetooth connection to a hub with this just once - and then successfully got into the hub repl. Since that occasion, I get a blank terminal window and no active connection. This is interesting as ‘Serial’ can usually connect to anything with any kind of serial port. I get the same issue using the MacOS ‘screen’ command from a Mac ‘Terminal’ app window - it just stays blank.
I can establish a USB connection every time with both the ‘Serial’ app and via python programs using the PySerial module. There’s something about how Bluetooth is (not) working - possibly just in Monterey.
I have looked at old videos on YouTube such as Anton’s Mindstorms Hacks where he uses the ‘screen’ command to open a repl prompt over a Bluetooth connection, but if I replicate the steps he uses, the connection doesn’t establish. He was using the Mavericks version of MacOS at the time, and I’m pretty sure I had this working back last year after following his video.
The Mindstorms app seems to be able to connect OK, but it can take a couple of attempts to establish the BT connection. I get this behaviour with two different Hubs, so I don’t think it a hub-side issue.
Anyone got any suggestions?