NRF Cloud coap payload size limitation too small

Hi,

I am using NRF Cloud + coap comms to send data. However I have encountered payload size limitations that are not configurable via KConfig: sdk-nrf/subsys/net/lib/nrf_cloud/src/nrf_cloud_codec.c at main · nrfconnect/sdk-nrf

I have manually modified it to accomodate my payloads. I am also considering manually encoding my payload in cbor to avoid modifying SDK code. Is there a reason why this is limited to 64 bytes? There is no documentation pointing to the payload size limits for nrf cloud.

Parents Reply
  • nrf_cloud_coap_bytes_send works. Thanks.

    Just a question, nrf_cloud_coap_message_send is also limited by 

    MESSAGE_SEND_CBOR_MAX_SIZE (256). Is there a reason why?
    I am mostly concerned about it since we are now using nrf_cloud_coap_bytes_send to send ideally more than 1500 bytes. Is there a limitation on the nrf cloud backend on the length of messages? Is there a reliability concern?
Children
  • > send ideally more than 1500 bytes

    That will then be far, far away from "ideally" ;-).

    In my experience, your application is either designed to exchange a few hundreds of bytes (400-700), then coap will perform brilliant. If in rare cases more data is required, but the majority of the traffic is small, then using coap blockwise helps to overcome that. e.g. SCADA usually use such 400-700 bytes messages, but in rare case a firmware image with 400k.

    If you need to use the device on very low radio, then it works better if you even limit that to 200 bytes.

    If you frequently transfer 10k or 100k or what ever, you anyway far out of "low power wan", at least not in the 10 years from battery category.

    So, maybe you tell, what your application requires, then it would be easier to provide guidance.

  • The custom sensor generates datapoints that are quite large in size. We have already optimized the data to what is only necessary but it is still above the typical payload size.

  • Sure, if the application requires for some reasons larger payload, then that's it. And, if that's the case, then the benefits of coap will be smaller.

Related