Jun 052016
 
Using ESP8266-12

Some time ago I bought 5 ESP8266-12 modules including a SMD-to-DIP adapter. Since it’s a bit of  waste to not use, I programmed them (2 out of 5).

It’s quite simple:

  • Connect Vcc to 3.3V (usually from the serial adapter)
  • Connect TxD and RxD to RxD and TxD from the serial adapter
  • Connect GND
  • Connect GND to GPIO0 as this signifies that you want to program
  • Connect the serial adapter (AE-UM232R in my case)

Then program

./esptool.py -p /dev/ttyUSB0 write_flash 0x00000 nodemcu-integer.bin
./esptool.py verify_flash 0x00000 nodemcu-master-17-modules-integer.bin

It’s normal to get verify errors in the first 16 bytes and I never had a verify problem, so make this an optional step.

When programming is completed, remove the GND connection for GPIO0.

Note that when in use, the ESP8266 takes quite some power which can overload the internal and weak 3.3V source from the serial adapter. 300mA is the maximum (WiFi on and sending). So have a capable 3.3V source (3 NiMH cells will do fine).

During programming, the power draw is not that high. Presumably as the WiFi is off.