Skip to content

App: Add FOTA to connectors to update devices from code #250

@DennisMoschina

Description

@DennisMoschina

Summary

Add Firmware Over-The-Air (FOTA) support to the OpenEarable connector so that firmware updates can be triggered programmatically — without requiring the OpenEarable app.

Motivation

Currently, updating device firmware over the air requires using the OpenWearable app. There is no way for developers or automated pipelines to initiate a FOTA update from code. The firmware already supports FOTA via MCUmgr (mcumgr_upload.sh + signed .bin artifacts), and GitHub releases/PR builds are published automatically — the missing piece is a connector-level API to drive the update.

Requirements

The connector should provide a FOTA interface that supports the following firmware sources:

1. GitHub Releases

  • List available official firmware releases from the OpenEarable/open-earable-2 GitHub repository
  • Allow the user to select a specific release version (e.g. v2.2.2)
  • Download the corresponding signed firmware artifact(s) from the release assets

2. Pull Request / Pre-release Builds

  • List and select firmware builds from the rolling pr-builds pre-release (or individual PR artifacts)
  • Useful for testing in-progress features without building from source

3. Custom / Local Firmware File

  • Accept a user-supplied .bin / .zip firmware file path or URL
  • Validate the file before attempting the update

Acceptance Criteria

  • The connector exposes a FOTA API (e.g. fota.fromRelease(version), fota.fromFile(path), fota.fromPR(prNumber))
  • Firmware can be fetched from GitHub releases and PR pre-release builds via the GitHub API
  • Users can provide a local firmware file for upload
  • Progress and status of the update is reported back to the caller (e.g. percentage, success/failure)
  • Error handling for connectivity issues, invalid firmware, or device rejections
  • Documentation and at least one usage example are included

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions