Skip to content

Instantly share code, notes, and snippets.

@paalbra
Last active January 19, 2024 19:11
Show Gist options
  • Save paalbra/116e09a6788aa8c33760971ab0c33251 to your computer and use it in GitHub Desktop.
Save paalbra/116e09a6788aa8c33760971ab0c33251 to your computer and use it in GitHub Desktop.
Sonoff Basic flash

Download MicroPython

Download for 2MiB size.

https://micropython.org/download/?port=esp8266

https://micropython.org/download/esp8266

Flash with esptool

TODO: -fm dout needed?

pip install esptool
esptool.py --port /dev/ttyUSB0 erase_flash
esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect -fm dout 0 esp8266....bin

Connect with screen

screen /dev/ttyUSB0 115200

Check version with ctrl+d, to soft reboot and/or check with os

MPY: soft reboot
MicroPython v1.22.1 on 2024-01-05; Generic ESP32 module with ESP32
Type "help()" for more information.
>>> import os
>>> os.uname()
(sysname='esp32', nodename='esp32', release='1.22.1', version='v1.22.1 on 2024-01-05', machine='Generic ESP32 module with ESP32')

URLs

http://docs.micropython.org/en/latest/esp8266/tutorial/intro.html#deploying-the-firmware

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment