-
Notifications
You must be signed in to change notification settings - Fork 35
How to install firmware on your ESP
tjfsteele edited this page Jan 18, 2022
·
41 revisions
To install firmware on your ESP using esptool.exe
:
- If your ESP is already on the OTGW, power down the gateway and unplug the ESP from the OTGW.
- Connect the ESP to a PC using a Micro USB lead. If no driver, try: WeMos or NodeMCU.
- Download both .bin files from our github and also esptool (for Windows get the file ending
win32.zip
and unzip it). - Rename the .bin files to
ino.bin
andfs.bin
. Make sureesptool
is on your path. - Identify your ESP port, e.g. on Windows try
mode|for /f "tokens=4" %a in ('findstr COM') do @echo %a
. - Run
esptool -cp COM3 -cd nodemcu -cb 921600 -cf ino.bin -ca 0x200000 -cf fs.bin
(replaceCOM3
with ESP port). - You should see a series of lines ending with
[ 100% ]
. The blue light should blink fast during programming then slowly. - Unplug the ESP and install into your OTGW (be sure it's the right way round!), then power on the OTGW.
If you prefer to use the GUI:
- Download the Espressif Flash Tool directly using (this link).
- Unpack the downloaded ZIP file and launch flash_download_tool_3.8.5.exe. It can take a few seconds to start.
- Click on the Developer Mode button.
- Click on the ESP8266 DownloadTool button.
- When the flashtool starts up, make the following settings (see picture below)
Set the following:
- first line, click on the dots [...] and select OTGW-firmware.ino.bin
- first line, the second box enter [0x0]
- second line, click on the dots [...] and select OTGW-firmware.mklittlefs.bin
- second line, second box enter [0x200000]
- set the SPI speed to 80MHz
- set the SPI mode to DIO
- set flash size to 32Mbit
- Make sure the checkboxes are checked, otherwise, they won't be flashed.
- If you do not know the COM port, click on the dropdown selector to see what COM ports are available
- Connect your ESP 8266 devkit to your (mini) USB cable
- Select the correct COM device and flash speed (it depends on your machine, but it should be the newly appeared COM port)
- Make sure you select COM speed 921600.
- Now put your ESP board into flash mode. You do this by pressing the [FLASH] button, then press the [RST] button once, then release the [FLASH] button. Then the blue led should stay turned off. If that happens you are in flash mode (aka "waiting for download").
- Now you can press START to flash the ESP board. Just wait for it to finish, if finished then press the [RST] button again.
Now continue to the initial WIFI configuration on first-time flash... Read more here: Configure WiFi settings using the Web UI
if you prefer to use esptool.py
which comes with Arduino IDE:
- If you have a NodeMCU, put your ESP into flash mode by pressing the [FLASH] button, then press the [RESET] button once, then release the [FLASH] button. Then the blue led should stay turned off. If that happens you are in flash mode (aka "waiting for download").
- Enter
esptool.py --baud 921600 write_flash 0 ino.bin 0x200000 fs.bin