I am using a PIC32MX795F12 microcontroller together with a RN42 bluetooth to UART module.
I can send text to the UART with no problem at 115200 baud. Using Putty I can also enter the command $$$ to enter the command mode and get the CMD response. Unfortunately I've not been able to enter the command mode using the C code. My command to do this is as follows:
UART3WriteString("$$$");
where the function is defined as:
void UART3WriteString(const char * str) {
while( *str ) {
U3TXREG = *str++;
while( U3STAbits.TRMT == 0 ); //wait for the transmission to be done)
}
}
When I do this, the RN42 does not go into the command mode. It just outputs $$$ without the CMD response.
Any ideas?
Thanks!