<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Read / Write lwm2m resource instance</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81550/read-write-lwm2m-resource-instance</link><description>Hi all, 
 I&amp;#39;m implementing a lwm2m client on a NRF9160 and have a problem with read/write resource instances. I use Leshan demo server to test the object and a came across a problem on ‘Remote SIM Provisioning’ object 504. When I read ‘504/0/11’ it reads</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 18 Nov 2021 14:55:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81550/read-write-lwm2m-resource-instance" /><item><title>RE: Read / Write lwm2m resource instance</title><link>https://devzone.nordicsemi.com/thread/339687?ContentTypeID=1</link><pubDate>Thu, 18 Nov 2021 14:55:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a6116d3-deea-48ec-83ea-3f28d35b73f1</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi ICM_UC,&lt;/p&gt;
&lt;p&gt;Looks like the source codes of lwm2m_enngine.c is from&amp;nbsp;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/main/subsys/net/lib/lwm2m/lwm2m_engine.c"&gt;zephyr/lwm2m_engine.c at main · zephyrproject-rtos/zephyr (github.com)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I think it would be better you create &lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues"&gt;one issue report&lt;/a&gt;&amp;nbsp;and proposal your solution to the Zephyr GitHub repository. It is a great honor to contribute to such a project.&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f609.svg" title="Wink"&gt;&amp;#x1f609;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Charlie&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read / Write lwm2m resource instance</title><link>https://devzone.nordicsemi.com/thread/339488?ContentTypeID=1</link><pubDate>Wed, 17 Nov 2021 15:43:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c165847-4562-4fc2-a2ee-2c5603d3e4f5</guid><dc:creator>ICM_UC</dc:creator><description>&lt;p&gt;Hi Charlie,&lt;/p&gt;
&lt;p&gt;The changes in order to read a specific resource instance are minor.&lt;/p&gt;
&lt;p&gt;In the file &amp;#39;lwm2m_engine.c&amp;#39; function &amp;#39;lwm2m_read_handler&amp;#39;&lt;/p&gt;
&lt;p&gt;Need to change 2 thing&lt;/p&gt;
&lt;p&gt;first &amp;lt;&amp;gt; from this&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;for (i = 0; i &amp;lt; loop_max; i++) {
		if (res-&amp;gt;res_instances[i].res_inst_id ==
		    RES_INSTANCE_NOT_CREATED) {
			continue;
		}

		if (res-&amp;gt;res_inst_count &amp;gt; 1) {
			msg-&amp;gt;path.res_inst_id =
				res-&amp;gt;res_instances[i].res_inst_id;
		}

		/* setup initial data elements */
		data_ptr = res-&amp;gt;res_instances[i].data_ptr;
		data_len = res-&amp;gt;res_instances[i].data_len;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;to this&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;for (i = 0; i &amp;lt; loop_max; i++) {
		if (res-&amp;gt;res_instances[i].res_inst_id ==
		    RES_INSTANCE_NOT_CREATED) {
			continue;
		}

		if (res-&amp;gt;res_inst_count &amp;gt; 1) {
            if ((msg-&amp;gt;path.level &amp;gt; 3U) &amp;amp;&amp;amp; 
                (res-&amp;gt;res_instances[i].res_inst_id != msg-&amp;gt;path.res_inst_id)) {
                continue;
            }
			msg-&amp;gt;path.res_inst_id =
				res-&amp;gt;res_instances[i].res_inst_id;
		}

		/* setup initial data elements */
		data_ptr = res-&amp;gt;res_instances[i].data_ptr;
		data_len = res-&amp;gt;res_instances[i].data_len;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;second &amp;lt;&amp;gt; From this&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    if (res-&amp;gt;multi_res_inst) {
        engine_put_end_ri(&amp;amp;msg-&amp;gt;out, &amp;amp;msg-&amp;gt;path);
		msg-&amp;gt;path.res_inst_id = res_inst_id_tmp;
	}

	return 0;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;To&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    if (res-&amp;gt;multi_res_inst) {
        if (msg-&amp;gt;path.level &amp;lt; 4U) {
          engine_put_end_ri(&amp;amp;msg-&amp;gt;out, &amp;amp;msg-&amp;gt;path);
        }
		msg-&amp;gt;path.res_inst_id = res_inst_id_tmp;
	}

	return 0;
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read / Write lwm2m resource instance</title><link>https://devzone.nordicsemi.com/thread/339415?ContentTypeID=1</link><pubDate>Wed, 17 Nov 2021 12:06:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62ad7534-4849-4d66-9d96-ad8fe89dde34</guid><dc:creator>ICM_UC</dc:creator><description>&lt;p&gt;Hi Charlie,&lt;/p&gt;
&lt;p&gt;Yes, the same happens to objects in LwM2M Client sample.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m working on the changes needed to support Read/Write resource instances and then i&amp;#39;ll post them here&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read / Write lwm2m resource instance</title><link>https://devzone.nordicsemi.com/thread/339285?ContentTypeID=1</link><pubDate>Tue, 16 Nov 2021 15:35:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c60455a-a9eb-4576-b94e-f6a3387e5caa</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi ICM_UC,&lt;/p&gt;
&lt;p&gt;You can share your&amp;nbsp;modification to the lwm2m library here. I will create an internal bug or improvement report after evaluating your solution.&lt;/p&gt;
&lt;p&gt;Do you experience a similar issue with objects in the&amp;nbsp;&lt;span&gt;current&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.1/nrf/samples/nrf9160/lwm2m_client/README.html"&gt;nRF9160: LwM2M Client&lt;/a&gt;&lt;span&gt;&amp;nbsp;sample?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Charlie&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read / Write lwm2m resource instance</title><link>https://devzone.nordicsemi.com/thread/339273?ContentTypeID=1</link><pubDate>Tue, 16 Nov 2021 14:50:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb1d4f35-85a3-48b9-8f64-e9f70c3ddc2e</guid><dc:creator>ICM_UC</dc:creator><description>&lt;p&gt;Hi Charlie,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I still need your help!&lt;/p&gt;
&lt;p&gt;To correct this&amp;nbsp;problem i need to change nordic lwm2m library and this is a problem because every time you update SDK i need to replicate all the changes.&lt;/p&gt;
&lt;p&gt;How can we solve this problem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read / Write lwm2m resource instance</title><link>https://devzone.nordicsemi.com/thread/339270?ContentTypeID=1</link><pubDate>Tue, 16 Nov 2021 14:46:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1eb5ca6f-8218-4132-aa52-cd79ca6bd865</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi ICM_UC,&lt;/p&gt;
&lt;p&gt;Sorry for my misunderstanding, glad to hear you found the issue.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Charlie&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read / Write lwm2m resource instance</title><link>https://devzone.nordicsemi.com/thread/339257?ContentTypeID=1</link><pubDate>Tue, 16 Nov 2021 14:18:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1d83921-bc7c-4a12-82e7-36c879fecdc0</guid><dc:creator>ICM_UC</dc:creator><description>&lt;p&gt;After digging in other blogs i found what should be the answer for &amp;#39;Read resource instance&amp;#39;&lt;/p&gt;
&lt;p&gt;This is what Leshan asks&lt;/p&gt;
&lt;p&gt;00&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; RCV COAP MSG LEN: 26&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; Header&amp;lt;&amp;gt; 48 01 #ID 07 7a #TK 78 62 70 15 7e de ef 47 &lt;br /&gt;00&amp;gt; Payld &amp;lt;&amp;gt; b3 35 30 34 01 30 02 31 31 01 30 62 2d 16 &lt;br /&gt;00&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; END MSG &amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; RCV PATH: obj_id 504, obj_inst_id 0, res_id 11, res_inst_id 0, level 4&lt;br /&gt;00&amp;gt;&lt;/p&gt;
&lt;p&gt;This should be what lwm2m client answers&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;00&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; SND COAP MSG LEN: 39&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; Header&amp;lt;&amp;gt; 68 45 #ID 07 7a #TK 78 62 70 15 7e de ef 47 &lt;br /&gt;00&amp;gt; Payld &amp;lt;&amp;gt; c2 2d 16 ff 48 00 14 38 39 33 35 31 30 36 30 30 30 30 37 37 30 38 36 32 39 39 31 &lt;br /&gt;00&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; END MSG &amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/p&gt;
&lt;p&gt;With this answer from lwm2m client everything works fine.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read / Write lwm2m resource instance</title><link>https://devzone.nordicsemi.com/thread/339252?ContentTypeID=1</link><pubDate>Tue, 16 Nov 2021 14:09:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1219bd29-8710-487c-838d-8c25d0037859</guid><dc:creator>ICM_UC</dc:creator><description>&lt;p&gt;Hi Charlie,&lt;/p&gt;
&lt;p&gt;You are missing the point. My problem is not the info inside that resource instance, that is a string and i can force any value there, what i need is to resolve the problem explained in the first post. If i read the resource, everything is OK, but if i read the resource instance i get an error.&lt;/p&gt;
&lt;p&gt;After exploring more the code i realized that Leshan sends a different payload depending on the button pressed, read resource or resource instance, but the answer from LWm2m client is the same.&lt;/p&gt;
&lt;p&gt;This is what Leshan send when we press &amp;#39;Read resource&amp;#39;&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; RCV COAP MSG LEN: 24&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;br /&gt; 00&amp;gt; Header&amp;lt;&amp;gt; 48 01 #ID 07 79 #TK dc ae 4e 38 b6 5c 1b 33&lt;br /&gt; 00&amp;gt; Payld &amp;lt;&amp;gt; b3 35 30 34 01 30 02 31 31 62 2d 16&lt;br /&gt; 00&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; END MSG &amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;br /&gt; &lt;br /&gt; 00&amp;gt; RCV PATH: obj_id 504, obj_inst_id 0, res_id 11, res_inst_id 0, level 3&lt;br /&gt; This is what lwm2m client answers&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; SND COAP MSG LEN: 42&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;br /&gt; 00&amp;gt; Header&amp;lt;&amp;gt; 68 45 #ID 07 79 #TK dc ae 4e 38 b6 5c 1b 33&lt;br /&gt; 00&amp;gt; Payld &amp;lt;&amp;gt; c2 2d 16 ff 88 0b 17 48 00 14 38 39 33 35 31 30 36 30 30 30 30 37 37 30 38 36 32 39 39 31&lt;br /&gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; END MSG &amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/p&gt;
&lt;p&gt;Until here everything is OK. The problem cames when i press &amp;#39;Read resource instance&amp;#39;. see the payload&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; RCV COAP MSG LEN: 26&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;br /&gt; 00&amp;gt; Header&amp;lt;&amp;gt; 48 01 #ID 07 7a #TK 78 62 70 15 7e de ef 47&lt;br /&gt; 00&amp;gt; Payld &amp;lt;&amp;gt; b3 35 30 34 01 30 02 31 31 01 30 62 2d 16&lt;br /&gt; 00&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; END MSG &amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;br /&gt; &lt;br /&gt; 00&amp;gt; RCV PATH: obj_id 504, obj_inst_id 0, res_id 11, res_inst_id 0, level 4&lt;/p&gt;
&lt;p&gt;00&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; SND COAP MSG LEN: 39&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;br /&gt; 00&amp;gt; Header&amp;lt;&amp;gt; 68 45 #ID 07 7a #TK 78 62 70 15 7e de ef 47&lt;br /&gt; 00&amp;gt; Payld &amp;lt;&amp;gt; c2 2d 16 ff 88 0b 17 48 00 14 38 39 33 35 31 30 36 30 30 30 30 37 37 30 38 36 32 39 39 31&lt;br /&gt; 00&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; END MSG &amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read / Write lwm2m resource instance</title><link>https://devzone.nordicsemi.com/thread/339241?ContentTypeID=1</link><pubDate>Tue, 16 Nov 2021 13:39:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f86dada-66ad-4c15-9393-4bfba6aee89f</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi ICM_UC,&lt;/p&gt;
&lt;p&gt;After some investigation, I do not think Nordic as the SoC producer can help you debug this issue. We can only provide your samples about how to write the implements for one lwm2m object.&amp;nbsp; As &lt;a href="https://en.wikipedia.org/wiki/Remote_SIM_provisioning"&gt;Remote SIM provisioning&lt;/a&gt;&amp;nbsp;Wikipedia explains, this is an&amp;nbsp;&lt;span&gt;eSIM speciation realized by GSMA. You need to check with your SIM card provider to see if this is supported by their products, or as a SIM card provider you need internal cooperation to find the cause of the issue.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Where did you get those codes? Can you get help from the provider? If you are a SIM card solution provider, please give us more background knowledge about your project. You can contact our &lt;a href="https://www.nordicsemi.com/About-us/Contact-Us"&gt;local sales team&lt;/a&gt; to get more suggestions about your development.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Charlie&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read / Write lwm2m resource instance</title><link>https://devzone.nordicsemi.com/thread/338639?ContentTypeID=1</link><pubDate>Thu, 11 Nov 2021 16:09:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a66f3be1-a1f5-40aa-8dae-34fea5ca94db</guid><dc:creator>ICM_UC</dc:creator><description>&lt;p&gt;Hi Charlie,&lt;/p&gt;
&lt;p&gt;I searched the code to see how the objects are created and replicated that for this object&lt;pre class="ui-code" data-mode="text"&gt;/* LWM2M object variables */
static struct lwm2m_engine_obj remote_sim_provisioning;

static struct lwm2m_engine_obj_field remote_sim_provisioning_fields[] = {
	OBJ_FIELD_DATA(LWM2M_REMOTE_SIM_PROVISIONING_ICCID_ID, R, STRING),
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;After this, inicialized the object&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static int 
UC_LWM2M_Remote_SIM_Provisioning_Init(const struct device *dev)
{
	/* Declare unused arguments */
	ARG_UNUSED(dev);
	
	/* Create and register LwM2M object type */
	remote_sim_provisioning.obj_id = LWM2M_REMOTE_SIM_PROVISIONING_ID;
	remote_sim_provisioning.version_major = LWM2M_PROTOCOL_VERSION_MAJOR;
	remote_sim_provisioning.version_minor = LWM2M_PROTOCOL_VERSION_MINOR;
	remote_sim_provisioning.is_core = true;
	remote_sim_provisioning.fields = remote_sim_provisioning_fields;
	remote_sim_provisioning.field_count = ARRAY_SIZE(remote_sim_provisioning_fields);
	remote_sim_provisioning.max_instance_count = LWM2M_REMOTE_SIM_PROVISIONING_INSTANCE_COUNT;
	remote_sim_provisioning.create_cb = UC_LWM2M_Remote_SIM_Provisioning_Create;
	lwm2m_register_obj(&amp;amp;remote_sim_provisioning);

	return NRF_SUCCESS;
}

/* Initialiase LWM2M object type */
SYS_INIT(UC_LWM2M_Remote_SIM_Provisioning_Init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and this function is called when an instance is created&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static struct lwm2m_engine_obj_inst*
UC_LWM2M_Remote_SIM_Provisioning_Create(uint16_t obj_inst_id)
{
	/* Initialise function variables */
	int index, i = 0, j = 0;
	
	/* Only allow the default instance ID to be created */
	if (LWM2M_REMOTE_SIM_PROVISIONING_DEFAULT_INSTANCE != obj_inst_id) {
		LOG_ERR(&amp;quot;Can not create instance %u for this object&amp;quot;, obj_inst_id);
		return NULL;
	}

	/* Check that there is no other instance with this ID */
	for (index = 0; index &amp;lt; LWM2M_REMOTE_SIM_PROVISIONING_INSTANCE_COUNT; index++) {
		if (inst[index].obj &amp;amp;&amp;amp; inst[index].obj_inst_id == obj_inst_id) {
			LOG_ERR(&amp;quot;Can not create instance - already existing: %u&amp;quot;, obj_inst_id);
			return NULL;
		}
	}
	
	
	/* Check if the maximum number of instances hasn&amp;#39;t been reached */
	if (index &amp;gt;= LWM2M_REMOTE_SIM_PROVISIONING_INSTANCE_COUNT) {
		LOG_ERR(&amp;quot;Can not create instance - no more room: %u&amp;quot;, obj_inst_id);
		return NULL;
	}

	/* Set default resource values */
	memset(iccid[index], 0, ICCID_STRING_LENGTH);
	
	/* Zero-initialiase instance resource object */
	(void)memset(res[index], 0, sizeof(res[index][0]) * ARRAY_SIZE(res[index]));
	init_res_instance(res_inst[index], ARRAY_SIZE(res_inst[index]));

	/* Initialise resource instance data */
	INIT_OBJ_RES_MULTI_DATA(LWM2M_REMOTE_SIM_PROVISIONING_ICCID_ID, res[index], i, res_inst[index], j,
                LWM2M_REMOTE_SIM_PROVISIONING_ICCID_INSTANCE_COUNT, true,
		        &amp;amp;iccid[index], ICCID_STRING_LENGTH);

                
	inst[index].resources = res[index];
	inst[index].resource_count = i;
	
	LOG_DBG(&amp;quot;Created LwM2M Remote SIM Provisioning instance: %d&amp;quot;, obj_inst_id);
	
	return &amp;amp;inst[index];
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;After all this, when connected to Leshan, a function is called to inicialize the object and resorce instance&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void
UC_LWM2M_Remote_SIM_Provisioning_InitInstance(struct k_work *work) {

...

    return_code = lwm2m_engine_create_obj_inst(LWM2M_REMOTE_SIM_PROVISIONING_INSTANCE);	
    		
    /* Register callbacks only if the instance was successfully created */
    if (NRF_SUCCESS == return_code || -EEXIST == return_code || -ENOMEM == return_code) {
        for (int idx = 0; idx &amp;lt; LWM2M_REMOTE_SIM_PROVISIONING_ICCID_INSTANCE_COUNT; idx++) {
            /* Generate the resource path being read */
            sprintf((char*)remote_sim_provisioning_resource_path,
                    LWM2M_REMOTE_SIM_PROVISIONING_INSTANCE_CUSTOM_RESOURCE_TEMPLATE, LWM2M_REMOTE_SIM_PROVISIONING_ICCID_ID, idx);
            
            return_code += lwm2m_engine_create_res_inst(remote_sim_provisioning_resource_path);
            
            return_code += 
            lwm2m_engine_register_read_callback(remote_sim_provisioning_resource_path, 
                                                  UC_LWM2M_Remote_SIM_Provisioning_ReadCallback);
        }
	
		/* Trigger update so that the server is immediately notified of the new instance */
		engine_trigger_update(true);
		
		if (NRF_SUCCESS == return_code) {
			LOG_DBG(&amp;quot;Init OK: LwM2M Remote SIM Provisioning %u&amp;quot;, 
				LWM2M_REMOTE_SIM_PROVISIONING_DEFAULT_INSTANCE);
				return;
		}
	}
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;At this point when i go to Leshan server i have the problem explained on the firt post&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read / Write lwm2m resource instance</title><link>https://devzone.nordicsemi.com/thread/338633?ContentTypeID=1</link><pubDate>Thu, 11 Nov 2021 15:47:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1016b1d6-4476-4dd1-8bce-c30ea1967d46</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi ICM_UC,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, but your lwm2m client needs to add support for the object, then it can be checked on the lwm2m server.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;How did you modify the&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.1/nrf/samples/nrf9160/lwm2m_client/README.html"&gt;nRF9160: LwM2M Client&lt;/a&gt;&amp;nbsp;to add this object?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Charlie&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read / Write lwm2m resource instance</title><link>https://devzone.nordicsemi.com/thread/338343?ContentTypeID=1</link><pubDate>Wed, 10 Nov 2021 10:20:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1dbe17db-a77e-43d9-b21c-b3504cc82214</guid><dc:creator>ICM_UC</dc:creator><description>&lt;p&gt;Hi Charlie,&lt;/p&gt;
&lt;p&gt;Thank for your concern but this object is public as you can confirm on the link below.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://technical.openmobilealliance.org/OMNA/LwM2M/LwM2MRegistry.html"&gt;Open Mobile Alliance - LwM2M Registry&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Lets keep this public to help others in the same situation&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read / Write lwm2m resource instance</title><link>https://devzone.nordicsemi.com/thread/338334?ContentTypeID=1</link><pubDate>Wed, 10 Nov 2021 09:59:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:258aa384-2561-4946-93cf-77229e370ec2</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi ICM_UC,&lt;/p&gt;
&lt;p&gt;There is no&amp;nbsp;&lt;span&gt;‘Remote SIM Provisioning’ object 504 in the current &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.1/nrf/samples/nrf9160/lwm2m_client/README.html"&gt;nRF9160: LwM2M Client&lt;/a&gt;&amp;nbsp;sample, have you added your own implementation on it? I can set this ticket to private if you only want to share it only with us.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Charlie&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>