Blue-Falcon

Kotlin Multiplatform BLE library for iOS, Android, macos, windows and javascript

View the Project on GitHub Reedyuk/blue-falcon

ADR 0003: Add Nordic FOTA Plugin Using SMP Protocol

Status: Accepted

Date: 2026-04-12

Deciders: Andrew Reed, Community Contributors

Technical Story: FOTA update feature worth adding it?

Context

Users of Blue Falcon working with Nordic Semiconductor chipsets (nRF52, nRF53, nRF91 series) need to perform Firmware Over The Air (FOTA) updates. Currently, this requires integrating a separate Nordic library (McuManager/MCUmgr) alongside Blue Falcon, which creates complexity in managing two BLE stacks simultaneously. After a FOTA update, the device must be disconnected from the Nordic library and reconnected through Blue Falcon for firmware validation.

With the plugin architecture introduced in ADR 0002, Blue Falcon can now support this functionality as an optional plugin. This allows users who need Nordic FOTA to include it without bloating the core library for users who do not.

The Nordic MCUmgr protocol uses the Simple Management Protocol (SMP) over BLE to communicate with device bootloaders. SMP operates on a well-defined GATT service and characteristic, using CBOR-encoded messages to transfer firmware images and manage the update lifecycle.

Decision

We will implement a Nordic FOTA plugin (blue-falcon-plugin-nordic-fota) that provides firmware update capabilities for Nordic chipset devices using the SMP protocol directly over Blue Falcon’s BLE operations.

The plugin will:

  1. Implement the SMP protocol using standard BLE read/write operations provided by Blue Falcon’s core engine, without depending on any external Nordic libraries.
  2. Follow the existing plugin pattern established by the logging, retry, and caching plugins (ADR 0002).
  3. Manage the FOTA state machine: Idle → Uploading → Confirming → Resetting → Validating → Complete.
  4. Provide progress callbacks via a FotaCallback interface for UI integration.
  5. Support configurable parameters including chunk size, timeout durations, and auto-confirm/auto-reset behavior.
  6. Use CBOR encoding for SMP message framing, implemented inline within the plugin to avoid external dependencies.

SMP Protocol Details

Consequences

Positive

Negative

Neutral

Alternatives Considered

Alternative 1: Wrap Nordic’s McuManager SDK

Wrap Nordic’s official McuManager libraries (Android/iOS) behind a Kotlin Multiplatform interface.

Pros:

Cons:

Why not chosen: Defeats the purpose of a unified multiplatform library and doesn’t solve the dual-stack problem.

Alternative 2: Add FOTA to Core Library

Implement FOTA directly in the Blue Falcon core module.

Pros:

Cons:

Why not chosen: Contradicts the plugin-based architecture decision and adds unnecessary weight for users who don’t need FOTA.

Alternative 3: External Protocol Library

Create a completely separate library that depends on Blue Falcon for BLE transport.

Pros:

Cons:

Why not chosen: The plugin system already provides the right extension point. A plugin benefits from the existing interceptor chain.

Implementation Notes

References