Overview

The ESP32 DevKit board has a built-in USB port, which can be used to power the board, but also as a programming interface. (i.e, I didn’t need a separate FTDI, as I had originall thought.)

Notes;

  • My ESP32 DevKit v1 boards, have the ESP-WROOM-32 chip, and the SiLabs CP2102 FTDI chip.

  • You can power the board via USB, but make sure it’s a ‘data’ cable, not just a power cable.

  • When programming from Arduino or ESPTool, it appears that you need to sudo, so that the programming tool can access the serial port. Otherwise…

    A fatal error occurred: Could not open /dev/ttyUSB0, the port doesn't exist

  • You also need python-pyserial.

Prerequisites

  1. Install PySerial
sudo pacman -S python-pyserial
  1. Install ESPTool
sudo pacman -S esptool
  1. Install Arduino IDE (optional)
sudo pacman -S arduino

Installing Tasmota

Back-up the factory firmware

[cthomas@clt-lt-manjaro ~]$ sudo esptool.py read_flash 0x00000 0x100000 ~/Arduino/esp32_fw_backup.bin
[sudo] password for cthomas: 
esptool.py v4.6.2
Found 2 serial ports
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting.....
Detecting chip type... ESP32
Chip is ESP32-D0WD-V3 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 48:e7:29:xx:xx:xx
Uploading stub...
Running stub...
Stub running...
1048576 (100 %)
1048576 (100 %)
Read 1048576 bytes at 0x00000000 in 96.4 seconds (87.0 kbit/s)...
Hard resetting via RTS pin...

Erase the Flash

[cthomas@clt-lt-manjaro ~]$ sudo esptool.py -p /dev/ttyUSB0 erase_flash
[sudo] password for cthomas: 
Sorry, try again.
[sudo] password for cthomas: 
esptool.py v4.6.2
Serial port /dev/ttyUSB0
Connecting.....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting.......
Detecting chip type... ESP32
Chip is ESP32-D0WD-V3 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 48:e7:29:xx:xx:xx
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 8.1s
Hard resetting via RTS pin...

Flash the tasmota32.factory.bin to the ESP

[cthomas@clt-lt-manjaro ~]$ sudo esptool.py -p /dev/ttyUSB0 write_flash 0x0 ~/Downloads/tasmota32.factory.bin 
esptool.py v4.6.2
Serial port /dev/ttyUSB0
Connecting.....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting......
Detecting chip type... ESP32
Chip is ESP32-D0WD-V3 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 48:e7:29:xx:xx:xx
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x002b3fff...
Compressed 2833136 bytes to 1818186...
Wrote 2833136 bytes (1818186 compressed) at 0x00000000 in 160.7 seconds (effective 141.0 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

After the reboot, the ESP (running tasmota) should start broadcasting the tasmota-xxxx-xxxx SSID. Simply connect to it, join it to wifi, and rock on.