Mistake on this page? Email us

Deregistering the device

Devices usually deregister from Device Management services for one of two reasons:

  • The registration session lifetime on the LwM2M server expires. Pelion Device Management deregisters Pelion Device Management Client. For example, if the client hasn't been able to send its register_update() within the registered lifetime due to connectivity issues, the LwM2M server will drop it to the deregistered state.

  • Device Management Client requests deregistration by calling the MbedCloudClient::close() API:

    MbedCloudClient::close();
    

    The result of that request can be:

    • Success

      If Device Management Client is successfully deregistered from the Device Management service, your application receives the Unregistered result through the on_status_callback callback.

    • Failure

      If the deregistration operation fails, the application receives the result through the error callback.

When Device Management Client is deregistered from the LwM2M server for any reason, it's marked as deregistered in the Device Management services. All queued messages are removed from the server queue.

If Device Management Client tries to connect to the services while in the deregistered state, it's forced to perform a full registration again.

Deregister doesn't remove the device identity from the device, so the device uses the same identity to register with the Device Management service next time.