Mistake on this page? Email us

Update your device's registration

When the device registers to the LwM2M server, it proposes a registration session lifetime using the configuration MBED_CLOUD_CLIENT_LIFETIME. That makes the registration valid before that lifetime expires.

Note: The server-side maximum registration period is 72 hours. If you set the limit higher, the server overrides it.

Device Management Client sends registration updates automatically based on the MBED_CLOUD_CLIENT_LIFETIME value, or in response to events within the client or as initiated by Device Management Connect. Device Management Client sends a Registration Update operation to Device Management Connect.

To explicitly renew the registration from the application, use this API:

MbedCloudClient::register_update()

If a device fails to send a registration update within the device lifetime, it will be deregistered by the server.

Note: Calling register_update() is a resource-heavy operation and is not suitable for energy-efficient devices. For TCP-connected devices, use the TCP keepalive parameter. See Connection keepalive for TCP.

Note: There is a registration rate limit, so do not call register_update in a loop too often. A client registering more than 10 times within 10 seconds will be blacklisted (all incoming traffic blocked) for 60 seconds.

Failure callback

If the update operation fails, you receive the result through your error callback:

MbedCloudClient::on_error(void(*fn)(int));