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

Missing to send last block2 package #26

Open
danielkilbo opened this issue Jan 4, 2018 · 0 comments
Open

Missing to send last block2 package #26

danielkilbo opened this issue Jan 4, 2018 · 0 comments

Comments

@danielkilbo
Copy link

When the server uses less size on the coap messages than the device is set up with.
The coap double buffer will get filled with more data than able to send with a block2 (opaque).

In case of transfers of large opaques the object callback will finish the coap buffer filling before last request comes in from the server. The rest of the read request(s) from the server the opaque callback will not be called. Which is correct.
But the sending will be interrupted just before the end of the opaque due that the lwm2m engine do not know to proceed the sending with the data in the coap buffer.

The problem arises in perform_multi_resource_read_op() function when it return an error instead of sending next part of the opaque.

Could current fix work:
if (!(lwm2m_buf.len > 0 && lwm2m_buf_lock[0])) // New check if data still shall be sent { /* did not read anything even if we should have - on single item */ if(num_read == 0 && ctx->level == 3) { lwm2m_buf_lock[0] = 0; ERROR_HANDLER(ERROR_NOT_FOUND, "Nothing read", SEVERITY_LVL_INFO); return LWM2M_STATUS_NOT_FOUND; } }

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

No branches or pull requests

1 participant