Closed ke6zfi closed 5 years ago
Hi Chris,
Thanks for your report.
I tried to reproduce your problem but I couldn't get even that far. Write request goes through fine with 4096 bytes but when reading value back Leshan just timeouts. Wireshark capture shows that client is requesting more blocks but server is not sending new GET request. Can you share the steps how you were able to see this problem?
ARM Internal Ref: IOTCLT-1904
Antti,
Try this version of Leshan: https://hudson.eclipse.org/leshan/job/leshan/297/artifact/leshan-server-demo.jar
I am doing a read when the issue occurs.
Notice packet 87 (Block #3) the More flag is set. This is a 4096 byte message. When Leshan tries to read Block #4 because the More bit was set, it gets back nothing (hence the really small size of Packet 89).
Here is my main.cpp from mbed-client-linux-example. main.cpp.txt
Read /4/0/2 after the first "Incrementing Resource Value". It will show a timeout in Leshan due to the bug, but wireshark should show it.
Let me know if you need any further info to reproduce this.
This has been fixed so closing the issue.
Sending via blockwise response a 4096 byte packet with 1024 byte blocks, the last packet (Block 3) still sets the more flag. This is causing the server (Leshan) to fault. Appears issue is using a ">" check rather than a ">=" check on sn_coap_protocol.c:1602 and sn_coap_protocol.c:1976.
Thanks, Chris