Hello,
I have 2 MEGA2560 boards trying to communicate over radio by means of 2 HC-12 modules. Everything worked fine in the beginning. I could send and receive characters from one device to the other and vice versa. Then I started to mess around with baudrates what also worked in the beginning. But suddenly I got continuously ERROR messages from one module after sending an AT-Command in Programming mode.
The curious thing is, that I can't find any documentation about this behaviour. But it becomes even more wired. As I thought that I might have destroyed the module, I ordered some new ones and ... same behaviour from the first moment.
So I thougth maybe the arduinos Serial-Port might be the problem. I'm using the Serial3-Port. But on the ohter hand I get some serious communication with the HC-12.
Example:
If I send in Programming Mode (HC-12 Pin:SET->GND): AT+RB
I get:
OK-B9600
ERROR
ERROR
ERROR
:
So it seems that I'm receiving these ERRORs from the HC-12 and the serial port seems to work correctly.
Any ideas?
The core part of the arduino-code is:
if (Serial3.available()) {
int inByte = Serial3.read(); // read from Serial3
Serial.write(inByte); // write it to Serial
}