Skip to content

Gateway OTA#282

Draft
mniestroj wants to merge 4 commits into
mainfrom
gateway-ota
Draft

Gateway OTA#282
mniestroj wants to merge 4 commits into
mainfrom
gateway-ota

Conversation

@mniestroj

Copy link
Copy Markdown
Collaborator

No description provided.

@mniestroj
mniestroj force-pushed the gateway-ota branch 6 times, most recently from 5a6f829 to 2147494 Compare July 17, 2026 14:14
Read CONFIG_EXAMPLE_FW_UPDATE_COMPONENT from the DUT's generated
.config instead of hardcoding "ci_ota_fw" in the ota_firmware fixture,
so the pytest side always agrees with whatever component name the C
side was actually built with.

The lookup uses the runners.core.BuildConfiguration helper from
zephyr/scripts/west_commands and twister_harness.helpers.domains_helper
to pick the default sysbuild domain's build directory.

Signed-off-by: Marcin Niestroj <marcin.niestroj@canonical.com>
Mirror what coap_client and http_client already do: add a second
firmware-update mode that hashes the incoming OTA payload with SHA256 and
logs the digest instead of writing the data to the MCUboot slot and
rebooting.

Introduce an EXAMPLE_FW_UPDATE_MODE choice between:

  * EXAMPLE_FW_UPDATE_FLASH
  * EXAMPLE_FW_UPDATE_SHA256_VERIFY

Extend the CMakeLists.txt to pick the matching source file. The verifier
itself is a straight copy of coap_client/src/fw_update_test.c with the same
log lines ("OTA computed SHA256: <hex>") that the shared pytest OTA harness
already relies on.

Signed-off-by: Marcin Niestroj <marcin.niestroj@canonical.com>
Add a new pouch.gateway.ota twister scenario that exercises the Golioth OTA
download path end-to-end through the gateway's Pouch BLE tunnel. This is
second test after having settings propagation already tested.

The scenario builds the peripheral with the SHA256-verify OTA mode
introduced in the previous commit, so it hashes the downloaded payload and
logs "OTA computed SHA256: <hex>" instead of touching MCUboot slots,
allowing the test to run on nrf52_bsim without a real bootloader flow. Test
scenario implemetation in Pytest is actually the same as in coap_client and
http_client. It is duplicated for now, mainly for conftest.py simplicity.

Signed-off-by: Marcin Niestroj <marcin.niestroj@canonical.com>
Closing an active SAR bearer can synchronously call back into finish(),
which invokes the application completion callback repeatedly and allows
normal broker transitions to run while teardown is in progress.

Track accepted broker operations explicitly, retain their Bluetooth
connections, and drain discovery and GATT callbacks before releasing a
slot. Preserve the original disconnect contract by leaving physical link
termination to the Zephyr connection callback.

Add production broker lifecycle tests covering reentrant close, pending
subscription cleanup, disconnect, stale callbacks, and slot reuse.
Handle synchronous start rejection in both gateway examples.

Fixes: 1f1be19 ("Gateway: Split transport")
Signed-off-by: Marcin Niestroj <marcin.niestroj@canonical.com>
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