<?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>LwM2M Client does not respect observer attributes</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114073/lwm2m-client-does-not-respect-observer-attributes</link><description>Hi everyone 
 
 We have had the experience on two different LwM2M servers that the Observer attributes are not being respected by the LwM2M client. Reading the Observer attributes we can also see that they are set, but just not respected 
 pmin: 
 - Minimum</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 03 Sep 2024 07:43:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114073/lwm2m-client-does-not-respect-observer-attributes" /><item><title>RE: LwM2M Client does not respect observer attributes</title><link>https://devzone.nordicsemi.com/thread/500885?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2024 07:43:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5c1dc09-07a9-4fab-baf5-16ba5949a927</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;HI Alan,&lt;/p&gt;
&lt;p&gt;You may have a try with Anjay LwM2M client&amp;nbsp;&lt;a href="https://github.com/AVSystem/Anjay-zephyr-client"&gt;AVSystem/Anjay-zephyr-client: Anjay Zephyr LwM2M client. (github.com)&lt;/a&gt;&amp;nbsp;from AVSYSTEM which have this feature support on the LwM2M server platform.&amp;nbsp;&lt;/p&gt;
[quote user="AlanIoT"]Any Idea why your test with the button seemed to work, if it&amp;#39;s not supported by the application?[/quote]
&lt;p&gt;The platform just ignore the st setting, it will update in pmin interval as long as there is a change in value.&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: LwM2M Client does not respect observer attributes</title><link>https://devzone.nordicsemi.com/thread/500648?ContentTypeID=1</link><pubDate>Sat, 31 Aug 2024 07:58:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a93e32d2-c36c-4454-ae78-2e86e0d38076</guid><dc:creator>AlanIoT</dc:creator><description>&lt;p&gt;Hello Charlie,&lt;/p&gt;
&lt;p&gt;Thanks for investigating.&lt;/p&gt;
&lt;p&gt;Oh, that&amp;#39;s a little disappointing. I guess we can quite easily program that logic into the firmware when reading sensors and writing the value to the lwm2m path (read from sensor and lwm2m resource -&amp;gt; perform checks -&amp;gt; write to path if new value passes checks), but that&amp;#39;s a lot less flexible of course.&lt;/p&gt;
&lt;p&gt;Any Idea why your test with the button seemed to work, if it&amp;#39;s not supported by the application?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Alan&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M Client does not respect observer attributes</title><link>https://devzone.nordicsemi.com/thread/500554?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2024 10:37:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cac38df4-318d-42b8-933c-b1dbab6754ac</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi Alan,&lt;/p&gt;
&lt;p&gt;After checking with Zephyr it figures out those mentioned attributes (lt, gt, st) are not implemented in Zephyr&amp;#39;s LwM2M stack.&lt;/p&gt;
&lt;p&gt;Implementing support for those would increase memory usage of the client so it has not been prioritized at all.&lt;/p&gt;
&lt;p&gt;In &lt;a title="https://www.openmobilealliance.org/release/lightweightm2m/v1_1_1-20190617-a/html-version/oma-ts-lightweightm2m_core-v1_1_1-20190617-a.html#table-512-2-lessnotificationgreater-class-attributes" href="https://www.openmobilealliance.org/release/LightweightM2M/V1_1_1-20190617-A/HTML-Version/OMA-TS-LightweightM2M_Core-V1_1_1-20190617-A.html#Table-512-2-lessNOTIFICATIONgreater-class-Attributes" rel="noopener noreferrer" target="_blank"&gt;LwM2M spec&lt;/a&gt;, this is a SHOULD for the client, so it is not mandatory.&amp;nbsp;You may raise a quest in this page &lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues"&gt;Issues · zephyrproject-rtos/zephyr (github.com)&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I really hope these attributes could be optional to choose in the future.&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: LwM2M Client does not respect observer attributes</title><link>https://devzone.nordicsemi.com/thread/500237?ContentTypeID=1</link><pubDate>Wed, 28 Aug 2024 14:09:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45407bfb-6b9b-4aaa-be61-e49584105a50</guid><dc:creator>AlanIoT</dc:creator><description>&lt;p&gt;Hi Charlie,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for trying again and I&amp;#39;m glad you could reproduce it.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m curious to know what you find out.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hope to hear from you soon and best regards,&lt;/p&gt;
&lt;p&gt;Alan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M Client does not respect observer attributes</title><link>https://devzone.nordicsemi.com/thread/500226?ContentTypeID=1</link><pubDate>Wed, 28 Aug 2024 13:19:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7438e6c-2903-4fbe-a31e-0674e65e1c54</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi Alan,&lt;/p&gt;
&lt;p&gt;I can repeat this on my side and did not figure out any explanation yet.&lt;/p&gt;
&lt;p&gt;I will continue to work on it and feedback to you later.&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: LwM2M Client does not respect observer attributes</title><link>https://devzone.nordicsemi.com/thread/499980?ContentTypeID=1</link><pubDate>Tue, 27 Aug 2024 12:30:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcc43496-78b6-45ee-a5fb-5b23df8ab44b</guid><dc:creator>AlanIoT</dc:creator><description>&lt;p&gt;I just replicated this on ncs v2.7.0 with the same behaviour:&lt;/p&gt;
&lt;p&gt;I had to modify the sensor module a little to get the application to build:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/*
 * Copyright (c) 2021 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
 */
 
#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/drivers/sensor.h&amp;gt;
#include &amp;lt;zephyr/net/lwm2m.h&amp;gt;
#include &amp;lt;lwm2m_resource_ids.h&amp;gt;
#include &amp;lt;math.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;adp536x.h&amp;gt;
#include &amp;quot;lwm2m_app_utils.h&amp;quot;
#include &amp;quot;lwm2m_engine.h&amp;quot;
#include &amp;quot;accelerometer.h&amp;quot;
#include &amp;quot;env_sensor.h&amp;quot;
#include &amp;quot;light_sensor.h&amp;quot;
 
#include &amp;lt;zephyr/logging/log.h&amp;gt;
LOG_MODULE_REGISTER(app_sensors, CONFIG_APP_LOG_LEVEL);
 
#define LIGHT_OBJ_INSTANCE_ID 0
#define COLOUR_OBJ_INSTANCE_ID 1
 
static struct k_work_delayable accel_work;
static struct k_work_delayable temp_work;
static struct k_work_delayable press_work;
static struct k_work_delayable humid_work;
static struct k_work_delayable gas_res_work;
static struct k_work_delayable light_work;
static struct k_work_delayable colour_work;
static struct k_work_delayable pmic_work;
 
#define PERIOD K_SECONDS(10)
#define RETRY K_MSEC(200)
 
static void accel_work_cb(struct k_work *work)
{
    double x;
    double y;
    double z;
    struct accelerometer_sensor_data data;
 
    accelerometer_read(&amp;amp;data);
    x = sensor_value_to_double(&amp;amp;data.x);
    y = sensor_value_to_double(&amp;amp;data.y);
    z = sensor_value_to_double(&amp;amp;data.z);
 
    lwm2m_set_f64(&amp;amp;LWM2M_OBJ(IPSO_OBJECT_ACCELEROMETER_ID, 0, X_VALUE_RID), x);
    lwm2m_set_f64(&amp;amp;LWM2M_OBJ(IPSO_OBJECT_ACCELEROMETER_ID, 0, Y_VALUE_RID), y);
    lwm2m_set_f64(&amp;amp;LWM2M_OBJ(IPSO_OBJECT_ACCELEROMETER_ID, 0, Z_VALUE_RID), z);
 
    k_work_schedule(&amp;amp;accel_work, PERIOD);
}
 
static void sensor_worker(int (*read_cb)(struct sensor_value *), const struct lwm2m_obj_path *path)
{
    double val;
    struct sensor_value data;
    int rc;
 
    rc = read_cb(&amp;amp;data);
    if (rc) {
        LOG_ERR(&amp;quot;Failed to read sensor data&amp;quot;);
        return;
    }
    val = sensor_value_to_double(&amp;amp;data);
 
    lwm2m_set_f64(path, val);
}
 
static void temp_work_cb(struct k_work *work)
{
    sensor_worker(env_sensor_read_temperature,
              &amp;amp;LWM2M_OBJ(IPSO_OBJECT_TEMP_SENSOR_ID, 0, SENSOR_VALUE_RID));
 
    k_work_schedule(&amp;amp;temp_work, PERIOD);
}
 
static void press_work_cb(struct k_work *work)
{
    sensor_worker(env_sensor_read_pressure,
              &amp;amp;LWM2M_OBJ(IPSO_OBJECT_PRESSURE_ID, 0, SENSOR_VALUE_RID));
 
    k_work_schedule(&amp;amp;press_work, PERIOD);
}
 
static void humid_work_cb(struct k_work *work)
{
    sensor_worker(env_sensor_read_humidity,
              &amp;amp;LWM2M_OBJ(IPSO_OBJECT_HUMIDITY_SENSOR_ID, 0, SENSOR_VALUE_RID));
 
    k_work_schedule(&amp;amp;humid_work, PERIOD);
}
 
static void gas_res_work_cb(struct k_work *work)
{
    sensor_worker(env_sensor_read_gas_resistance,
              &amp;amp;LWM2M_OBJ(IPSO_OBJECT_GENERIC_SENSOR_ID, 0, SENSOR_VALUE_RID));
 
    k_work_schedule(&amp;amp;gas_res_work, PERIOD);
}
 
static int light_sensor_worker(int (*read_cb)(uint32_t *), const struct lwm2m_obj_path *path)
{
    uint32_t val;
    int ret;
    char temp[RGBIR_STR_LENGTH];
 
    /* Read sensor, try again later if busy */
    if (read_cb(&amp;amp;val) == -EBUSY) {
        return -1;
    }
 
    ret = snprintk(temp, RGBIR_STR_LENGTH, &amp;quot;0x%08X&amp;quot;, val);
    if (ret &amp;lt;= 0) {
        return -ENOMEM;
    }
    ret = lwm2m_set_string(path, temp);
    if (ret) {
        return ret;
    }
 
    return 0;
}
 
static void light_work_cb(struct k_work *work)
{
    int rc = light_sensor_worker(light_sensor_read,
                     &amp;amp;LWM2M_OBJ(IPSO_OBJECT_COLOUR_ID, LIGHT_OBJ_INSTANCE_ID,
                        COLOUR_RID));
 
    if (rc) {
        k_work_schedule(&amp;amp;light_work, RETRY);
        return;
    }
 
    k_work_schedule(&amp;amp;light_work, PERIOD);
}
 
static void colour_work_cb(struct k_work *work)
{
    int rc = light_sensor_worker(colour_sensor_read,
                     &amp;amp;LWM2M_OBJ(IPSO_OBJECT_COLOUR_ID, COLOUR_OBJ_INSTANCE_ID,
                        COLOUR_RID));
 
    if (rc) {
        k_work_schedule(&amp;amp;light_work, RETRY);
        return;
    }
 
    k_work_schedule(&amp;amp;colour_work, PERIOD);
}
 
static void pmic_work_cb(struct k_work *work)
{
 
    uint8_t rand_0_to_255 = rand();
    uint8_t sim_percentage;
 
    sim_percentage = floor(rand_0_to_255/2.55);
 
    printk(&amp;quot;\ngenerated simulated battery percentage: %i percent\n&amp;quot;, sim_percentage);
 
    lwm2m_set_u8(&amp;amp;LWM2M_OBJ(3, 0, 9), sim_percentage);
 
    k_work_schedule(&amp;amp;pmic_work, PERIOD);
}
 
static int sensor_module_init(void)
{
    if (IS_ENABLED(CONFIG_SENSOR_MODULE_ACCEL)) {
        k_work_init_delayable(&amp;amp;accel_work, accel_work_cb);
        k_work_schedule(&amp;amp;accel_work, K_NO_WAIT);
    }
 
    if (IS_ENABLED(CONFIG_SENSOR_MODULE_TEMP)) {
        k_work_init_delayable(&amp;amp;temp_work, temp_work_cb);
        k_work_schedule(&amp;amp;temp_work, K_NO_WAIT);
    }
 
    if (IS_ENABLED(CONFIG_SENSOR_MODULE_PRESS)) {
        k_work_init_delayable(&amp;amp;press_work, press_work_cb);
        k_work_schedule(&amp;amp;press_work, K_NO_WAIT);
    }
 
    if (IS_ENABLED(CONFIG_SENSOR_MODULE_HUMID)) {
        k_work_init_delayable(&amp;amp;humid_work, humid_work_cb);
        k_work_schedule(&amp;amp;humid_work, K_NO_WAIT);
    }
 
    if (IS_ENABLED(CONFIG_SENSOR_MODULE_GAS_RES)) {
        k_work_init_delayable(&amp;amp;gas_res_work, gas_res_work_cb);
        k_work_schedule(&amp;amp;gas_res_work, K_NO_WAIT);
    }
 
    if (IS_ENABLED(CONFIG_SENSOR_MODULE_LIGHT)) {
        k_work_init_delayable(&amp;amp;light_work, light_work_cb);
        k_work_schedule(&amp;amp;light_work, K_NO_WAIT);
    }
 
    if (IS_ENABLED(CONFIG_SENSOR_MODULE_COLOUR)) {
        k_work_init_delayable(&amp;amp;colour_work, colour_work_cb);
        k_work_schedule(&amp;amp;colour_work, K_NO_WAIT);
    }
 
    k_work_init_delayable(&amp;amp;pmic_work, pmic_work_cb);
    k_work_schedule(&amp;amp;pmic_work, K_NO_WAIT);
 
    return 0;
}
 
LWM2M_APP_INIT(sensor_module_init);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Everything else was identical to what I described 2 comments higher; same issue:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1724761769298v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;What am I doing differently?&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Alan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M Client does not respect observer attributes</title><link>https://devzone.nordicsemi.com/thread/499921?ContentTypeID=1</link><pubDate>Tue, 27 Aug 2024 08:46:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea310acd-1945-439d-885c-4df430bcc917</guid><dc:creator>AlanIoT</dc:creator><description>&lt;p&gt;Here you see the same information as in the Logs in the message above:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;With a Step of 50&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1724748285061v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;It sends every 10 seconds, even if the step is &amp;lt; 50&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1724748258514v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M Client does not respect observer attributes</title><link>https://devzone.nordicsemi.com/thread/499919?ContentTypeID=1</link><pubDate>Tue, 27 Aug 2024 08:40:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:940fc33f-afcf-496c-9673-da99859c4318</guid><dc:creator>AlanIoT</dc:creator><description>&lt;p&gt;Hi Charlie&lt;/p&gt;
&lt;p&gt;Ah, now I see where the confusion about the toolchain came from. I misstyped v2.6.0 before, sorry!&lt;/p&gt;
&lt;p&gt;I didn&amp;#39;t use the button, but instead manipulated the application so that it&amp;#39;s closer to our product case.&lt;/p&gt;
&lt;p&gt;But I just managed to reproduce the issue using the base NCS 2.6.0 LwM2M client sample.&lt;/p&gt;
&lt;p&gt;My steps were:&lt;/p&gt;
&lt;p&gt;1. Start with the NCS 2.6.0 LwM2M client sample&lt;/p&gt;
&lt;p&gt;2. Add the 3 lwm2m 1.1 overlays (core-interop, object-interop &amp;amp; 1.1.conf)&lt;/p&gt;
&lt;p&gt;3. Add debugging and other essential Configs:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_APP_LWM2M_PSK=&amp;quot;000102030405060708090a0b0c0d0e0e&amp;quot;

CONFIG_LWM2M_CLIENT_UTILS_SERVER=&amp;quot;coaps://eu.iot.avsystem.cloud&amp;quot;

CONFIG_LWM2M_PEER_PORT=5684

CONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP=n

CONFIG_APP_ENDPOINT_PREFIX=&amp;quot;ugn:imei:&amp;quot;

CONFIG_LWM2M_DTLS_SUPPORT=y

  


CONFIG_LWM2M_DTLS_CID=y

CONFIG_LWM2M_CLIENT_UTILS_DTLS_CON_MANAGEMENT=n

CONFIG_LTE_LC_MODEM_SLEEP_NOTIFICATIONS=y

CONFIG_LWM2M_RD_CLIENT_LISTEN_AT_IDLE=n


CONFIG_LWM2M_UPDATE_PERIOD=90

CONFIG_LWM2M_ENGINE_DEFAULT_LIFETIME=43260

CONFIG_LWM2M_SECONDS_TO_UPDATE_EARLY=60

  

CONFIG_LWM2M_LOG_LEVEL_DBG=y

  

CONFIG_THREAD_MONITOR=n

CONFIG_USE_SEGGER_RTT=y

CONFIG_STDOUT_CONSOLE=y

CONFIG_SERIAL=y

CONFIG_LOG=y

CONFIG_THREAD_NAME=n

CONFIG_NRF_MODEM_LIB_TRACE=n

CONFIG_SENSOR_MODULE=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;(4.) We add a devicetree overlay to make the application work on our hardware; should not influence the application:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;pinctrl {
	uart0_default: uart0_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(UART_TX, 0, 22)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RTS, 0, 24)&amp;gt;;
		};
		group2 {
			psels = &amp;lt;NRF_PSEL(UART_RX, 0, 23)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_CTS, 0, 25)&amp;gt;;
			bias-pull-up;
		};
	};

	uart0_sleep: uart0_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(UART_TX, 0, 22)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RX, 0, 23)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RTS, 0, 24)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_CTS, 0, 25)&amp;gt;;
			low-power-enable;
		};
	};
};

&amp;amp;i2c2 {
	sht40_platine: sht4x@45 {
		compatible = &amp;quot;sensirion,sht4x&amp;quot;;
		reg = &amp;lt;0x45&amp;gt;;
		repeatability = &amp;lt; 2 &amp;gt;;
	};
};

&amp;amp;uart0 {
	status = &amp;quot;okay&amp;quot;;
	current-speed = &amp;lt;115200&amp;gt;;
	pinctrl-0 = &amp;lt;&amp;amp;uart0_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;uart0_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};

&amp;amp;spi3 {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;adxl362 {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;adxl372 {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;sense_blue_led {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;sense_red_led {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;sense_green_led {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;nrf52840_reset {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;bh1749 {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;bme680 {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;pwm0 {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;pwm1 {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;pwm2 {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;gpiote {
	status = &amp;quot;okay&amp;quot;;
};


&amp;amp;gpio0 {
	sense-edge-mask = &amp;lt; (1ULL &amp;lt;&amp;lt; 26) &amp;gt;;
};

&amp;amp;i2c2 {
    ads1015: ads1015@48 {
        compatible = &amp;quot;ti,ads1015&amp;quot;;
        #io-channel-cells = &amp;lt;1&amp;gt;;
        reg = &amp;lt; 0x48 &amp;gt;;
    };

	sht40_rechen: sht4x@44 {
		compatible = &amp;quot;sensirion,sht4x&amp;quot;;
		reg = &amp;lt;0x44&amp;gt;;
		repeatability = &amp;lt; 2 &amp;gt;;
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;5. Modify sensor module to write a simulated battery percentage to the resource /3/0/9 every 10 seconds:&lt;/p&gt;
&lt;p&gt;Change&lt;/p&gt;
&lt;p&gt;#define PERIOD K_MINUTES(2)&lt;/p&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;p&gt;#define PERIOD K_SECONDS(10)&lt;/p&gt;
&lt;p&gt;And modify pmic_work_cb to the following:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void pmic_work_cb(struct k_work *work)
{
	int rc;
	uint8_t percentage;
	uint16_t millivolts;
	uint8_t status;


	rc = adp536x_fg_soc(&amp;amp;percentage);
	if (rc) {
		k_work_schedule(&amp;amp;pmic_work, RETRY);
		return;
	}

	rc = adp536x_fg_volts(&amp;amp;millivolts);
	if (rc) {
		k_work_schedule(&amp;amp;pmic_work, RETRY);
		return;
	}

	rc = adp536x_charger_status_1_read(&amp;amp;status);
	if (rc) {
		k_work_schedule(&amp;amp;pmic_work, RETRY);
		return;
	}

	uint8_t rand_0_to_255 = rand();
	uint8_t sim_percentage;

	sim_percentage = floor(rand_0_to_255/2.55);

	printk(&amp;quot;\ngenerated simulated battery percentage: %i percent\n&amp;quot;, sim_percentage);

	lwm2m_set_u8(&amp;amp;LWM2M_OBJ(3, 0, 9), sim_percentage);

	lwm2m_set_s32(&amp;amp;LWM2M_OBJ(3, 0, 7, 0), (int) millivolts);

	k_work_schedule(&amp;amp;pmic_work, PERIOD);
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;6. Flash application to device&lt;/p&gt;
&lt;p&gt;7. Register to Coiote server and set observer with attributes&lt;/p&gt;
&lt;p&gt;8. Observe the logs and see that the device ignores the step attribute:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:00:10.575,225] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: sm_send_registration: registration sent [35.204.45.127]
[00:00:10.576,660] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 8
[00:00:10.716,094] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: do_registration_reply_cb: Registration callback (code:2.1)
[00:00:10.716,827] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x2001f1d0, buflen:4
[00:00:10.717,468] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: Registration complete
[00:00:10.717,590] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Registration Done (EP=&amp;#39;ugn:imei:350457793178730&amp;#39;)
[00:00:10.717,742] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_udp_receive: reply 0x2000d1e8 handled and removed
[00:00:10.717,834] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 9
[00:00:10.718,475] &amp;lt;inf&amp;gt; app_lwm2m_client: LwM2M is connected to server
[00:00:10.718,475] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x20021438, buflen:4
[00:00:10.723,632] &amp;lt;inf&amp;gt; app_lwm2m_client: Obtained date-time from modem
[00:00:10.723,663] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/13, buf:0x2001fadc, len:4
[00:00:10.733,123] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_engine_default_content_format: No accept option given. Assume SenML CBOR.
[00:00:10.870,483] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_engine_default_content_format: No accept option given. Assume SenML CBOR.
[00:00:10.870,605] &amp;lt;dbg&amp;gt; net_lwm2m_observation: lwm2m_write_attr_handler: Add pmin to 10
[00:00:10.870,635] &amp;lt;dbg&amp;gt; net_lwm2m_observation: lwm2m_write_attr_handler: Add pmax to 75
[00:00:10.870,697] &amp;lt;dbg&amp;gt; net_lwm2m_observation: lwm2m_write_attr_handler: Add st to 50.000000
[00:00:10.943,450] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_engine_default_content_format: No accept option given. Assume SenML CBOR.
[00:00:10.943,542] &amp;lt;dbg&amp;gt; net_lwm2m_observation: engine_observe_node_init: OBSERVER ADDED 3/0/9/0(3)
[00:00:10.943,603] &amp;lt;dbg&amp;gt; net_lwm2m_observation: engine_observe_node_init: token:&amp;#39;fb00f55f1ca13060&amp;#39; addr:35.204.45.127
[00:00:13.741,912] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_engine_default_content_format: No accept option given. Assume SenML CBOR.
[00:00:13.847,900] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_engine_default_content_format: No accept option given. Assume SenML CBOR.
[00:00:14.030,944] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_engine_default_content_format: No accept option given. Assume SenML CBOR.

generated simulated battery percentage: 81 percent
[00:00:14.146,759] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/9, buf:0x20025c07, len:1
[00:00:14.146,820] &amp;lt;dbg&amp;gt; net_lwm2m_observation: lwm2m_notify_observer_path: NOTIFY EVENT 3/0/9
[00:00:14.146,911] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/7, buf:0x20025c04, len:4
[00:00:14.176,940] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_engine_default_content_format: No accept option given. Assume SenML CBOR.
[00:00:14.303,955] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_engine_default_content_format: No accept option given. Assume SenML CBOR.
[00:00:20.943,847] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: generate_notify_message: [MANUAL] NOTIFY MSG START: 3/0/9(3) token:&amp;#39;fb00f55f1ca13060&amp;#39; [35.204.45.127] 20943
[00:00:20.944,946] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: generate_notify_message: NOTIFY MSG: SENT
[00:00:21.099,212] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: notify_message_reply_cb: NOTIFY ACK type:2 code:0.0 reply_token:&amp;#39;fb00f55f1ca13060&amp;#39;
[00:00:21.099,365] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_udp_receive: reply 0x2000d1e8 handled and removed

generated simulated battery percentage: 27 percent
[00:00:24.148,468] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/9, buf:0x20025c07, len:1
[00:00:24.148,559] &amp;lt;dbg&amp;gt; net_lwm2m_observation: lwm2m_notify_observer_path: NOTIFY EVENT 3/0/9
[00:00:24.148,651] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/7, buf:0x20025c04, len:4
[00:00:30.944,122] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: generate_notify_message: [MANUAL] NOTIFY MSG START: 3/0/9(3) token:&amp;#39;fb00f55f1ca13060&amp;#39; [35.204.45.127] 30944
[00:00:30.945,220] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: generate_notify_message: NOTIFY MSG: SENT
[00:00:31.105,529] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: notify_message_reply_cb: NOTIFY ACK type:2 code:0.0 reply_token:&amp;#39;fb00f55f1ca13060&amp;#39;
[00:00:31.105,712] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_udp_receive: reply 0x2000d1e8 handled and removed

generated simulated battery percentage: 16 percent
[00:00:34.150,177] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/9, buf:0x20025c07, len:1
[00:00:34.150,268] &amp;lt;dbg&amp;gt; net_lwm2m_observation: lwm2m_notify_observer_path: NOTIFY EVENT 3/0/9
[00:00:34.150,360] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/7, buf:0x20025c04, len:4
[00:00:40.576,751] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 9
[00:00:40.944,366] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: generate_notify_message: [MANUAL] NOTIFY MSG START: 3/0/9(3) token:&amp;#39;fb00f55f1ca13060&amp;#39; [35.204.45.127] 40944
[00:00:40.945,434] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: generate_notify_message: NOTIFY MSG: SENT
[00:00:41.089,904] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: notify_message_reply_cb: NOTIFY ACK type:2 code:0.0 reply_token:&amp;#39;fb00f55f1ca13060&amp;#39;
[00:00:41.090,057] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_udp_receive: reply 0x2000d1e8 handled and removed

generated simulated battery percentage: 1 percent
[00:00:44.151,885] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/9, buf:0x20025c07, len:1
[00:00:44.151,977] &amp;lt;dbg&amp;gt; net_lwm2m_observation: lwm2m_notify_observer_path: NOTIFY EVENT 3/0/9
[00:00:44.152,069] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/7, buf:0x20025c04, len:4
[00:00:50.944,549] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: generate_notify_message: [MANUAL] NOTIFY MSG START: 3/0/9(3) token:&amp;#39;fb00f55f1ca13060&amp;#39; [35.204.45.127] 50944
[00:00:50.945,648] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: generate_notify_message: NOTIFY MSG: SENT
[00:00:51.009,246] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: notify_message_reply_cb: NOTIFY ACK type:2 code:0.0 reply_token:&amp;#39;fb00f55f1ca13060&amp;#39;
[00:00:51.009,399] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_udp_receive: reply 0x2000d1e8 handled and removed

generated simulated battery percentage: 70 percent
[00:00:54.153,594] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/9, buf:0x20025c07, len:1
[00:00:54.153,686] &amp;lt;dbg&amp;gt; net_lwm2m_observation: lwm2m_notify_observer_path: NOTIFY EVENT 3/0/9
[00:00:54.153,778] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/7, buf:0x20025c04, len:4
[00:01:00.945,251] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: generate_notify_message: [MANUAL] NOTIFY MSG START: 3/0/9(3) token:&amp;#39;fb00f55f1ca13060&amp;#39; [35.204.45.127] 60945
[00:01:00.946,350] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: generate_notify_message: NOTIFY MSG: SENT
[00:01:00.955,566] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 9
[00:01:01.096,588] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: notify_message_reply_cb: NOTIFY ACK type:2 code:0.0 reply_token:&amp;#39;fb00f55f1ca13060&amp;#39;
[00:01:01.096,771] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_udp_receive: reply 0x2000d1e8 handled and removed

generated simulated battery percentage: 47 percent
[00:01:04.155,303] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/9, buf:0x20025c07, len:1
[00:01:04.155,395] &amp;lt;dbg&amp;gt; net_lwm2m_observation: lwm2m_notify_observer_path: NOTIFY EVENT 3/0/9
[00:01:04.155,487] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/7, buf:0x20025c04, len:4
[00:01:10.945,953] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: generate_notify_message: [MANUAL] NOTIFY MSG START: 3/0/9(3) token:&amp;#39;fb00f55f1ca13060&amp;#39; [35.204.45.127] 70945
[00:01:10.947,052] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: generate_notify_message: NOTIFY MSG: SENT
[00:01:11.173,767] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: notify_message_reply_cb: NOTIFY ACK type:2 code:0.0 reply_token:&amp;#39;fb00f55f1ca13060&amp;#39;
[00:01:11.173,950] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_udp_receive: reply 0x2000d1e8 handled and removed

generated simulated battery percentage: 84 percent
[00:01:14.157,012] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/9, buf:0x20025c07, len:1
[00:01:14.157,104] &amp;lt;dbg&amp;gt; net_lwm2m_observation: lwm2m_notify_observer_path: NOTIFY EVENT 3/0/9
[00:01:14.157,196] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/7, buf:0x20025c04, len:4
[00:01:16.191,894] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/2, buf:0x20025c16, len:2
[00:01:20.945,678] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: generate_notify_message: [MANUAL] NOTIFY MSG START: 3/0/9(3) token:&amp;#39;fb00f55f1ca13060&amp;#39; [35.204.45.127] 80945
[00:01:20.946,777] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: generate_notify_message: NOTIFY MSG: SENT
[00:01:21.102,264] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: notify_message_reply_cb: NOTIFY ACK type:2 code:0.0 reply_token:&amp;#39;fb00f55f1ca13060&amp;#39;
[00:01:21.102,447] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_udp_receive: reply 0x2000d1e8 handled and removed&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Same with gt and lt.&lt;/p&gt;
&lt;p&gt;Do you see any issues with the configuration or is it something else?&lt;/p&gt;
&lt;p&gt;Thanks for looking at this problem.&lt;/p&gt;
&lt;p&gt;Since it worked for you, I will try to reproduce the same with NCS 2.7.0 now.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Alan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M Client does not respect observer attributes</title><link>https://devzone.nordicsemi.com/thread/499886?ContentTypeID=1</link><pubDate>Tue, 27 Aug 2024 06:24:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f032ef9-c9f9-4ef2-9007-1913287810f6</guid><dc:creator>AlanIoT</dc:creator><description>&lt;p&gt;Hi Charlie,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for taking the time to try to reproduce the bug. We started working with NCS 2.4.2, then ported the application to NCS 2.6.0, which we are currently working with. Do you recommend updating to NCS 2.7.0?&lt;/p&gt;
&lt;p&gt;We are now troubleshooting with different servers with the base LwM2M Client sample and our custom application and will keep you updated on our findings.&lt;/p&gt;
&lt;p&gt;General question: Which steps are necessary for adding a new, fully functional LwM2M object?&lt;/p&gt;
&lt;p&gt;Is it more than just creating the object? example for device object&lt;/p&gt;
&lt;p&gt;Path: C:\ncs\v2.6.0\zephyr\subsys\net\lib\lwm2m\lwm2m_obj_device.c:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static struct lwm2m_engine_obj_inst *device_create(uint16_t obj_inst_id)
{
                int i = 0, j = 0;

                init_res_instance(res_inst, ARRAY_SIZE(res_inst));

                /* initialize instance resource data */
                INIT_OBJ_RES_OPTDATA(DEVICE_MANUFACTURER_ID, res, i, res_inst, j);
                INIT_OBJ_RES_OPTDATA(DEVICE_MODEL_NUMBER_ID, res, i, res_inst, j);
                INIT_OBJ_RES_OPTDATA(DEVICE_SERIAL_NUMBER_ID, res, i, res_inst, j);
                INIT_OBJ_RES_OPTDATA(DEVICE_FIRMWARE_VERSION_ID, res, i, res_inst, j);
                INIT_OBJ_RES_EXECUTE(DEVICE_REBOOT_ID, res, i, NULL);
                INIT_OBJ_RES_EXECUTE(DEVICE_FACTORY_DEFAULT_ID, res, i, NULL);
                INIT_OBJ_RES_MULTI_OPTDATA(DEVICE_AVAILABLE_POWER_SOURCES_ID, res, i,
                                                                  res_inst, j, DEVICE_PWRSRC_MAX, false);
                INIT_OBJ_RES_MULTI_OPTDATA(DEVICE_POWER_SOURCE_VOLTAGE_ID, res, i,
                                                                  res_inst, j, DEVICE_PWRSRC_MAX, false);
                INIT_OBJ_RES_MULTI_OPTDATA(DEVICE_POWER_SOURCE_CURRENT_ID, res, i,
                                                                  res_inst, j, DEVICE_PWRSRC_MAX, false);
                INIT_OBJ_RES_OPTDATA(DEVICE_BATTERY_LEVEL_ID, res, i, res_inst, j);
                INIT_OBJ_RES_OPTDATA(DEVICE_MEMORY_FREE_ID, res, i, res_inst, j);
                error_code_ri = &amp;amp;res_inst[j];
                INIT_OBJ_RES_MULTI_DATA(DEVICE_ERROR_CODE_ID, res, i,
                                                               res_inst, j, DEVICE_ERROR_CODE_MAX, false,
                                                               error_code_list, sizeof(*error_code_list));
                INIT_OBJ_RES_EXECUTE(DEVICE_RESET_ERROR_CODE_ID, res, i,
                                                    reset_error_list_cb);
                INIT_OBJ_RES_OPT(DEVICE_CURRENT_TIME_ID, res, i, res_inst, j, 1, false,
                                               true, current_time_read_cb, current_time_pre_write_cb,
                                               NULL, current_time_post_write_cb, NULL);
                INIT_OBJ_RES_OPTDATA(DEVICE_UTC_OFFSET_ID, res, i, res_inst, j);
                INIT_OBJ_RES_OPTDATA(DEVICE_TIMEZONE_ID, res, i, res_inst, j);
                INIT_OBJ_RES_DATA(DEVICE_SUPPORTED_BINDING_MODES_ID, res, i,
                                                 res_inst, j, binding_mode, DEVICE_STRING_SHORT);
                INIT_OBJ_RES_OPTDATA(DEVICE_TYPE_ID, res, i, res_inst, j);
                INIT_OBJ_RES_OPTDATA(DEVICE_HARDWARE_VERSION_ID, res, i, res_inst, j);
                INIT_OBJ_RES_OPTDATA(DEVICE_SOFTWARE_VERSION_ID, res, i, res_inst, j);
                INIT_OBJ_RES_OPTDATA(DEVICE_BATTERY_STATUS_ID, res, i, res_inst, j);
                INIT_OBJ_RES_OPTDATA(DEVICE_MEMORY_TOTAL_ID, res, i, res_inst, j);
                INIT_OBJ_RES_MULTI_OPTDATA(DEVICE_EXT_DEV_INFO_ID, res, i, res_inst, j,
                                                                  DEVICE_EXT_DEV_INFO_MAX, false);

                inst.resources = res;
                inst.resource_count = i;

                LOG_DBG(&amp;quot;Create LWM2M device instance: %d&amp;quot;, obj_inst_id);
                return &amp;amp;inst;
}

static int lwm2m_device_init(void)
{
                struct lwm2m_engine_obj_inst *obj_inst = NULL;
                int ret = 0;

                /* Set default values */
                time_offset = 0U;
                lwm2m_engine_get_binding(binding_mode);

                /* initialize the device field data */
                device.obj_id = LWM2M_OBJECT_DEVICE_ID;
                device.version_major = DEVICE_VERSION_MAJOR;
                device.version_minor = DEVICE_VERSION_MINOR;
                device.is_core = true;
                device.fields = fields;
                device.field_count = ARRAY_SIZE(fields);
                device.max_instance_count = 1U;
                device.create_cb = device_create;
                lwm2m_register_obj(&amp;amp;device);

                /* auto create the only instance */
                ret = lwm2m_create_obj_inst(LWM2M_OBJECT_DEVICE_ID, 0, &amp;amp;obj_inst);
                if (ret &amp;lt; 0) {
                               LOG_DBG(&amp;quot;Create LWM2M instance 0 error: %d&amp;quot;, ret);
                }

                /* Create the default error code resource instance */
                lwm2m_device_add_err(0);

                /* call device_periodic_service() every 10 seconds */
                ret = lwm2m_engine_add_service(device_periodic_service,
                                                                      DEVICE_SERVICE_INTERVAL_MS);
                return ret;
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Because that&amp;#39;s what we did for all our objects and everything else works. We shouldn&amp;#39;t have to initialise these observer attributes in a special way, or should we?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M Client does not respect observer attributes</title><link>https://devzone.nordicsemi.com/thread/499785?ContentTypeID=1</link><pubDate>Mon, 26 Aug 2024 13:38:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0a1f0ea-cd66-43eb-899d-68bf4813f7b5</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I checked our official sample NCS 2.7.0&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.7.0/page/nrf/samples/cellular/lwm2m_client/README.html"&gt;Cellular: LwM2M Client (nordicsemi.com)&lt;/a&gt;&amp;nbsp;with Coiote LwM2M server, looks&amp;nbsp;all the observer attributes work as expected.&lt;/p&gt;
&lt;p&gt;Here is one example for Push button Digital Input Counter: pimin=10, pmax=20, st=2.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:400px;max-width:1000px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/2000x800/__key/communityserver-discussions-components-files/4/Screenshot-2024_2D00_08_2D00_26-at-15.29.22.png" /&gt;&lt;/p&gt;
&lt;p&gt;Observe the change in a widget:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:400px;max-width:1000px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/2000x800/__key/communityserver-discussions-components-files/4/Screenshot-2024_2D00_08_2D00_26-at-15.32.59.png" /&gt;&lt;/p&gt;
&lt;p&gt;When I do not push the button, the update interval is 20s. When I push the button two times to increase the counter from 1 to 3, the update&amp;nbsp;triggered in 10s.&lt;/p&gt;
&lt;p&gt;Please have a try with your setup.&amp;nbsp;&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: LwM2M Client does not respect observer attributes</title><link>https://devzone.nordicsemi.com/thread/499592?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2024 13:57:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b25a9b9f-6e4e-4eaf-a6d5-7c58b949d2b5</guid><dc:creator>AlanIoT</dc:creator><description>&lt;p&gt;Hi Charlie&lt;/p&gt;
&lt;p&gt;Thanks for your answer.&lt;/p&gt;
&lt;p&gt;Have you been able to reproduce the issue?&lt;/p&gt;
&lt;p&gt;I&amp;#39;m starting to suspect that we messed up something somewhere while making our custom application. Since we only ever tested pmin and pmax, I guess somewhere the other 3 observer attributes broke, but I&amp;#39;m not sure. Is there something you have to specifically set so the attributes are set? I assumed that if pmin and pmax work, the rest should work as well.&lt;/p&gt;
&lt;p&gt;Thanks for any pointers on where to look.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Alan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M Client does not respect observer attributes</title><link>https://devzone.nordicsemi.com/thread/499234?ContentTypeID=1</link><pubDate>Wed, 21 Aug 2024 14:12:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03075fa2-59d3-442b-8e49-af991a87bde1</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Thanks for reporting this issue.&lt;/p&gt;
&lt;p&gt;Not sure which NCS version are you based on? Looks this is related to Zephyr lwm2m client library which has source codes located in ncs/zephyr/subsys/net/lib/lwm2m/lwm2m_observation.c.&lt;/p&gt;
&lt;p&gt;I will give it a try tomorrow.&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: LwM2M Client does not respect observer attributes</title><link>https://devzone.nordicsemi.com/thread/499156?ContentTypeID=1</link><pubDate>Wed, 21 Aug 2024 07:45:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a8a9460-5cf9-458f-af89-af17aee3e05d</guid><dc:creator>pipbin</dc:creator><description>&lt;p&gt;Hi all, I work with &lt;a href="https://devzone.nordicsemi.com/members/alaniot"&gt;AlanIoT&lt;/a&gt;&amp;nbsp; on this issue. Here a few additional infos:&lt;/p&gt;
&lt;p&gt;As already stated, observer atttributes can be set and read. However, the logs do not show the actual value when attributes are set or updated (except for pmin &amp;amp; pmax). Here a sample log output of a setting of attributes after device restart:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;[00:00:27.355,285] &amp;lt;dbg&amp;gt; net_lwm2m_observation: lwm2m_write_attr_handler: Add pmin to 60&lt;br /&gt;[00:00:27.355,316] &amp;lt;dbg&amp;gt; net_lwm2m_observation: lwm2m_write_attr_handler: Add pmax to 300&lt;br /&gt;[00:00:27.355,346] &amp;lt;dbg&amp;gt; net_lwm2m_observation: lwm2m_write_attr_handler: Add gt to *float*&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;in this case, &amp;#39;gt&amp;#39; was set to 700 (could also be read as 700 using the Discover-RPC call). The same behaviour is observed when an observer attribute is updated (e.g. &amp;#39;Update gt to *float*&amp;#39;)&lt;/p&gt;
&lt;p&gt;Also, this morning, I&amp;#39;ve gotten an error message for the first time; `net_lwm2m_observation: No attribute found!`, behaviour as always (pmin &amp;amp; pmax respected, rest ignored).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;[00:00:14.854,278] &amp;lt;inf&amp;gt; app_lwm2m_client: LwM2M is connecting to server&lt;br /&gt;[00:00:14.854,980] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:0/0/2/0, level 3, buf:0x2002d4c3, buflen:1&lt;br /&gt;[00:00:14.903,076] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/4, buf:0x20019c22, len:14&lt;br /&gt;[00:00:14.903,137] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/7, buf:0x20019ec2, len:12&lt;br /&gt;[00:00:14.903,198] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/3, buf:0x2001a0fa, len:18&lt;br /&gt;[00:00:14.903,228] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/8, buf:0x2003403c, len:4&lt;br /&gt;[00:00:14.903,289] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/9, buf:0x2003403e, len:2&lt;br /&gt;[00:00:14.903,350] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/10, buf:0x2003403e, len:2&lt;br /&gt;[00:00:14.903,381] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/12, buf:0x2003403e, len:2&lt;br /&gt;[00:00:15.168,975] &amp;lt;inf&amp;gt; net_lwm2m_engine: Connected, sock id 2&lt;br /&gt;[00:00:15.169,616] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x2002d4e8, buflen:4&lt;br /&gt;[00:00:15.170,410] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: sm_send_registration: registration sent [34.65.106.240]&lt;br /&gt;[00:00:15.172,515] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 8&lt;br /&gt;[00:00:15.284,057] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: do_registration_reply_cb: Registration callback (code:2.1)&lt;br /&gt;[00:00:15.284,973] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x2002d350, buflen:4&lt;br /&gt;[00:00:15.285,705] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: Registration complete&lt;br /&gt;[00:00:15.285,919] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Registration Done (EP=&amp;#39;HLiOp93gmY&amp;#39;)&lt;br /&gt;[00:00:15.286,132] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_udp_receive: reply 0x20012290 handled and removed&lt;br /&gt;[00:00:15.286,193] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 9&lt;br /&gt;[00:00:15.286,895] &amp;lt;inf&amp;gt; app_lwm2m_client: LwM2M is connected to server&lt;br /&gt;[00:00:15.286,895] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x2002f8c0, buflen:4&lt;br /&gt;[00:00:15.291,717] &amp;lt;inf&amp;gt; app_lwm2m_client: Obtained date-time from modem&lt;br /&gt;[00:00:15.291,748] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/13, buf:0x2002df5c, len:4&lt;br /&gt;&lt;span style="background-color:#ffff00;"&gt;[00:00:15.454,223] &amp;lt;dbg&amp;gt; net_lwm2m_observation: engine_observe_node_init: OBSERVER ADDED 3303/1/5700/0(3)&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color:#ffff00;"&gt;[00:00:15.454,345] &amp;lt;dbg&amp;gt; net_lwm2m_observation: engine_observe_node_init: token:&amp;#39;f3f22de35cec7f90&amp;#39; addr:34.65.106.240&lt;/span&gt;&lt;br /&gt;[00:00:15.525,604] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_engine_default_content_format: No accept option given. Assume SenML CBOR.&lt;br /&gt;&lt;span style="background-color:#ffff00;"&gt;[00:00:15.525,848] &amp;lt;dbg&amp;gt; net_lwm2m_observation: lwm2m_write_attr_handler: Add pmin to 121&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color:#ffff00;"&gt;[00:00:15.525,909] &amp;lt;dbg&amp;gt; net_lwm2m_observation: lwm2m_write_attr_handler: Add pmax to 301&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color:#ffff00;"&gt;[00:00:15.525,939] &amp;lt;dbg&amp;gt; net_lwm2m_observation: lwm2m_write_attr_handler: Add gt to *float*&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color:#ffff00;"&gt;[00:00:15.525,970] &amp;lt;dbg&amp;gt; net_lwm2m_observation: lwm2m_write_attr_handler: Add lt to *float*&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color:#ffff00;"&gt;[00:00:15.526,000] &amp;lt;dbg&amp;gt; net_lwm2m_observation: lwm2m_write_attr_handler: Add st to *float*&lt;/span&gt;&lt;br /&gt;[00:00:19.172,851] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 9&lt;br /&gt;[00:00:21.268,371] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 9&lt;br /&gt;[00:00:21.268,432] &amp;lt;inf&amp;gt; lwm2m_rai: RAI enabled&lt;br /&gt;[00:00:21.275,177] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: Queue mode RX window closed&lt;br /&gt;[00:00:39.355,468] &amp;lt;inf&amp;gt; app_lwm2m_client: Modem Enter PSM, time 89983950&lt;br /&gt;[00:00:59.200,073] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3303/1/5700, buf:0x20034058, len:8&lt;br /&gt;[00:00:59.200,103] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3303/1/5518, buf:0x20033fc8, len:8&lt;br /&gt;&lt;span style="background-color:#ffff00;"&gt;[00:00:59.200,195] &amp;lt;dbg&amp;gt; net_lwm2m_observation: lwm2m_notify_observer_path: NOTIFY EVENT 3303/1/5700&lt;/span&gt;&lt;br /&gt;[00:00:59.209,167] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3304/1/5700, buf:0x20034058, len:8&lt;br /&gt;[00:00:59.209,197] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3304/1/5518, buf:0x20033fc8, len:8&lt;br /&gt;[00:00:59.209,533] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3316/0/5700, buf:0x20034058, len:8&lt;br /&gt;[00:01:49.218,750] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3303/1/5700, buf:0x20034058, len:8&lt;br /&gt;[00:01:49.218,780] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3303/1/5518, buf:0x20033fc8, len:8&lt;br /&gt;[00:01:49.218,872] &amp;lt;dbg&amp;gt; net_lwm2m_observation: lwm2m_notify_observer_path: NOTIFY EVENT 3303/1/5700&lt;br /&gt;[00:01:49.227,874] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3304/1/5700, buf:0x20034058, len:8&lt;br /&gt;[00:01:49.227,905] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3304/1/5518, buf:0x20033fc8, len:8&lt;br /&gt;[00:01:49.228,240] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3316/0/5700, buf:0x20034058, len:8&lt;br /&gt;&lt;span style="background-color:#ffff00;"&gt;[00:02:16.454,437] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: generate_notify_message: [MANUAL] NOTIFY MSG START: 3303/1/5700(3) token:&amp;#39;f3f22de35cec7f90&amp;#39; [34.65.106.240] 136454&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color:#ffff00;"&gt;[00:02:16.456,207] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: generate_notify_message: NOTIFY MSG: SENT&lt;/span&gt;&lt;br /&gt;[00:02:16.456,390] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 9&lt;br /&gt;[00:02:16.466,430] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: Registration update started&lt;br /&gt;[00:02:16.567,047] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 11&lt;br /&gt;[00:02:16.567,077] &amp;lt;dbg&amp;gt; net_lwm2m_engine: lwm2m_engine_connection_resume: Resume suspended connection&lt;br /&gt;[00:02:16.567,626] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x2002d4f0, buflen:4&lt;br /&gt;[00:02:16.567,810] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: sm_send_registration: registration sent [34.65.106.240]&lt;br /&gt;[00:02:16.567,901] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 12&lt;br /&gt;[00:02:16.645,141] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/2, buf:0x20034096, len:2&lt;br /&gt;[00:02:18.476,165] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Update callback (code:2.4)&lt;br /&gt;[00:02:18.476,226] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: Registration update complete&lt;br /&gt;[00:02:18.476,318] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Update Done&lt;br /&gt;[00:02:18.476,531] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_udp_receive: reply 0x200122a8 handled and removed&lt;br /&gt;[00:02:18.476,593] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 9&lt;br /&gt;[00:02:18.487,304] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_engine_default_content_format: No accept option given. Assume SenML CBOR.&lt;br /&gt;&lt;span style="background-color:#ffff00;"&gt;[00:02:18.487,426] &amp;lt;dbg&amp;gt; net_lwm2m_observation: lwm2m_write_attr_handler: Add gt to *float*&lt;/span&gt;&lt;br /&gt;[00:02:18.498,382] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_engine_default_content_format: No accept option given. Assume SenML CBOR.&lt;br /&gt;[00:02:18.506,652] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_engine_default_content_format: No accept option given. Assume SenML CBOR.&lt;br /&gt;&lt;span style="background-color:#ff0000;"&gt;[00:02:18.506,683] &amp;lt;err&amp;gt; net_lwm2m_observation: No attribute found!&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color:#ffff00;"&gt;[00:02:18.564,758] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: notify_message_reply_cb: NOTIFY ACK type:2 code:0.0 reply_token:&amp;#39;f3f22de35cec7f90&amp;#39;&lt;/span&gt;&lt;br /&gt;[00:02:18.564,971] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_udp_receive: reply 0x20012290 handled and removed&lt;br /&gt;[00:02:20.575,500] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 9&lt;br /&gt;[00:02:22.507,995] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 9&lt;br /&gt;[00:02:22.514,770] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: Queue mode RX window closed&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks in advance for any help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>