ESP-8266, Ubuntu, and 74880 baud

ESP-8266, Ubuntu, and 74880 baud

Jan 19, 2016. | By: Jerry

The ESP-8266 boot loader prints messages at 74880 baud. That is a non-standard baud rate which is not available as a stty setting on Ubuntu, so the messages just look like garbage. But, it doesn’t have to be that way; there is a method to set arbitrary baud rates, at least for some serial adapters.

I found out how to set a custom baud on Linux from stackoverflow. The gist worked for the FTDI breakout board from Sparkfun, but not for another no-name USB adapter I have in my toolbox. My best guess is that any FTDI based adapter will work.

The program to set a custom baud rate was compiled from source:

$ git clone https://gist.github.com/3f1a984533556cf890d9.git anybaud
$ cd anybaud
$ gcc gistfile.c -o anybaud

While the resulting anybaud command can be executed from the directory where it was built, it is more convenient to put it where it is easy to find:

$ sudo cp anybaud /usr/local/bin

Now, to see the messages from the ESP-8266 bootloader open a terminal emulator (I use minicom) and then run anybaud to set the serial speed to 74880. It is important to run anybaud after the terminal emulator has finished setting it’s default spead. I use two command line windows. In the first I start minicom and make any changes necessary to open the serial port. When that is complete I run the following in the second terminal:

$ anybaud /dev/ttyUSB0 74880

Then reset the ESP-8266. Hopefully you won’t be greeted by an error like I was!

 ets Jan  8 2013,rst cause:2, boot mode:(3,0)

 load 0x40100000, len 27452, room 16 
 tail 12
 chksum 0xaf
 ho 0 tail 12 room 4
 load 0x3ffe8000, len 920, room 12 
 tail 12
 chksum 0x30
 ho 0 tail 12 room 4
 load 0x3ffe83a0, len 3072, room 12 
 tail 4
 chksum 0x7b
 csum 0x7b
 system param error
 ff ff ff ff ff ff ...

Clearly I have some work to do, but at least I know about it now!


CC BY-SA 4.0

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International license.

Social Links

Address

3720 Benton St.
Santa Clara, CA 95051
United States.