Skip to content

fix(observer): check the OTA image URL, honour radio.watchdog on room servers - #62

Merged
Elektr0Vodka merged 1 commit into
dmc-observer-devfrom
fix/dmc-observer-dev-ota-url-watchdog
Dec 1, 2026
Merged

Elektr0Vodka merged 1 commit into
dmc-observer-devfrom
fix/dmc-observer-dev-ota-url-watchdog

Conversation

@Elektr0Vodka

Copy link
Copy Markdown

Two observer fixes from the October architecture review that were written then but never pushed, ported onto the current code.

Fixes

  • OTA image URL check. The observer pull-OTA flashed whatever HTTPS file URL the manifest named, on any host. It now applies the rule the companion OTA already has: the image must be https, on the same server, and under the firmware path of the channel the manifest came from (.../mqtt/v -> .../mqtt/fw/, .../mqtt/dev/v -> .../mqtt/dev/fw/). Otherwise ota check and ota update reply ERR: manifest file URL not allowed.
  • radio.watchdog on room servers. The room server had no getRadioWatchdogMillis() override, so set radio.watchdog N replied OK there and the watchdog stayed at 5 minutes.
  • CI now runs native_ota_channel; test_ota_channel never ran there.

Behaviour changes

  • A room server where radio.watchdog was changed earlier will start using that value after the update, including 0 (off). The default of 5 minutes is unchanged.
  • A custom OTA_MANIFEST_BASE_URL must end in /v with its images under the sibling /fw/, otherwise the update is refused.

Server side

No change needed: all 140 live manifests (70 observer envs, stable and dev) satisfy the rule, checked 2026-12-01.

Not included

The rest of the old role-drift branch (SNMP attach, OTA resume, settle delay) is already covered by ObserverBridgeControl. Room server OTA alerts stay off, as the code there states.

Tests

  • pio test -e native -e native_region_gating -e native_jwt_helper -e native_ota_channel: 1081/1081 passed. New case OtaUrl.ObserverChannelsAllowOnlyTheirOwnFwPath pins the live layouts.
  • build.sh build-firmware succeeded for heltec_v4_repeater_observer_mqtt, heltec_v4_room_server_observer_mqtt and Heltec_v3_room_server_observer_mqtt (no PSRAM), with the OTA macros set. The check is present in all three images.

Not covered: the ESP32 OTA wiring and the watchdog override have no native test, and nothing was run on hardware.

… servers

The observer pull-OTA flashed whatever HTTPS `file` URL the manifest named,
on any host. The companion OTA already refuses that with
ota_firmware_url_allowed(). The observer now applies the same rule to the
manifest base it fetched from: ".../mqtt/v" may only point under
".../mqtt/fw/", ".../mqtt/dev/v" only under ".../mqtt/dev/fw/", and the image
must be https. All 140 live manifests (70 envs, stable and dev) already follow
this layout (checked 2026-12-01), so no server change is needed.

The room server had no getRadioWatchdogMillis() override, so
`set radio.watchdog N` replied OK there and the watchdog stayed at 5 minutes.

Also runs native_ota_channel in the unit-test workflow; test_ota_channel
never ran in CI.
@Elektr0Vodka
Elektr0Vodka merged commit 443aa7d into dmc-observer-dev Dec 1, 2026
1 check passed
@Elektr0Vodka
Elektr0Vodka deleted the fix/dmc-observer-dev-ota-url-watchdog branch December 1, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant