Sending files with varying lengths over lwm2m

321 views Asked by At

I am using Eclipse Leshan to access the resources of a zolertia RE-MOTE. Long story short, I want to send a binary file from my laptop to the board. However, I see that the leshan server may not start the transmission, depending on the file size. More specifically, I see that files that are 64B, 128B can be transmitted while files of 705 Bytes cannot be transmitted (just an example). In addition, this limitation does not hold if the file is larger than 1Kb, as in this case all the files that I have tested managed to be transmitted. Do you know what may go wrong? Is it normal?

1

There are 1 answers

2
Achim Kraus On

That depends in the first place from your client: what do you use? Your client is required to implement RFC7959 - CoAP blockwise transfer.

Leshan's CoAP communication is based on Eclipse/Californium. To limit misuse, it requires to be configured with the largest expected resource body in the "Californium.properties" using the property "MAX_RESOURCE_BODY_SIZE=???" default is 8192.

If that doesn't help, please try to capture the traffic and post it (preferred as issue in Eclipse/Californium).