Various notes about the ESP8266
- 0018000902-ai03
Connections needed:
- VCC to CH_PD to disable power down
- GND with GPIO-15 (at least on models with this GPIO). This was needed to make the bootloader boot.
- Now, connect VCC (3.3V!), GND, RX and TX as usual
Use minicom -b 9600 -D /dev/tty--- -s
to get the serial console. Set Hardware Flow Control to "No".
Attention: always make sure mincom is not running while flashing firmware or uploading files. You can temporary suspend it by pressing Ctrl-A,J.
The bootloader is set to a strange baud rate (74766 8N1 with 13,375µs). This needs to be done manually by an external script after minicom is already configured and listening.
On the 0018000902-ai03, a baud rate of 9600 8N1 had to be used with firmware version 0.9.2. After entering a command and the enter key, you need to additionally press Ctrl-J to add a LF character, which will make the ESP8266 execute the command.
- AT+GMR: output firmware revision number
- AT+CWMODE=N (1=Station, 2=AP, 3=both)
- AT+CWLAP (list available APs)
- AT+CWJAP=, (join AP. ssid and password can be double-quoted)
- AT+CIFSR (print devices ip)
Open-Source Firmware for the ESP8266 with Lua interpreter and lots of useful bindings
- Download the esp-open-sdk
- run
make
- as suggested, add the
xtensa-lx106-elf/bin
directory to your path (by exporting it for the current session or in a permament way, like bashrc - Download nodemcu-firmware
- run
make
- Download nodemcu-uploader
Flash the firmware via make flash
(GPIO0 needs to be connected to GND for that)
Initially, the ESP8266 will simply display the lua prompt at the serial console.
If you want it to execute a given init.lua
file on bootup,
use nodemcu-uploader.py upload init.lua
to upload the file.