CoAP buffer size / max children limitation

Are there any plans for updating the internal CoAP buffer sizes to support 511 OpenThread children? There are two cases where the number of maximum OpenThread children is being limited:

  1. According to the resolution of my other ticket, just between NCS 1.9.1 and NCS 2.0.0, the buffer size is no longer sufficient to support 511 child devices due to additional fields being added to the internal CoAP Message metadata. In NCS 2.0.0, a maximum of 480 children are supported due to this limitation.
  2. When the configuration option for Block-wise transfers is enabled via CONFIG_OPENTHREAD_COAP_BLOCK=y, I now get the error: error: static assertion failed: Insufficient buffer size for CoAP processing!. The error goes away after I further decrease max children to 416 due to presumably more Message metadata required to support the Block-wise options. 

My expectations is that the internal message buffers should support up to 511 children regardless NCS version or Block-wise configuration. Yes, my application needs to be able to eventually support 500 children. I consider this issue a limitation in that it does not sufficiently meet OpenThread capabilities. 

Parents Reply Children
  • Thank you Amanda. This did the trick, actually 138 was sufficient after I did some low level digging of the CoAP core code. This also fixes my previous issue with the child limitation of 480.

    TBH, I would argue that the default value set in misc.h for the definition of OPENTHREAD_CONFIG_MESSAGE_BUFFER_SIZE ought to be changed in a future NCS release to accommodate the worst case Thread/CoAP kconfig options. Or at least something documented about internal buffer limitations to prevent future confusion.

Related