LWM2M client registration update

I have created a project using the sample LWM2M client project using SDK 1.9.1. This is then flashed into an nRF9160 DK dev board. The device is able to complete bootstrap and connect to the LWM2M server. Leaving the device running with terminal logs I can make the following observations:

Default behaviours

  1. Reg update every: 32 hours (115200s) which is set by bootstrap server
  2. Date/time updated from modem every: 24 hours (86400s) (CONFIG_DATE_TIME_UPDATE_INTERVAL_SECONDS=86400)
  3. Neighbouring cell update every: 10 minutes (600s)

The device automatically performs a device registration every 32 hours based on the registration lifetime set by the LWM2M bootstrap server. This is OK, but I would like to be able to trigger a registration update independently before this time.

The LWM2M server has set an observation on the button object resource and if I push a button on the dev board, the device then connects to the LWM2M server and sends through the updated status of the button object resource. When this occurs, the device only sends the update on the resource but does not complete a registration update at the same time.

I would like to setup my application so that the device is asleep most of the time and only wakes when the button is pressed and then performs a registration update at this time also.

Can anyone suggest how to do this?

Related