Re: LWM2M client to nrf582540-DK #nrf52840 #networking

Lubos, Robert

Hi Nikos,


Contributions are always welcome, would be also good to contribute the overlay-ot.conf to the lwm2m_client sample, once you have configuration that is proven to work. We even have an outstanding issue opened for that:


As for the issues reported, the first one (CONFIG_LWM2M_COAP_BLOCK_SIZE) looks to me like a bug, as this value is used to determine maximum supported packet size:

Given that currently we only support block transfer for FW updates, it doesn’t seem like valid approach. As a workaround, you can modify `MAX_PACKET_SIZE` to some higher value and see if it helps.


The Kconfig error can be fixed by explicitly enabling TLS support in overlay-dtls.conf (CONFIG_MBEDTLS_TLS_VERSION_1_2=y). TLS is by default disabled for OpenThread to save RAM/ROM when not needed (OT uses mbedTLS internally). The sample relied on a default config, hence it didn’t work with OT enabled. Other Kconfig warnings can be disabled by overwriting the defaults from `prj.conf` in `overlay-ot.conf` (OT makes no use of IPv4).

As for DTLS testing, you may also need to increase mbedTLS heap size (CONFIG_MBEDTLS_HEAP_SIZE=8192), to make sure it’s enough for both, OpenThread and LwM2M.





From: users@... [mailto:users@...] On Behalf Of Nikos Karamolegkos via
Sent: Tuesday, September 8, 2020 13:47
To: users@...
Subject: Re: [Zephyr-users] LWM2M client to nrf582540-DK #nrf52840 #networking


Thanks Robert, with your help I managed to make the OTBR work (I can make a documentation as contribution for the project if you are interested). Although, the device is registered to the leshan server as it should, I have two problems. The first one is that I can not change the CONFIG_LWM2M_COAP_BLOCK_SIZE to 64 (or 128) because I am getting the following error <err> net_lwm2m_rd_client: Registration err: -12 which I saw in API that corresponds to * Not enough core */. The second problem is that I can not build the lwm2m sample when I use the overlay-dtls.conf to enable communication over DTLS in the openthread network. The description of error is that error: Aborting due to Kconfig warnings the warnings are about the NET_IF_UNICAST_IPV4_ADDR_COUNT, NET_IF_MCAST_IPV4_ADDR_COUNT, TEST_RANDOM_GENERATOR and NET_SOCKETS_ENABLE_DTLS parameteres. I tried to comment in some of them but again I have problems. My build command is west build -p auto -b nrf52840dk_nrf52840 samples/net/lwm2m_client/ -d build_lwm2m -- -DCONF_FILE="prj.conf overlay-ot.conf overlay-dtls.conf"

Do you have any ideas?

Join to automatically receive all group messages.