Skip to content

Align MTORR concentrator constants with Silicon Labs SDK defaults#718

Draft
TheJulianJES wants to merge 1 commit intozigpy:devfrom
TheJulianJES:tjj/source_routing_mtor_constants
Draft

Align MTORR concentrator constants with Silicon Labs SDK defaults#718
TheJulianJES wants to merge 1 commit intozigpy:devfrom
TheJulianJES:tjj/source_routing_mtor_constants

Conversation

@TheJulianJES
Copy link
Copy Markdown
Contributor

DRAFT: Check if this is really accurate.

AI summary (check if accurate)

The current values were inherited from very old EmberZNet sample code and don't match what the Silicon Labs SDK or other modern adapters use:

Param Old New SDK default SDK range
MTOR_MIN_INTERVAL 60 10 10 1..60
MTOR_MAX_INTERVAL 3600 60 60 30..300
MTOR_ROUTE_ERROR_THRESHOLD 8 3 3 1..100
MTOR_DELIVERY_FAIL_THRESHOLD 8 1 1 1..100

MTOR_MAX_INTERVAL = 3600 was the worst of the four — 12× the SDK documented maximum. The NCP accepted it on the wire (uint16) but it meant up to an hour between MTORR broadcasts, leaving devices that lost their route to the concentrator stranded for that long. The higher error/failure thresholds also slowed reactive re-broadcasts on topology changes.

The SDK plugin defaults are documented in
protocol/zigbee/app/framework/plugin/concentrator/config/concentrator-config.h. zigbee-herdsman's ember adapter applies the same defaults and validates against the same ranges.

The current values were inherited from very old EmberZNet sample code
and don't match what the Silicon Labs SDK or other modern adapters use:

| Param                       | Old   | New | SDK default | SDK range |
|-----------------------------|-------|-----|-------------|-----------|
| MTOR_MIN_INTERVAL           | 60    | 10  | 10          | 1..60     |
| MTOR_MAX_INTERVAL           | 3600  | 60  | 60          | 30..300   |
| MTOR_ROUTE_ERROR_THRESHOLD  | 8     | 3   | 3           | 1..100    |
| MTOR_DELIVERY_FAIL_THRESHOLD| 8     | 1   | 1           | 1..100    |

`MTOR_MAX_INTERVAL = 3600` was the worst of the four — 12× the SDK
documented maximum. The NCP accepted it on the wire (uint16) but it
meant up to an hour between MTORR broadcasts, leaving devices that
lost their route to the concentrator stranded for that long. The
higher error/failure thresholds also slowed reactive re-broadcasts
on topology changes.

The SDK plugin defaults are documented in
`protocol/zigbee/app/framework/plugin/concentrator/config/concentrator-config.h`.
zigbee-herdsman's ember adapter applies the same defaults and
validates against the same ranges.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.54%. Comparing base (4b97a6d) to head (9d88251).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #718   +/-   ##
=======================================
  Coverage   99.54%   99.54%           
=======================================
  Files          61       61           
  Lines        4147     4147           
=======================================
  Hits         4128     4128           
  Misses         19       19           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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