14

IMPORTANT: DO NOT USE AT+IPR=9600! (see update)

I have an ESP8266 12E module that communicates at 115,200 bauds. Since I use it with an Arduino Nano with SoftwareSerial things get messy. So I found that I should reduce the baud rate of the ESP module.

I found this link on how to do it.

I am wondering

  • Is this a permanent change or do you need to do this every time after the module is powered?

  • Can I achieve the same by sending the command from the Arduino over SoftSerial? Well, I guess not since I tried and I always get an error on AT+CIOBAUD=9600 or AT+IPR=9600.

  • I read somewhere that in newer firmware versions of the ESP8266, the baud rate defaults to 9,600. Can anyone confirm this and if so, is it better to flash this newer firmware?

The module's vendor:

Ai-Thinker Technology Co.,Ltd.

I think the current version of the firmware is 0.3.0. If I send AT+GMR I get:

sending AT+GMR

response: ?AT¥TJÕ¨H(Q�²•ÉÍ¥½¹é‚r¢‚r‚r‚BÕ��Â’‚ŠªŠ¢Ò¢ªÒªÂJm
 SDK versioo:0.3.0
 Ai�½½
 ‚Šj

Again some garbage because of the baud rate which is too high.

Other info on the module:

sending AT+RST
response: ?AT+RST
OK
WRT
"%M
<99CT
 ets Jan  8 2013,rst catse:2, boot lode:(3,7)
load 0x40100000ntail 4
chksum 0x89
ld tail 4
chm3 tail 8 r 0 aM
 ón't use rtc mem dat`
sl��oÌÿ
Ai-Thinker Technology Co.,Ltd.

UPDATE

(*) I used an FTDI232 module to send AT+IPR=9600 to my ESP8266-12E module and I bricked it!

DO NOT USE AT+IPR=9600 ON AN ESP8266(-12E).

I did not manage to recover it so far! I tried re-flashing it but I get Invalid head exceptions.

On a new module I sent the AT+CIOBAUD=9600 command and it worked. Permanently!

My module specs:

AT+GMR 
AT version:0.40.0.0(Aug  8 2015 14:45:58)
SDK version:1.3.0
Ai-Thinker Technology Co.,Ltd.
Build:1.3.0.2 Sep 11 2015 11:48:04
OK 
8
  • You could try the hardware serial? Or pull the reset pin low and then talk to the ESP directly through USB. Might check if those work.
    – aaa
    May 13, 2016 at 11:52
  • @Paul: the nano has only one set of hardware serial ports. So if I use those I cannot send data to the Arduino Serial Monitor anymore, making it hard to understand what is happening... Guess I'll need to go for firmware upgrade.
    – mvermand
    May 13, 2016 at 12:50
  • well you could make use of the software serialport for debugging? You'll need a "usb-serial/ttl" cable though.
    – aaa
    May 13, 2016 at 12:58
  • 1
    stackoverflow.com/questions/34248581/… This will answer your question.
    – N.Sinha
    Feb 26, 2017 at 7:52
  • 1
    Seems that setting the baud rate with AT+IPR=9600 also bricks an ESP01. I tried several suggestions in this thread to recover it. The solution in the link Marco Andre Silva supplied worked for me.
    – Steffe
    May 13, 2017 at 13:56

5 Answers 5

13

Depending on how recent a version of the AT Instruction Set interpreter your chip has, the two instructions you tried may not be valid ones; they are not listed in Espressif's ESP8266 AT Instruction Set document. Searches for either "CIOBAUD" or "IPR" in the current document (version 1.5.3) return no results.

The baud rate commands are now "AT+UART_CUR" and "AT+UART_DEF" which configure the entire UART for the current session or the current and future sessions, respectively. The manual's prototype for the command is:

AT+UART_DEF=<baudrate>, <databits>, <stopbits>, <parity>, <flow control>
Example:
AT+UART_DEF=115200, 8, 1, 0, 3

I have used these and can confirm that they work.

What I've found using software serial is that it can push 115200 baud well enough to send commands to the device (though I wouldn't build an application that depends on it) but it can only read reliably up to 9600 baud. I've been able to change my devices' baud rates from 115200 baud to 9600 over software serial; you just have to expect garbage coming back and ignore it:

// Set ESP8266 baud rate to 9600. You only need to do this once per device
set software serial baud to 115200;
send "AT+UART_DEF=9600,8,1,0,0";
set software serial baud to 9600;
// From now on, communicate with your device at 9600 baud.
4

I Connected an FTDI232 module at 115200 baud and could read the specs of the ESP8266 module now:

AT+GMR 
AT version:0.40.0.0(Aug  8 2015 14:45:58)
SDK version:1.3.0
Ai-Thinker Technology Co.,Ltd.
Build:1.3.0.2 Sep 11 2015 11:48:04
OK 

After that I sent the AT+IPR=9600 command, which first seemed to do the trick. But after reboot of the module, all I got was garbage response, at any baudrate.

DO NOT SEND AT+IPR=9600 TO YOUR ESP8266(12e) MODULE

Maybe the AT+UART_DEF command - as mentioned by JRobert - works, but I used the AT+CIOBAUD=9600 command and it worked. Permanently!

I hope this can help others.

4

I bricked my Esp with the same command, too. After hours of searching I found a way to reset the bricked esp. https://developer.mbed.org/users/sschocke/code/WiFiLamp/wiki/Updating-ESP8266-Firmware I had to set the baudrate to 115200 instead of 9600, and between the uploading files I had to disconnect the esp from power. I hope that helps you and everybody who did the same and found your post over Google.

2
  • Power cycling the ESP between each file was the key thing to me too - other sites combine all the files into a single esptool.py command, but that did not work for me. Only after breaking it into individual commands, one per file, and cycling between each one, was I finally able to restore the AT firmware. Thanks for the hint!
    – davidA
    Aug 7, 2017 at 2:40
  • Also, I tried using the esptool.py that comes with the ESP32 IDF (v2.1-beta1) and that one works successfully with a single command to flash all files on my ESP8266 (which it also supports) - so only one power cycle + GPIO0-GND required.
    – davidA
    Aug 7, 2017 at 3:02
1

Using this firmware: https://developer.mbed.org/users/sschocke/code/WiFiLamp/wiki/Updating-ESP8266-Firmware

and this flasher: http://yaab-arduino.blogspot.com.br/2015/12/flashing-esp8266-firmware-arduino.html i was able to recover my esp 8266 12f

0

Looks like you are you are having power supply issue. What is your power supply rating ? and try adding a small capacitor between vcc and ground. Also its good idea to update the firmware to 0.9 which has baudrate issue fixed.

You can find new firmware at https://github.com/espressif/esp8266_at

2
  • I don't think this is a power supply issue. I have an external power supply which is more than capable. I tried without before and then the Arduino kept restarting... I found on a forum that that was due to power supply issues. So now I'm fine there. I really think the issue is that the SoftSerial cannot cope with the 115k baudrate.
    – mvermand
    May 13, 2016 at 12:49
  • 1
    esp is really picky, add a small capacitor between vcc and ground. I also power mine from external power source and was experiencing restarts.
    – NccWarp9
    May 13, 2016 at 17:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.