Gateway OTA#282
Draft
mniestroj wants to merge 4 commits into
Draft
Conversation
mniestroj
force-pushed
the
gateway-ota
branch
6 times, most recently
from
July 17, 2026 14:14
5a6f829 to
2147494
Compare
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>
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.
No description provided.