Skip to content
/ iot-ota Public

Firmware OTA updates library in C for IoT devices

License

Notifications You must be signed in to change notification settings

LuKks/iot-ota

Repository files navigation

iot-ota

Firmware OTA updates in C for IoT devices

Usage

#include <WiFi.h>
#include <iot_ota.h>

#define FIRMWARE_ID "<firmware id>"

void setup () {
  Serial.begin(115200);

  WiFi.begin("<wifi ssid>", "<wifi pass>");

  while (WiFi.status() != WL_CONNECTED) {
    Serial.println("Connecting");
    delay(500);
  }

  ota_updates(FIRMWARE_ID);
}

void loop () {
  Serial.println("Hello World!");
  delay(1000);
}

API

See include/iot_ota.h for the public API.

ota_set_server(url)

Set a custom server, in case you self-host your own.

By default, it uses https://ota.leet.ar with no guarantees for now.

ota_updates(firmware_id)

Run updates on background. It also generates and saves a random device ID.

When you pass a firmware id, it always gets saved in the NVS.

Later you can pass NULL, and it will reuse the one already saved.

License

MIT

About

Firmware OTA updates library in C for IoT devices

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published