Skip to content

[nrf toup] Derive BDX download timeout from session round trip - #760

Merged
kkasperczyk-no merged 1 commit into
nrfconnect:masterfrom
dominik-michalczyk-nordic:fix_bdx_timeout
Oct 1, 2026
Merged

kkasperczyk-no merged 1 commit into
nrfconnect:masterfrom
dominik-michalczyk-nordic:fix_bdx_timeout

Conversation

@dominik-michalczyk-nordic

Copy link
Copy Markdown
Contributor

Summary

The OTA requestor used a fixed five-minute BDX download timeout, which is far too long for sessions with short retransmission intervals and does not adapt to the peer's advertised session parameters. Compute the timeout from the session round trip time plus the expected provider processing time.

Testing

ncs-matter
manifest-pr-skip

@github-actions github-actions Bot added the app label Sep 29, 2026
@NordicBuilder

Copy link
Copy Markdown

none

Note: This comment is automatically posted and updated by the Contribs GitHub Action.

@CLAassistant

CLAassistant commented Sep 29, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Comment thread src/app/clusters/ota-requestor/DefaultOTARequestor.cpp
constexpr System::Clock::Timeout kExpectedProviderProcessingTime = System::Clock::Seconds16(2);

// Number of round trips without any BDX progress that is treated as a stalled download.
constexpr uint32_t kDownloadTimeoutRoundTrips = 2;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure whether this value is not too aggressive. As far as I understand how does it work, we may have a very small round trip time for the device with small communication interval (SED with 1 s sleep, or FTD without sleeping). 2 * roundtrip can be still a very small value, so even short hiccup on the OTA provider side could lead to timeout. Would it make sense to have some lower value to not timeout too often? Some value that we can consider as temporary lag in communication, e.g 7-10 s or something.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, I added 10s lower bound for download timeout.

The OTA requestor used a fixed five-minute BDX download timeout, which is
far too long for sessions with short retransmission intervals and does
not adapt to the peer's advertised session parameters.
Compute the timeout from the session round trip time plus the expected
provider processing time.

Signed-off-by: Dominik Michalczyk <dominik.michalczyk@nordicsemi.no>
@kkasperczyk-no
kkasperczyk-no merged commit d92ebd4 into nrfconnect:master Oct 1, 2026
9 checks passed
dominik-michalczyk-nordic added a commit to dominik-michalczyk-nordic/ncs-matter that referenced this pull request Oct 1, 2026
From PR: nrfconnect/sdk-connectedhomeip#760

Signed-off-by: Dominik Michalczyk <dominik.michalczyk@nordicsemi.no>
ArekBalysNordic pushed a commit to nrfconnect/ncs-matter that referenced this pull request Oct 1, 2026
From PR: nrfconnect/sdk-connectedhomeip#760

Signed-off-by: Dominik Michalczyk <dominik.michalczyk@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants