munet Network Library for muwerk Scheduler
A muwerk network library supporting WiFi, NTP, OTA and MQTT for ESP8266 and ESP32 and serial links for all platforms
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ustd::Ota Class Reference

munet OTA Class More...

#include <ota.h>

Public Member Functions

 Ota ()
 
void begin (Scheduler *_pSched)
 

Detailed Description

munet OTA Class

The OTA object listens for network connections and automatically establishes OTA update funcionality on successful connection to WiFi. In case of software update, all other muwerk tasks are automatically halted, and software update is granted priority.

Network failures are handled automatically.

Sample OTA Integration

#define __ESP__ 1 // Platform defines required, see doc, mainpage.
#include "scheduler.h"
#include "net.h"
#include "ota.h"
ustd::Scheduler sched;
ustd::Net net();
void setup() {
net.begin(&sched);
ota.begin(&sched);
}
munet, the muwerk network class for WiFi and NTP
Definition: net.h:72
munet OTA Class
Definition: ota.h:57
void begin(Scheduler *_pSched)
Definition: ota.h:76

Security note: currently the API doesn't support setting an OTA password. Please use:

ArduinoOTA.setPassword("secret");
// or:
// MD5(admin) = 21232f297a57a5a743894a0e4a801fc3
ArduinoOTA.setPasswordHash("21232f297a57a5a743894a0e4a801fc3");

to set an OTA password. This will be supported within the API in a future version.

Constructor & Destructor Documentation

◆ Ota()

ustd::Ota::Ota ( )
inline

Instantiate a over-the-air (OTA) software update object.

Member Function Documentation

◆ begin()

void ustd::Ota::begin ( Scheduler *  _pSched)
inline

Setup OTA over-the-air software update.

This activates the OTA interface. As soon as a network connection is available, listening for OTA requests are started. Handling of network connections and disconnnects is done automatically and does not require further interaction.

Parameters
_pSchedPointer to the muwerk scheduler.

The documentation for this class was generated from the following file: