Flashing a SUNOFF (Espurna Firmware)

Tools needed to flash a Sunoff with the aspurna firmware.

ESPTool

Clone the Esptool repository. In a terminal window on the MAC do the following:

$ cd ~/Documents
$ git clone https://github.com/espressif/esptool.git

Setup ESPTool

To setup the ESPTool so that you can use it for programming, it is best to change the permission and install it as follows:

$ cd ~/Documents/esptool
$ sudo chmod +x *.py
$ sudo python setup.py install

Entering Programming Mode

Hold down the button on the Sunoff while you apply power, then release the button.

Connecting the Programmer

The pinouts on the Sunoff basic are shown here: SUNOFF BASIC

The pinout of the herader (U4) in the middle of the board is (NOTE Pin 1 is closest to the push button):

  1. 3.3 v
  2. Rx
  3. Tx
  4. Ground
  5. GPIO14

Connection to the programmer header:

SunoffProgrammer
1 – Vcc4 – (Red)
2 – Rx3 – (Orange)
3 – Tx2 – (Yellow)
4 – GND
6 – (Black)

Backup the Existing Firmware

Put the Sunoff into programming mode then run the following command:

# esptool.py --port /dev/tty.usbserial-AH03B45L read_flash 0x00000 0x100000 sunoff-backup.bin

Erase the SUNOFF Flash

# esptool.py --port /dev/tty.usbserial-AH03B45L erase_flash

Programming a New Firmware

Download the new firmware for our device to your local computer. Put the Sunoff into programming mode and enter the following (NOTE, the firmware file I downloaded is called espurna-1.14.1-itead-sunoff-basic.bin):

# esptool.py --port /dev/tty.usbserial-AH03B45L write_flash --flash_size 1M --flash_mode dout 0x00000 espurna-1.14.1-itead-sunoff-basic.bin

Leave a Comment

Your email address will not be published. Required fields are marked *