Table of Contents

ESPTool

esptool.jpg

This tool is used to install firmware onto ESP-XX modules.

Install

sudo apt-get install python3-serial python3-pip python3-dev
rehash
pip3 install esptool

If there are complaints from python3, the you may need to do something similar to the following and try the above again

sudo mv /usr/lib/python3.11/EXTERNALLY-MANAGED /usr/lib/python3.11/EXTERNALLY-MANAGED.bak

Add $(HOME)/.local/bin to PATH

esptool.py version
esptool.py v4.6.2
4.6.2

Wiring

3V3 UART       ESP-XX   ESP-01
========       ======   ======
3V3 ---------- VDD      8   21
3V3 -- 10K --- CHIP_EN  4   43
GND ---------- GND      1   65
                            87
RX  -- 390R -- U0TXD    2
TX  -- 390R -- U0RXD    7

RTS -- 390R -- EXT_RSTB 6
DTR -- 390R -- GPIO0    5

Use resistors for protection against mis-wiring.

Usage

Older example

esptool.py -p /dev/ttyUSB0 read_mac
esptool.py v2.0-beta2
Connecting....
Detecting chip type... ESP8266
Uploading stub...
Running stub...
Stub running...
MAC: 18:fe:34:XX:XX:XX
Hard resetting...

Newer example

esptool.py -p /dev/ttyUSB0 read_mac
esptool.py v4.6.2
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting....
Detecting chip type... ESP8266
Chip is ESP8285N08
Features: WiFi, Embedded Flash
Crystal is 26MHz
MAC: 60:01:94:b1:1b:ea
Uploading stub...
Running stub...
Stub running...
MAC: 60:01:94:b1:1b:ea
Hard resetting via RTS pin...
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information