Skip to content

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:

  1. If your ESP is already on the OTGW, power down the gateway and unplug the ESP from the OTGW.
  2. Connect the ESP to a PC using a Micro USB lead. If no driver, try: WeMos or NodeMCU.
  3. Download both .bin files from our github and also esptool (for Windows get the file ending win32.zip and unzip it).
  4. Rename the .bin files to ino.bin and fs.bin. Make sure esptool is on your path.
  5. Identify your ESP port, e.g. on Windows try mode|for /f "tokens=4" %a in ('findstr COM') do @echo %a.
  6. Run esptool -cp COM3 -cd nodemcu -cb 921600 -cf ino.bin -ca 0x200000 -cf fs.bin (replace COM3 with ESP port).
  7. You should see a series of lines ending with [ 100% ]. The blue light should blink fast during programming then slowly.
  8. 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:

  1. Download the Espressif Flash Tool directly using (this link).
  2. Unpack the downloaded ZIP file and launch flash_download_tool_3.8.5.exe. It can take a few seconds to start.
  3. Click on the Developer Mode button.
  4. Click on the ESP8266 DownloadTool button.
  5. When the flashtool starts up, make the following settings (see picture below)

flash tool settings

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
  1. Make sure the checkboxes are checked, otherwise, they won't be flashed.
  2. If you do not know the COM port, click on the dropdown selector to see what COM ports are available
  3. Connect your ESP 8266 devkit to your (mini) USB cable
  4. Select the correct COM device and flash speed (it depends on your machine, but it should be the newly appeared COM port)
  5. Make sure you select COM speed 921600.
  6. 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").
  7. 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:

  1. 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").
  2. Enter esptool.py --baud 921600 write_flash 0 ino.bin 0x200000 fs.bin