Repository navigation
OTAmpy v4.8.0
·
23 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
OTAmpy 4.8.0 — 2026-09-11
Major (breaking changes)
- None.
Minor (functionality added in a backward compatible manner)
- Shared-UART (channel-mux) mode, end to end. A project whose own code needs the same physical UART as OTAmpy can wrap it in
otampy.mux.SerialMuxon the device and have the host CLI speak the matching framing, so one radio link carries OTAmpy traffic alongside the application's own stream. New wire contract below URST (docs/protocol.md§1.3,PROTOCOL_VERSIONunchanged), a hostotampy.channel.ChannelCodec/ChannelSerialcodec, a--mux/--no-muxCLI flag andmuxconfig key, and anotampy init --muxscaffold. Opt-in; existing direct-mode devices and CLIs are unaffected. - Boot-time recovery window — recover a device stranded before
ota.poll(), over the radio, no USB.boot.pynow listens briefly on every boot forUPDATE_REQUESTorROLLBACK, widening to an ~8 s window after a boot that never reachedpoll()or still carries an unconfirmed candidate. New device settingsOTA_BOOT_RECOVERY_LISTEN_MS/OTA_BOOT_MARK_FILE; new host retry loops viaotampy upd --recoverandotampy rollback --recoverwith a configurablerecovery-wait. HonorsOTA_REQUIRE_AUTHwhen set. OptionalOTA(...).boot(heartbeat=wdt.feed)lets a customboot.pyfeed a watchdog across both blocking stretches.PROTOCOL_VERSIONunchanged. - A committed OTA update is now on trial until it is confirmed.
boot.pytracks unconfirmed candidates in a retain-previous journal and auto-restores the previous generation if the device reboots withinOTA_TRIAL_BOOTS(default3) boots without being confirmed. New channel-0 commandsCONFIRM/UPDATE_STATE; new CLI commandsotampy confirmandotampy state;otampy updnow auto-confirms after a healthyPING.PROTOCOL_VERSIONunchanged. otampy rollbackreverts a confirmed (or trialling) update over the radio, restoring the one retained previous generation via a newROLLBACKchannel-0 command. Refuses safely when nothing is retained or a commit is mid-flight.- Boot-time
UPDATE_COMMITis now all-or-nothing and retains the previous generation, via a new commit journal (OTA_JOURNAL_FILE) andrestore.repair()run on every boot.UPDATE_STARTdiscards the previously retained generation, keeping at most one prior generation on device. otampy cpcan now copy device-to-host. Adevice:<path>[:<host target>]argument downloads a single file from the device, reusing the existingCATcommand rather than adding new device-side protocol.
Patch (backward compatible bug fixes)
otampy upd --all-filesno longer uploads__pycache__artifacts or*.example.*template files, which were never meant to be flashed to the device.- Session-scoped settings (
ports/log-level/config/device-dir/mux) no longer silently revert under automation that forks a fresh subprocess per command. A newOTAMPY_SESSION_IDenv var lets such callers opt into a fixed session identifier instead of relying on process ancestry, which changed on every invocation with no persistent parent shell. - Every successful
otampy updno longer reports failure due to the post-commit health check racing the new recovery window. Post-commit androllbackhealth checks now use their ownpost-commit-ready-timeout(default30) instead of sharing the shorterupdate-ready-timeout. - The shipped
boot.py/main.pyexample scaffold is direct mode again, fixing a regression where it wiredSerialMuxunconditionally and silently broke plain (non-mux) host CLI commands.