Because I was in the seemingly peculiar situation of having to flash my newly arrived ESP8266-03 with a Bus Pirate (v3.6), I decided to document this little journey here.
The connections, apart from Vcc and GND
Flash procedure
-
Get the tool
esptool
from its Github page -
Connect to the Bus Pirate (e.g.
screen /dev/ttyUSB 115200
). Select the UART mode with 9600 baud, and use it in bridge mode:m 3 5 Enter Enter Enter Enter (1) y
- To test if everything worked, just press enter. The string “ERROR” should be displayed.
-
Now set the module baud rate to 115200, by typing the following command:
AT+CIOBAUD=115200
- When pressing enter, garbled text should appear.
-
Reconnect the Bus Pirate and set the baud rate to 115200, use it in bridge mode:
m 3 9 Enter Enter Enter Enter (1) y
- Cut power to the ESP8266 module.
- Connect GPIO0 to GND, this will tell the module to enter the boot loader.
- Power up the module again.
-
Go ahead with flashing with
esptool
, but first check if you can read the MAC address (just as a sanity check):./esptool.py -p /dev/ttyUSB0 -b 115200 read_mac ./esptool.py -p /dev/ttyUSB0 -b 115200 write_flash 0x00000 nodemcu_latest.bin
- Note that the baud rate is, again, at 9600.
Gimmick: Get node.dsleep()
to work
If you try to use node.dsleep()
to put the ESP8266 module into deep sleep,
you will notice that it doesn’t wake up properly. It will throw some garbled
text at you and not react to any input.
Fortunately this is easy to fix, you can read up on the details in this forum post.
Find the two solder pads pictures below and just bridge them with a bit of
solder. That’s it. Now, when using node.dsleep()
, the device will reset after
waking up.
Note: It seems that it is not possible to resume operation, just to restart the whole thing.
