I changed ESP8266 Baud rate to 9600 - Now No communication !!! :(

Hi everyone, I was using ESP8266 wifi module. It was working with 115200 baud rate then I did read the AT Command inst. manual and sent this command

AT+UART=9600,8,1,0,3

After that .. Now however I changed my softwareserial baud rate to 9600 there is no communication I just see meaningless characters. what should I do? It's written in its flash.So, I cannot take it back. I'm shocked.. :(

I am unable to read the Chinese manuals to confirm the Baud rate change syntax but a couple of things to try are altering the baud rate of the receiving device though the range and see if the characters become clear so you know the baud rate. **** WARNING, THE NEXT OPTION IS DANGEROUS AND I ACCEPT NO RESPONSIBILITY IF YOU TRY IT AND IT GOES WRONG. Another more drastic and last resort option would be to put the device into programming mode that I think sets a default programming baud rate and re-flash the memory with the [u]correct[/u] image.

It's english manual in this link Manual

My question is that if software serial library configration is ok with this part … “8,1,0,3

AT+UART=<baudrate>,<databits>,<stopbits>,<parity>,<flow control>
This command is deprecated, please use AT+UART_CUR or AT+UART_DEF instead.
Example AT+UART=115200,8,1,0,3   ----> I set to [b]9600,8,1,0,3[/b]
Response OK
Parameters
<baudrate> Baudrate range: 110 to 115200*40 (4.608 Mega)
<databits>
5: 5 bits data
6: 6 bits data
7: 7 bits data
8: 8 bits data
<stopbits>
1: 1 bit stop bit
2: 1.5 bit stop bit
3: 2 bit stop bit
<parity>
0: None
1: Odd
2: EVEN
<flow control>
0: disable flow control
1: enable RTS
2: enable CTS
3: enable both RTS and CTS
Notes

boraciner: My question is that if software serial library configration is ok with this part .. "8,1,0,3"

Yes Software serial should work okay with that (9600,8,N,1) though it does not do flow control (RTS/CTS) that you also seem to have turned on but that can be overcome with wire links if it's a problem.

In hind sight you should maybe have noticed the "This command is deprecated, please use AT+UART_CUR or AT+UART_DEF instead." and tried the command in UART_CUR before repeating it in UART_DEF

I'm very sorry but I did not pay attention for that warning This command is deprecated, please use AT+UART_CUR or AT+UART_DEF instead. and used AT+UART= command Now I try to fix it.. :(

Riva: Yes Software serial should work okay with that (9600,8,N,1) though it does not do flow control (RTS/CTS) that you also seem to have turned on but that can be overcome with wire links if it's a problem.

In hind sight you should maybe have noticed the "This command is deprecated, please use AT+UART_CUR or AT+UART_DEF instead." and tried the command in UART_CUR before repeating it in UART_DEF

Many thanks for your interest... So, is it impossible to communicate with configurated RTS/CTS for 4 pin module (RX,TX,VCC,GND)?

boraciner: Many thanks for your interest... So, is it impossible to communicate with configurated RTS/CTS for 4 pin module (RX,TX,VCC,GND)?

You say your getting something from the serial monitor but it's gibberish so maybe the RTS/CTS pins are not important here. Try talking to the ESP you altered at different baud rates and see if you get a response that is not gibberish.

Hi! I tried this code just to be sure that it’s set to 9600

CODE

/*
  Software serial multple serial test

 Receives from the hardware serial, sends to software serial.
 Receives from software serial, sends to hardware serial.

 The circuit:
 * RX is digital pin 10 (connect to TX of other device)
 * TX is digital pin 11 (connect to RX of other device)

 Note:
 Not all pins on the Mega and Mega 2560 support change interrupts,
 so only the following can be used for RX:
 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69

 Not all pins on the Leonardo support change interrupts,
 so only the following can be used for RX:
 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).

 created back in the mists of time
 modified 25 May 2012
 by Tom Igoe
 based on Mikal Hart's example

 This example code is in the public domain.

 */
#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(57600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }


  Serial.println("Goodnight moon!");

  // set the data rate for the SoftwareSerial port
  mySerial.begin(9600);
 
}

void loop() { // run over and over
  if (mySerial.available()) {
    Serial.print((char)mySerial.read());
  }
  if (Serial.available()) {
    Serial.read();
    mySerial.print("AT\r\n");
    Serial.println("1200....");
    mySerial.begin(1200); delay(2000);
    mySerial.print("AT+UART=9600,8,1,0,0\r\n");
    while (mySerial.available()) {
    Serial.print((char)mySerial.read());
    }

     
    Serial.println("2400....");
    mySerial.begin(2400); delay(2000);
    mySerial.print("AT+UART=9600,8,1,0,0\r\n");
    while (mySerial.available()) {
    Serial.print((char)mySerial.read());
    }

    Serial.println("4800....");
    mySerial.begin(4800); delay(2000);
    mySerial.print("AT+UART=9600,8,1,0,0\r\n");
    while (mySerial.available()) {
    Serial.print((char)mySerial.read());
    }

    Serial.println("9600....");
    mySerial.begin(9600); delay(2000);
    mySerial.print("AT+UART=9600,8,1,0,0\r\n");
    while (mySerial.available()) {
    Serial.print((char)mySerial.read());
    }

    Serial.println("19200....");
    mySerial.begin(19200); delay(2000);
    mySerial.print("AT+UART=9600,8,1,0,0\r\n");
    while (mySerial.available()) {
    Serial.print((char)mySerial.read());
    }

    Serial.println("38400....");
    mySerial.begin(38400); delay(2000);
    mySerial.print("AT+UART=9600,8,1,0,0\r\n");
    while (mySerial.available()) {
    Serial.print((char)mySerial.read());
    }
    
    Serial.println("57600....");
    mySerial.begin(57600); delay(2000);
    mySerial.print("AT+UART=9600,8,1,0,0\r\n");
    while (mySerial.available()) {
    Serial.print((char)mySerial.read());
    }
    

    Serial.println("74880....");
    mySerial.begin(74880); delay(2000);
    mySerial.print("AT+UART=9600,8,1,0,0\r\n");
    while (mySerial.available()) {
    Serial.print((char)mySerial.read());
    }

    Serial.println("115200....");
    mySerial.begin(115200); delay(2000);
    mySerial.print("AT+UART=9600,8,1,0,0\r\n");
    while (mySerial.available()) {
    Serial.print((char)mySerial.read());
    }
  
    }
}

OUTPUT

Goodnight moon!
1200....
2400....
4800....
9600....
19200....
38400....
!ú0âàâ(⹸(b73<°°°8{sAsqÃ2€Ã8:`Óq

After that … I set my software serial baud rate to 9600 and press reset button of module… I recieve this

Goodnight moon!
‚‚òŸ¡!R–ÃAağ–‡Úšşağƒ‡Úšş8�‹FÖ—r2’†2!A’•�öƒÔÆ÷

Is there any hope? :frowning:

I ordered one more from ebay :money_mouth_face:

Have you ever connected to this module at 115200 baud as you need to be talking at this speed to issue the AT commands else the module is just going to see gibberish? I don’t think SoftwareSerial works at this speed so you will need to used the Arduino’s hardware serial or an FTDI cable to do so.

The ‚‚òŸ¡!R-ÃAağ-‡Úšşağƒ‡Úšş8�‹FÖ–r2’†2!A’•�öƒÔÆ÷ message your seeing is probably the modules ESP8266 bootup text being sent at 115200 baud.

If you have an Arduino UNO then connect the 5V & GND as normal but connect the RX/TX module pins to pins 0 & 1 on the UNO. Also connect a patch wire between the reset & GND pins on the UNO and power it up.

Open the Serial monitor window and ensure it’s baud rate says 115200 and then press the reset button on the module. Do you get any text displayed? If not then try swapping the RX/TX wires over and try resetting the module again.

Hopefully you should have some readable text (maybe not all of it readable though) after this.

If you do then type AT into the serial monitor and press send and this should get the OK reply (If not then try altering the CR/LF characters sent with the AT command until you do)

If you get the OK reply then try issuing the UART commands to alter the baud rate.

I’m not sure what state the programming switch on the module need to be in to issue AT commands.

I tried it hardly because I came from work very tired.. Anyway, there is no symptom for all baud rates.. :( I ordered 1xthe same module 2xesp8266 2xnodemcu 1xarduino mega . . . .

It will be resolved in a way :D

Try to reset to default factory boud rate “AT+UART_DEF” or restore factory settings “AT+RESTORE” . I updated boraciner code.

/*
  Software serial multple serial test

 Receives from the hardware serial, sends to software serial.
 Receives from software serial, sends to hardware serial.

 The circuit:
 * RX is digital pin 10 (connect to TX of other device)
 * TX is digital pin 11 (connect to RX of other device)

 Note:
 Not all pins on the Mega and Mega 2560 support change interrupts,
 so only the following can be used for RX:
 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69

 Not all pins on the Leonardo support change interrupts,
 so only the following can be used for RX:
 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).

 created back in the mists of time
 modified 25 May 2012
 by Tom Igoe
 based on Mikal Hart's example

 This example code is in the public domain.

 */
#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX
long int boud_rate_array[] = {1200,2400,4800,9600,19200,38400,57600, 74880,115200};


void setup() {
  Serial.begin(57600);  // Open serial communications and wait for port to open:
  while (!Serial);// wait for serial port to connect. Needed for native USB port only
  Serial.println("Goodnight moon!");
}
void loop() { // run over and over
  if (Serial.available()) {
    for (int i = 0; i<9;i++){
      set_esp8266_boud_rate(boud_rate_array[i]);
    }
  }
}

void set_esp8266_boud_rate(long int boud_rate){
  boolean boud_found=false;
  Serial.println(String(boud_rate) + "....");
  mySerial.begin(boud_rate); delay(2000);
/*
AT+UART - UART configuration, [@deprecated]
AT+UART_CUR - UART current configuration
AT+UART_DEF - UART default configuration, save to flash
*/
  mySerial.print("AT+UART_DEF\r\n");
//  mySerial.print("AT+CIOBAUD=115200\r\n");
  mySerial.print("AT+RESTORE\r\n");
//  mySerial.print("AT\r\n");
  delay(100);
  while (mySerial.available()) {
    Serial.print((char)mySerial.read());
    boud_found= true;
  }
  if (boud_found){
    boud_found = false;
    Serial.println("Boud rate: "+ String(boud_rate));
    delay(1000);
    while (Serial.available() < 1 );
  }
}

Its working for me with "AT+UART_DEF=9600,8,1,0,0" this command.

Yeah.. "AT+UART_DEF=9600,8,1,0,0" this command works fine. Had same problem. I bricked the firmware by the command which is given in AT instruction set "AT+UART_DEF=9600,8,1,0,3". I reflashed the firmware and used command "AT+UART_DEF=9600,8,1,0,0". And it worked. Hurray!

http://yaab-arduino.blogspot.in/2015/12/flashing-esp8266-firmware-arduino.html check this link and follow as it is carefully IT FIXED MY ESP.

aaquib1994: Its working for me with "AT+UART_DEF=9600,8,1,0,0" this command.

Thanks so much!

Worked with

AT+GMR
AT version:1.3.0.0(Jul 14 2016 18:54:01)
SDK version:2.0.0(5a875ba)
v1.0.0.3
Mar 13 2018 09:35:47
OK

boraciner: Hi everyone, I was using ESP8266 wifi module. It was working with 115200 baud rate then I did read the AT Command inst. manual and sent this command

AT+UART=9600,8,1,0,3

After that .. Now however I changed my softwareserial baud rate to 9600 there is no communication I just see meaningless characters. what should I do? It's written in its flash.So, I cannot take it back. I'm shocked.. :(

Hi change baude rate of softwareserial to 9600 then open serial monitor and set 9600. type this "AT+RESTORE" your esp8266 will be Restores the factory default settings of the module and you can use 115200 baud rate to communication with module. 9600 is too slow for the esp8266, if you have problem with that you should change your Arduino's Crystall from 16000000 Hz to 14745000 Hz.

I used "AT+RESTORE" and after that I changed baud rate using "AT+UART_DEF=9600,8,1,0,0" it works .It saved my time thanks a lot .