From 3e5b878102317ae4ab36e22d0c827129c2601b19 Mon Sep 17 00:00:00 2001 From: Robert Lubos Date: Fri, 6 Sep 2024 10:39:32 +0200 Subject: [PATCH] samples: net: lwm2m_client: Remove unneeded Security object instance The second Security object instance for bootstrap case isn't really needed, as the bootstrap server creates own Security object instances anyway. As that object instance had no Short Server ID assigned, it caused failures during bootstrap discovery. Signed-off-by: Robert Lubos --- samples/net/lwm2m_client/src/lwm2m-client.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/samples/net/lwm2m_client/src/lwm2m-client.c b/samples/net/lwm2m_client/src/lwm2m-client.c index f8feceffc5a..cea4f92ce8c 100644 --- a/samples/net/lwm2m_client/src/lwm2m-client.c +++ b/samples/net/lwm2m_client/src/lwm2m-client.c @@ -127,9 +127,6 @@ static int lwm2m_setup(void) #if defined(CONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP) /* Mark 1st instance of security object as a bootstrap server */ lwm2m_set_u8(&LWM2M_OBJ(0, 0, 1), 1); - - /* Create 2nd instance of security object needed for bootstrap */ - lwm2m_create_object_inst(&LWM2M_OBJ(0, 1)); #else /* Match Security object instance with a Server object instance with * Short Server ID.