I am trying to get the ESP8266 work with Arduino AT commands. I am using the due. How do I get the ESP8266 to respond with anything other than ERROR?
Here is the current serial output:
AT
ERROR
Here is my code:
void setup() {
Serial.begin(9600);
Serial3.begin(115200); //Manufacture said this is the correct baud rate
}
void loop() {
if ( Serial3.available() ) { Serial.write( Serial3.read() ); }
if ( Serial.available() ) { Serial3.write( Serial.read() ); }
}
Here are my pin connections:
RX3 -> ESP TX
TX3 -> ESP RX
GND -> GND
3.3V -> CH_PD + VCC
-
3do you have CR/LF set in Serial Monitor?Juraj– Juraj ♦2018年03月07日 07:51:53 +00:00Commented Mar 7, 2018 at 7:51
-
1Don't cross post. You also asked this on SO.gre_gor– gre_gor2018年03月07日 15:13:33 +00:00Commented Mar 7, 2018 at 15:13
-
I didn't have CR/LF set. That fixed my problemWill Buxton– Will Buxton2018年03月08日 05:50:50 +00:00Commented Mar 8, 2018 at 5:50
1 Answer 1
The AT firmware responded with ERROR because it received data, but timed out waiting for the CR/LF line ending.
AT commands must be terminated with Carriage Return '\r' and Line Feed '\n' control bytes/characters.