Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with blockwise transfers that are even increments of block_size #24

Closed
ke6zfi opened this issue Jun 15, 2017 · 4 comments
Closed

Comments

@ke6zfi
Copy link

ke6zfi commented Jun 15, 2017

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

@anttiylitokola
Copy link
Contributor

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?

wireshark

@ciarmcom
Copy link

ciarmcom commented Aug 8, 2017

ARM Internal Ref: IOTCLT-1904

@ke6zfi
Copy link
Author

ke6zfi commented Aug 10, 2017

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).
wireshark_4096_issue

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.

adbridge pushed a commit to ARMmbed/mbed-os that referenced this issue Aug 25, 2017
@anttiylitokola
Copy link
Contributor

This has been fixed so closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants