-
Notifications
You must be signed in to change notification settings - Fork 8.2k
mgmt: mcumgr: lib: cmd: dev: Add device information handler #44124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
de-nordic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this can be addition to OS group, there is no need to create additional group for that.
Consider also making the command more complex, like for example BSD uname, where request could be filled with optional "format" string that would be assigned letters representing requested info, for example
format="bfa";
would give response:
b="<CONFIG_BOARD>"
f="0.1.2-something"
unsupported="a"
|
@de-nordic Moved to OS and uname-style output, still some parts to implement. Thoughts on this? Not sure if the processor response is already available or if it would become an #ifdef mess with many types of processors and processor families. Is there a way to currently get the overall package that you know of e.g. "Zephyr" for if purely using zephyr or "nRF connect SDK" if using that, etc.? |
I do not think that we have a way to get processor name for now. |
6d1a6f7 to
c916d9c
Compare
|
Added a custom function to allow additional options in application, and changed OS to be it's own (weak) function to allow overriding by vendors |
|
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
|
@nordicjm Should we bring this back to live? |
|
Would be a good feature to add, yes. |
Can we re-open this and set target to 3.3? |
3cde55b to
d228548
Compare
3d7b5ee to
a52f352
Compare
a52f352 to
9ec0c38
Compare
36b0294 to
6030d2c
Compare
4e77442 to
1759bdf
Compare
|
Rebased |
230035a to
efe0905
Compare
94c106f to
6567930
Compare
de-nordic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment regarding Kconfig names.
|
@de-nordic Changes made, left some of the text as-is to prevent duplicating strings |
The device information handler can be used to retrieve information about the configuration of the configured device such as board name, board revision, firmware version and build date. Signed-off-by: Jamie McCrae <[email protected]>
Adds details on the OS information mcumgr command. Signed-off-by: Jamie McCrae <[email protected]>
Adds details of a new os_mgmt command for getting OS/application information. Signed-off-by: Jamie McCrae <[email protected]>
Adds tests for the os_mgmt info command. Signed-off-by: Jamie McCrae <[email protected]>
Fixes an issue with large packets being received, these packets are chunked into 127-byte frames for the serial transport but this system is not needed for the dummy transport as it has a fixed size buffer. Signed-off-by: Jamie McCrae <[email protected]>
de-nordic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not like the (prior_output == true ... things in sprintf as I think that saving on strings will not be so significant with branching overhead.
Having said that I do not find it a deal breaker, as this is something we can argue on later and improve (or not).
Looks OK, Thanks.
|
@fabiobaltieri can you merge this please? |
Needs a second review, I'll take a look. |
| * Will be unknown if processor type is not listed | ||
| * (List extracted from /cmake/gcc-m-cpu.cmake) | ||
| */ | ||
| #if defined(CONFIG_ARM) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow this is really hard to follow, maybe worth indenting the defines in a followup patch? Not normally a fan of that either but editing this seems like a nightmare.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed it is horrible to look at and update, indentation would probably be a good idea, I'll give it a try and see if CI throws an error about it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if it's even worth reporting it in such details, maybe you could just report whatever is in cpu@0 compatible.
PR for adding a device information mcumgr group. Functionality is similar to the linux
unamecommand where a format string can be provided to return certain information including board name, processor type, architecture, kernel name/version, OS name. It can be extended by other code using the revamped mcumgr callback system to add additional output/processing or to replace the OS name.Example output, no parameters:
Zephyr'a' parameter, with default Bluetooth enabled settings:
Zephyr Zephyr zephyr-v3.0.0-2569-g7f0654f969f7 3.0.99 arm unknown bt510 ZephyrThis requires #50578 as a base and has pulled those commits into this review (first 7 commits of this PR can be ignored)