Repository navigation
Add SYS.Model SREQ to report the actual chip model - #295
Open
CubeZ2mDeveloper wants to merge 1 commit into
Open
CubeZ2mDeveloper wants to merge 1 commit into
CubeZ2mDeveloper wants to merge 1 commit into
Conversation
The node model is currently inferred from the stack version and NV struct alignment: every Z-Stack 3.x device becomes a generic "CC2652", and older devices are either a "CC2531" or a "CC2538". This cannot distinguish between chips like the CC2652R, CC2652P, and CC2652RB, and is wrong for coordinators running customized Z-Stack builds on other hardware. Add a `SYS.Model` SREQ command (0x40) that returns the chip model as a length-prefixed UTF-8 string, and probe it while loading network info. The command is a firmware extension, not part of TI's documented MT SYS command set, so the probe degrades gracefully: firmware that does not recognize it (stock Z-Stack replies with `RPCError.CommandNotRecognized`) or does not answer within 5 seconds falls back to the existing inference. Stock firmware is unaffected and incurs no additional startup delay.
puddly
reviewed
Nov 17, 2026
| model_rsp = ( | ||
| await self.request(c.SYS.Model.Req(), timeout=5) | ||
| ).Model.decode("utf-8", errors="replace") | ||
| except (CommandNotRecognized, TimeoutError): |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #295 +/- ##
==========================================
- Coverage 98.57% 98.55% -0.03%
==========================================
Files 43 43
Lines 3582 3589 +7
==========================================
+ Hits 3531 3537 +6
- Misses 51 52 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
The node model is currently inferred from the stack version and NV struct alignment: every Z-Stack 3.x device becomes a generic "CC2652", and older devices are either a "CC2531" or a "CC2538". This cannot distinguish between chips like the CC2652R, CC2652P, and CC2652RB, and is wrong for coordinators running customized Z-Stack builds on other hardware.
Add a
SYS.ModelSREQ command (0x40) that returns the chip model as a length-prefixed UTF-8 string, and probe it while loading network info. The command is a firmware extension, not part of TI's documented MT SYS command set, so the probe degrades gracefully: firmware that does not recognize it (stock Z-Stack replies withRPCError.CommandNotRecognized) or does not answer within 5 seconds falls back to the existing inference. Stock firmware is unaffected and incurs no additional startup delay.