#!/bin/bash read -p "Stage 1: Shortcut GPIO00+GND, connect device via serial cable, remove shortcut bridge." ./esptool/esptool.py --port /dev/ttyUSB0 --baud 115200 erase_flash read -p "Stage 2: Shortcut GPIO00+GND, connect device via serial cable, remove shortcut bridge." ./esptool/esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash --flash_size 1MB --flash_mode dout 0x0 sonoff-DE-development.bin