RN42 BlueSMiRF HID Pairing and Profile management

Hi,

I am able to set the Profile (SPP or HID) using the command set but I am having trouble controlling reconnect and pairing at a higher level. I am embedding the RN42 into a device that communicates with a PC. I want the user of the device to be able to enable pairing, choose profile, etc.

From what I can tell (for HID at least) once paired you have to send SM,6 in order for the RN42 to automatically reconnect next time the device boots (I’m not getting consistent results using C for the same purpose) Anyway, what I’m also seeing is that when you reboot, once the RN42 has reconnected, you can’t issue $$$ to get back into command mode, even within the 60s window (and yes I’m leaving 1s before and after $$$).

So now this leads me into a problem. I need to be able to see if the RN42 has been paired before I issue the command to reconnect or not connect (SM, 0). How can I tell if it’s been paired?? And also if the user want to pair to something else I guess I can just go back to factory defaults, assuming this erases the pairing.