ESP8266/Reflashing
From charlesreid1
Firmware Issues
I have had zero luck communicating with the ESP8266 chip. I can't even get the LEDs on the board to light up.
The solution [1] is to reflash the firmware with the AT command binary image. This will, I guess, get the chip to accept AT commands on the serial RX/TX pins.
Downloading AT Firmware Image
Using this guide from Dave Vandenbout at Xess.com [2], which covers reflashing the ESP8266, I downloaded the AT Command firmware binary image, which was version 0.9.2.2.
Link to firmware binary on Google Drive (warning: may disappear at some point) is here: https://drive.google.com/file/d/0B3dUKfqzZnlwdUJUc2hkZDUyVjA/view?usp=sharing
File name of zipped-up binary image is ESP8266_AT_V00180902_02_baudrate watchdog added.zip
Esptool Flashing Software
In the Xess.com guide, Dave uses the Espressif-provided flash program, which is a Windows executable. Fortunately, I am blessed enough not to have any Windows computers, and will not touch it with a ten foot pole. I used the Python/PySerial-based esptool.py from themadinventor on Github [3] instead.
Downloading
You can download esptool from Github: https://github.com/themadinventor/esptool
Installing
You can install esptool manually using python setup.py build && python setup.py install. This will require the Pyserial library.
Alternatively, you can install it using pip: pip install esptool
Using
The basic usage of esptool is as follows:
$ esptool.py -h
usage: esptool [-h] [--port PORT] [--baud BAUD]
{load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac,chip_id,flash_id,read_flash,verify_flash,erase_flash,version}
...
esptool.py v1.1 - ESP8266 ROM Bootloader Utility
positional arguments:
{load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac,chip_id,flash_id,read_flash,verify_flash,erase_flash,version}
Run esptool {command} -h for additional help
load_ram Download an image to RAM and execute
dump_mem Dump arbitrary memory to disk
read_mem Read arbitrary memory location
write_mem Read-modify-write to arbitrary memory location
write_flash Write a binary blob to flash
run Run application code in flash
image_info Dump headers from an application image
make_image Create an application image from binary files
elf2image Create an application image from ELF file
read_mac Read MAC address from OTP ROM
chip_id Read Chip ID from OTP ROM
flash_id Read SPI flash manufacturer and device ID
read_flash Read SPI flash content
verify_flash Verify a binary blob against flash
erase_flash Perform Chip Erase on SPI flash
version Print esptool version
optional arguments:
-h, --help show this help message and exit
--port PORT, -p PORT Serial port device
--baud BAUD, -b BAUD Serial port baud rate used when flashing/reading
I'm not sure about the difference between the memory and the flash.
Flags
| ESP8266 ESP8266 is a chip with a full TCP/IP stack, enabling wifi connections via serial.
ESP8266/Serial Debugging · ESP8266/Reflashing
|