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

nrf_rpc: detect reboot of the remote #1581

Closed
wants to merge 1 commit into from

Conversation

Damian-Nordic
Copy link
Contributor

Raise an error when the remote sends an init packet with unknown destination group ID after the group has been bound, which indicates a reboot of the peer.

Raise an error when the remote sends an init packet with
unknown destination group ID after the group has been bound,
which indicates a reboot of the peer.

Signed-off-by: Damian Krolik <[email protected]>
@Damian-Nordic
Copy link
Contributor Author

Converting to draft, as after second thought I'm not sure if reporting a reboot as an error won't cause some issues on existing deployments. Maybe we should add another callback to nrf_rpc_init instead?

@@ -379,6 +380,11 @@ static void internal_tx_handler(void)
case NRF_RPC_TASK_GROUP_INIT: {
const struct nrf_rpc_group *group = task.group_init.group;

if (task.group_init.signal_reboot) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm... Why should device send error instead of notifying application about rebooted remote and reply to remote?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nrf_rpc_err does notify the application about the error, and only sends the error in certain cases. But I would say, you probably will like #1583 approach more than this one :)

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the another one is better.

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.

2 participants