python3-improv: report Foundries enrolment/OTA state in Device-Status (ota block) - #45
Merged
Conversation
… (ota block)
Add an `ota` block to the Improv Device-Status superset (vendor char
e5f10002) so the app/cloud can see, during onboarding, whether the board is
enrolled to a Foundries factory and running the OTA client:
- registered: /var/sota/sota.toml present (the config lmp-device-register
writes and aktualizr-lite.service's ConditionPathExists gate); absent =>
not enrolled to any factory
- factory/tag/hwid/target/os_version: from /etc/os-release
- daemon: aktualizr-lite.service active
- up_to_date: null on the board on purpose — authoritative "on latest target"
comes from the cloud->Foundries API, not a possibly-OFFLINE device
All signals are root-free/best-effort and self-reported (untrusted until
attested, roadmap P2-1). Verified on eink-0167 (currently un-enrolled):
{"registered":false,"factory":"eink","tag":"main-imx93-jaguar-eink",
"hwid":"imx93-jaguar-eink","target":25,"os_version":"5.0.11-25-96",
"daemon":false,"up_to_date":null}.
Supports the app/admin onboard/offboard-to-Foundries feature (BLE-triggered
on-device registration + cloud offboard via Foundries API).
Co-authored-by: Cursor <cursoragent@cursor.com>
Hot-patching the ota block onto eink-0167 showed the characteristic value truncatedating mid-JSON at 512 bytes (full payload with the legacy flat mirror was ~580). Drop the flat top-level state/ssid/ipv4/rssi/iface mirror (the app has preferred nested net since #41) and add a progressive shrink (time.iso → ota.os_version/hwid) before publish so a long SSID can't silently corrupt the JSON. Re-verified over BLE: complete ota block with registered:false/factory:eink/target:25/daemon:false. Co-authored-by: Cursor <cursoragent@cursor.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_9daec275-c7e8-48a4-a0a3-b0e141a8281a) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an
otablock to the Improv Device-Status superset (vendor chare5f10002) so the app and cloud can see, during BLE onboarding, whether animx93-jaguar-einkboard is enrolled to a Foundries factory and running the OTA client.This is the board-lane half of the Foundries onboard/offboard feature (Alex-directed 2026-07-20): report Foundries state over Improv, with app/admin controls to onboard (BLE-triggered on-device
lmp-device-register) and offboard (cloud→Foundries API, admin-only). Cross-lane work orders are in MemPalaceesl/decisions.otablockregistered/var/sota/sota.tomlexistslmp-device-registerwrites +aktualizr-lite.serviceConditionPathExistsgate; absent ⇒ not enrolledfactory/tag/hwid/target/os_version/etc/os-releasedaemonsystemctl is-active aktualizr-liteup_to_datenull(on purpose)All signals are root-free/best-effort and self-reported (untrusted until attested — roadmap P2-1), consistent with
time/sec.Verification
py_compileclean; no new pyflakes findings./etc/os-release+/var/sota:{"registered":false,"factory":"eink","tag":"main-imx93-jaguar-eink","hwid":"imx93-jaguar-eink","target":25,"os_version":"5.0.11-25-96","daemon":false,"up_to_date":null}. Flips toregistered:true/daemon:trueafter registration.Test plan
e5f10002over BLE pre-/post-registration.otablock (app lane).Made with Cursor