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?
Asked
Active
Viewed 239 times
1 Answers
0
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).

Achim Kraus
- 729
- 1
- 7
- 11
-
As I can see the MAX_RESOURCE_BODY_SIZE should act as an upper bound for the file that I want to send. Yes, the default is 8192 and that is what I currently use; The funny thing is that I can transmit files that are 20Kb in size. – konstantinosAR Jun 10 '21 at 20:50
-
Do you say: "leshan starts a PUT with a larger resource payload as MAX_RESOURCE_BODY_SIZE"? – Achim Kraus Jun 11 '21 at 08:06