Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can perform remote firmware updates using ESP8266OTA (Over the Air) update is the process of loading a new firmware to ESP8266 module using WiFi connection rather than a serial communication. This type of functionality is extremely useful in case of no physical access to the ESP module.

Hardware Setup

Add Includes to Skecth to enable OTA

Code Block
languagecpp
#include <ESP8266WiFi.h> 
#include <ArduinoOTA.h>  // Enable Remote Updates

The password is same API_KEY 

...

You can se full featured OTA Sample: 

On IDE: File > Examples > OpenDevice > Projects > SonoffBasic

Info

The first upload must be done by the Serial, the others can be done by the network.

Upload ( Using Middleware / Server )

The OpenDevice Server has Firmware version management functionality (binaries only for now)
Through the Programming Menu, it is possible to remotely send firmware to devices

Steps:

1. Generate .bin file: The file will be saved in sketch folder

Image Added


2. Upload firmware binary in Menu > Programming

Image Added


3. Select active connection

Image Added

Info

We still do not have any feedback if the update worked out right or wrong.

See: https://github.com/OpenDevice/OpenDevice/issues/138

You can enable DEBUG_PORT and DEBUG_LEVEL = HTTP_UPDATE  in ESP Configuration Menu on Arduino IDE, to troubleshoot problems



Upload ( Using IDE )

Info

Enable SoftAP: WiFi.mode(WIFI_AP_STA);


On serial console you can see the IP:

...

If it does not appear in the list, restart the IDE.

selection of OTA port

The password is same API_KEY 

If it still does not appear, you can use the option: Upload ( Manual PUSH )

...

Much information will appear, look for the file ending with ".ino.bin" on console

Upload ( Using Middleware )

StatuscolourYellowtitlePENDING


References