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.
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.“
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.