LwM2M security object instance ID

Hello, wanted to ask if cumulocity server is sending correct instance ID when bootstrap server option is disabled?

LwM2M documentation:

while the Instance ID:1 of the Security Object ID:0 contains the credentials for the LwM2M Bootstrap-Server.

If i disable bootstrap server option (which means i have credentials for LwM2M server, not bootstrap-server)

I am getting instance ID 1. Shouldn’t be instance ID 0? I am really confused here.

Hi,

The mentioned line from the LwM2M documentation is an example.

In our integration the bootstrap server setting starts from the 0th instance and LwM2M server setting starts from the 1st instance. It is possible to add additional offset if required.

The instance ID of where the LWM2M server and security information is stored shouldn’t be an issue. The important part would be to not overwrite the instance where it contains the bootstrap server information on the device.

As described in LwM2M specification (https://www.openmobilealliance.org/release/lightweightm2m/V1_0-20170208-A/OMA-TS-LightweightM2M-V1_0-20170208-A.pdf), the actual pairing of Security and Server objects is done by Short Server ID value.

From LwM2M specification:
“Note that according to the LwM2M Server Account definition, a usual LwM2M Server Account is composed of a Security
Object Instance and a Server Object Instance which are paired by sharing (respectively in Resource 10 and Resource 0 of that
Objects) the same Short Server ID; a Short Server ID being unique in the LwM2M Client.“

2 Likes

Thank you for your reply, one more question occurred:

if security object and server object SSID should match, what happens if i change SSID for security object. Should i change for server object as well?

in security object .xml i see this line:

This Resource MUST be set when the Bootstrap-Server Resource has a value of 'false'

or should i report error if SSID being changed?

Yes, there should be a matching Short Server ID to link LWM2M Server object to its LWM2M Security object.

LWM2M integration in Cumulocity already takes care of this setting behind the scenes.
In LWM2M Configuration / Servers written in bootstrap view, it is possible for you to change Short Server ID for the corresponding Server setting.
When the device connects with bootstrap to the platform in the next time, Cumulocity’s LWM2M Service will take care of writing to the device for the both LWM2M Security (Object ID: 0) and LWM2M Server (Object ID: 1) objects accordingly.

Thank you for your answers

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.