This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

LWM2M amount of object instances limited

Hey there,

while developing a project, which uses a bit more object instances, we encountered the following problem:

When the registration message size from Device to Cloud exceeds the parameter CONFIG_LWM2M_COAP_BLOCK_SIZE, the registration fails with the output

00:00:41.424,011] <err> net_lwm2m_rd_client: Registration err: -12

This is a part of the registration message: H..RFs.- .. 8.rd.(9lwm2m=1.0..ep=[...].lt=600.</>;rt="oma.lwm2m";ct=11543,</32780/0>,</32780/1>,</32780/2>,</32780/3>,</32780/4>,</32780/5>,</32780/6>,</32780/7>, [...]

As the max value for CONFIG_LWM2M_COAP_BLOCK_SIZE is 1024 Bytes, this limits our application to too few instance. The point of failure happens inside the lwm2m engine while appending the instance information. Question is: Is this intended behaviour? Shouldn't it be possible to create a bigger registration message which is then sent over coap blockwise transfer to the server?

Thanks in advance.

using:
nRF9160
ncs v.1.5.1
zephyr v.2.4.99

Parents
  • Hello,

     

    Shouldn't it be possible to create a bigger registration message which is then sent over coap blockwise transfer to the server?

     No, this is not possible unfortunately. This is a limitation of the LwM2M implementation, block transfer is only supported for the firmware transfer. There is no easy fix for this w/o some major changes in the stack.

  • Hey Hakon,

    thanks for your answer.

    So I get it right, that the block transfer holds only for *receiving* data Cloud2Device, right?

    I have observed, that big opaque values get sent in smaller packets, when communication Cloud2Device. So in this direction it seems to work.

    I then assume, that sending huge opaque data Device2Cloud, which are bigger than CONFIG_LWM2M_COAP_BLOCK_SIZE will also fail.

    Can you say if this topic is somewhere on your roadmap already?

    Best regards

Reply
  • Hey Hakon,

    thanks for your answer.

    So I get it right, that the block transfer holds only for *receiving* data Cloud2Device, right?

    I have observed, that big opaque values get sent in smaller packets, when communication Cloud2Device. So in this direction it seems to work.

    I then assume, that sending huge opaque data Device2Cloud, which are bigger than CONFIG_LWM2M_COAP_BLOCK_SIZE will also fail.

    Can you say if this topic is somewhere on your roadmap already?

    Best regards

Children
Related