I'm currently working on HC-12 transceivers. Normal operations are fine and I was able to successfully transmit basic strings between an Arduino UNO and and Arduino Nano, both of which use HC-12s.
However, when I'm trying to configure the HC-12s using AT commands, the commands that I send through the serial monitor, like the basic "AT" or "AT+VERSION" return no response.
- HC-12 VCC to Arduino 5V
- HC-12 GND to Arduino GND
- HC-12 RXD to Arduino D11
- HC-12 TXD to Arduino D10
- HC-12 SET to Arduino GND
And here's my arduino code fore sending AT commands
#include <SoftwareSerial.h>
#define RX 11 //Connect to the TX pin of the HC-12
#define TX 10 //Connect to the RX pin of the HC-12
SoftwareSerial mySerial(RX, TX);
void setup() {
Serial.begin(9600);
mySerial.begin(9600);
while(!Serial);
Serial.println("Input AT commands");
}
void loop() { // run over and over
if (mySerial.available()) {
Serial.write(mySerial.read());
}
if (Serial.available()) {
mySerial.write(Serial.read());
}
}
Things I've already tried include switching to different baud rates from 300 to 9600. I've also tried the HC-12 GUI configuration tool, but that one returns an error "Serial I/O error: CreateFile failed"
Is there any way to find out if this is a problem of the HC-12 itself, or just a configuration issue?
