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

Question: Why failed registration update goes into STATE_BOOTSTRAP_REQUIRED immediately? #724

Closed
ramadhanafif opened this issue Aug 7, 2023 · 1 comment

Comments

@ramadhanafif
Copy link

Please correct me if my understanding is wrong. Wakaama client has this behavior where if it sends a registration update message and it does not get reply from the LwM2M server, it will change immediately to STATE_BOOTSTRAP_REQUIRED.

What I'm complaining about, since LwM2M is mostly UDP, we should expect some packet loss. Therefore, we should not immediately go to STATE_BOOTSTRAP_REQUIRED just because we failed once. I believe multiple attempts should take place first, (maybe with a exponential backoff) before wakaama client decide that the server is lost forever.

@ramadhanafif
Copy link
Author

ramadhanafif commented Sep 8, 2023

Answer: set the values in serverInstance struct, in the get_server_object() function, in the object_server.c

serverInstance->bootstrapOnRegistrationFailure = 0; // Don't bootstrap on registration failure
serverInstance->communicationRetryCount = 3; // Retry 3 times before entering failure
serverInstance->communicationRetryTimer = 5; // Retry for 5 seconds times exponential back-off

For details, look at the LwM2M v1.1 Standard by OMA particularly in Figure 6.2.1.1

I wish that we had some sort of documentation or FAQ for this library.

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

No branches or pull requests

1 participant