Thanks for taking a look at my question.
I have this problem with my RN42 Bluetooth Module in where if i am only sending a small amount of data such as printing "Hello World" every second. If i use this code:
void setup()
{
//Open serial communications and wait for port to open:
//Serial.begin(115200);
Serial1.begin(9600);
}
void loop()
{
Serial1.print("Hello World");
//delay(1000);
}
This is all my code if i use this code with my RN42 when i connect to the module it will stay connected for about 3 seconds and then just reboot. I have tried both 9600 and 115200 and they both close the connection after a few seconds.
This is part of a large project and has been running fine but under some circumstances it was crashing and i have managed to point it to this.
I have the RX and TX connected directly to the Arduino and have the CTS and RTS connected to each other.
Has anyone had any similar issues?
Regards
Jamie
I Managed to figure out what the problem was, and wanted to share. When the Module is in Command Mode and allows you to enter '$$$', The Bluetooth module will reset if you try to send it a huge amount of data. It is in a tiny note on the booklet:
Note: The module supports a fast data mode. In this mode, the module does not go into command mode even if it receives $$$. If you do not enter command mode within the configuration window (60 seconds), the module enters fast data mode.
As i was using the command mode any time it would never enter Fast Data Mode. I have now set the Command Timeout to 5 seconds so if i need to use it i just reset the module.