9 years, 8 months ago.

Changing Baud Rate

Hi

Very useful Library, thanks.

Were there any restrictions in your code on the esp8266 and/or serial port baud rate ? As I'm sure you are aware the different firmwares often come with different baud rates set. I have tried changing the esp8266 to 115200 and the serial port to 115200 and these appear to be working ok. Regards

Question relating to:

Provide an easy-to-use way to manipulate ESP8266. v1.0

1 Answer

9 years, 8 months ago.

the ESP8266 uses a reference to an uart object. That means the uart object must be instatiated before and this object manages the serial settings, so the ESP8266 object does not care about the serial speed. The speed would only matter if there are timeouts in the ESP code, I haven't checked this.

Accepted Answer

I ran into the same problem now and must correct my answer: the constructor of the ESP8266 takes the Serial object as reference object, but the first action ist to set the baudrate to a fixed value of 9600. I have modified this and added an baudrate argument to the constructor. I do not use commands to change the baudrate within the ESP8266 class, I change the baudrate before plugging it into my mbed testboard. This works now, but I got trouble with baudrates > 38400. I have not stepped into this problems, maybe there is too much code in the irq handler?

posted by Johannes Stratmann 11 Mar 2015