Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[leshan-dev] How to increase payload size of an Object.

Hello Everyone,

I am facing an issue while writing an Object through leshan server. The object has a string resource and the resource length is almost 1 MB. During the Write Operation I see following Exception
java.lang.IllegalArgumentException: Invalid CoAP code for LWM2M response: 160

This error means:
INTERNAL_SERVER_ERROR

I had to set following parameters in CoapServer config ("MAX_MESSAGE_SIZE", 1024000); to fix INTERNAL_SERVER_ERROR issue. But after this change I started seeing UDP issue:

WARNING: Exception "java.io.IOException: Message too long" in thread UDP-Sender

I was assuming that coap server would fragment the message for right size before putting on wire but may be I am still missing some setup steps.

Can someone tell what is the write way to increase payload size?

Thanks,
Mrinal


Back to the top