Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: lwm2m: Select server candidate and allow fallback
If server registration fails, allow fallback to secondary server, or fallback to bootstrap. Also allow fallback to different bootstrap server. Changes to RD state machine: * All retry logic should be handled in NETWORK_ERROR state. * New state SERVER_DISABLED. * Internally disable servers that reject registration * Temporary disable server on network error. * Clean up all "disable timers" on start. * Select server first, then find security object for it. * State functions return void, error handling is done using states. * DISCONNECT event will only come when client is requested to stop. * NETWORK_ERROR will stop engine. This is generic error for all kinds of registration or network failures. * BOOTSTRAP_REG_FAILURE also stops engine. This is fatal, and we cannot recover. Refactoring: * Move lwm2m_server functions and macros to own header. * Server selection logic is inside server object. * sm_handle_timeout_state() does not require msg parameter. Unused. * When bootstrap fail, we should NOT back off to registration. This is a fatal error, and it stops the engine and informs application. Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
- Loading branch information
1 parent
1fc9e88
commit ddcbabf
Showing
13 changed files
with
695 additions
and
313 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.