Skip to content
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

subsys: mgmt: Fix handler search #78278

Conversation

tomchy
Copy link
Contributor

@tomchy tomchy commented Sep 11, 2024

Allow to implement the same SMP group by multiple modules and iterate over all groups, so it is possible to use RESET command, implemented by Zephyr module and prvide custom BOOTLOADER_INFO command implementation.

Allow to implement the same SMP group by multiple modules and iterate
over all groups, so it is possible to use RESET command, implemented by
Zephyr module and prvide custom BOOTLOADER_INFO command implementation.

Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Copy link
Collaborator

@nordicjm nordicjm left a comment

Choose a reason for hiding this comment

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

Allow to implement the same SMP group by multiple modules

Not a supported operation, if you want a custom implementation you must create a full implementation and disable the original, this is by design

@tomchy
Copy link
Contributor Author

tomchy commented Sep 11, 2024

Allow to implement the same SMP group by multiple modules

Not a supported operation, if you want a custom implementation you must create a full implementation and disable the original, this is by design

Is there any reasonable way to set the bootloader name for other bootloaders than MCUboot?

@nordicjm
Copy link
Collaborator

Allow to implement the same SMP group by multiple modules

Not a supported operation, if you want a custom implementation you must create a full implementation and disable the original, this is by design

Is there any reasonable way to set the bootloader name for other bootloaders than MCUboot?

Have created #78285 this allows you to add custom response, now you might think "that's a problem because it will return two responses" - you just need to add your return value, then return an rc error code of MGMT_ERR_EOK

@tomchy
Copy link
Contributor Author

tomchy commented Sep 11, 2024

Allow to implement the same SMP group by multiple modules

Not a supported operation, if you want a custom implementation you must create a full implementation and disable the original, this is by design

Is there any reasonable way to set the bootloader name for other bootloaders than MCUboot?

Have created #78285 this allows you to add custom response, now you might think "that's a problem because it will return two responses" - you just need to add your return value, then return an rc error code of MGMT_ERR_EOK

Thank you, that sounds good!
So - the callback shall return MGMT_CB_ERROR_RC, use zse to build the response and set err_rc to MGMT_ERR_EOK?

Apart from that - the dependency to the MCUboot must be removed to use it 🙂

if BOOTLOADER_MCUBOOT

config MCUMGR_GRP_OS_BOOTLOADER_INFO
	bool "Bootloader information"
	help
	  Allows to query MCUmgr about bootloader used by device and various bootloader
	  parameters.

endif # BOOTLOADER_MCUBOOT

@nordicjm
Copy link
Collaborator

Allow to implement the same SMP group by multiple modules

Not a supported operation, if you want a custom implementation you must create a full implementation and disable the original, this is by design

Is there any reasonable way to set the bootloader name for other bootloaders than MCUboot?

Have created #78285 this allows you to add custom response, now you might think "that's a problem because it will return two responses" - you just need to add your return value, then return an rc error code of MGMT_ERR_EOK

Thank you, that sounds good! So - the callback shall return MGMT_CB_ERROR_RC, use zse to build the response and set err_rc to MGMT_ERR_EOK?

Apart from that - the dependency to the MCUboot must be removed to use it 🙂

if BOOTLOADER_MCUBOOT

config MCUMGR_GRP_OS_BOOTLOADER_INFO
	bool "Bootloader information"
	help
	  Allows to query MCUmgr about bootloader used by device and various bootloader
	  parameters.

endif # BOOTLOADER_MCUBOOT

#78312 and yes

@tomchy
Copy link
Contributor Author

tomchy commented Sep 12, 2024

Improvement not needed. Customizable bootloader name to be implemented in #78312 and #78285.

@tomchy tomchy closed this Sep 12, 2024
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.

3 participants