Bluetooth to Connect to a specific MAC address

Hello,

My plan right now is to connect my RT1062 either through its onboard bluetooth module or using an external HC-06 to connect to a LegoNXT brick thats running Lejos. I’ve managed to get the HC-06 to connect thru an app on my phone and I can recieve data from it but thats manually selecting the device on my phone. Is there some way where I can get the RT1062’s onboard bluetooth or thru UART to tell my HC-06 to connect to a specific mac address. Or if anyone has implemented some form of specificed bluetooth communications, I’d appreciate it since I’m trying to do this as my research project.

I tried looking at aioable and the library for bluetooth for the Rt1062 but I’m confused on how to implement since there isn’t any examples for a setup. I’m new to when it comes to communications and an example for me would be the best way to understand it.

Hi, the bluetooth support on the RT1062 is standard MicroPython Bluetooth. So, all examples/code from any MicroPython board will work.

Uh, anyway, the HC-06 is a Bluetooth UART. So, you can just use the machine UART interface to send data using it. Note that the RT1062 supports BlueTooth Low Energy, which cannot be used as a UART directly. If you want standard UART behavior, you’ll want to use the HC-06.

P4 is TX on the camera. P5 is RX. And then you just need to connect the grounds of each device and make sure the HC-06 is powered. See the board control examples for how to send data using the UART on the RT1062.