Fieldwire OTAOTA

Documentation

Integrate the agent, produce a signed image, run a campaign.

Agent

py
#include <fieldwire.h>

fw_config cfg = {
    .device_id   = provisioned_id(),
    .fleet       = "sensor-v3",
    .pubkey      = FW_ROOT_PUBKEY,
    .apply_hook  = my_apply_gate,   /* return false to defer */
};
fw_init(&cfg);
fw_poll();   /* call from your main loop or a timer */

Bootloader

The bootloader verifies the signature over the slot before handing over. If verification fails, or if the application does not confirm a successful boot within the watchdog window, the previous slot is restored.

The confirmation call is the part teams forget. A device that boots and never calls fw_confirm() will roll back on the next reset, which looks like a mysterious downgrade three days later.

Image format

SectionContentsNotes
Headermagic, version, slot layout32 bytes
Manifestcomponent digests, dependenciessigned
Payloadfull image or deltacompressed
SignatureEd25519 over the manifestverified in bootloader

Signing

Signing happens offline, ideally on a machine that has never been on a network. The build pipeline produces an unsigned manifest; a human signs it; the signed manifest is uploaded.

bash
# on the build machine
fw build --input ./rootfs.img --fleet sensor-v3 \
  --version 2026.8.1 --out manifest.unsigned

# on the signing machine (offline)
fw sign --key /media/hsm/release.key \
  manifest.unsigned --out manifest.signed

# back online
fw publish manifest.signed ./rootfs.img

Campaign API

MethodPathPurpose
POST/v1/campaignscreate a staged campaign
GET/v1/campaigns/{id}progress and guard state
POST/v1/campaigns/{id}/holdhalt promotion
POST/v1/campaigns/{id}/resumeresume
POST/v1/campaigns/{id}/rollbackrevert the fleet
GET/v1/fleets/{id}/versionsversion distribution