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

Client SEND operation does not use fragmentation leading to oversized CoAP packets #770

Open
sergioGras opened this issue May 2, 2024 · 0 comments

Comments

@sergioGras
Copy link

Description

I encountered an issue where the client SEND operation does not use the existing fragmentation logic implemented for server WRITE operation. This results in the creation of oversized CoAP packet when large payloads are sent, which the server then rejects due to exceeding the maximum packet size limit.

Steps to Reproduce

  1. Start the server and example client.
  2. Add a new resource that exceeds the 2048 byte limit.
  3. Attempt to send the resource from the client using the SEND method (lwm2m_send).
  4. Observe that the payload is not fragmented and is sent in a single large CoAP packet.

Expected Behavior

The client SEND operation should fragment large payloads into multiple CoAP packets, similar to how the server-side WRITE operation handles them.

Possible Fix

The issue can be resolved by utilizing the transaction_set_payload method in the lwm2m_send method, similar to its usage in the server WRITE operation, instead of the currently used coap_set_payload.

sergioGras pushed a commit to sergioGras/wakaama that referenced this issue May 3, 2024
sergioGras pushed a commit to sergioGras/wakaama that referenced this issue May 10, 2024
Updated the payload method in the client SEND operation to avoid inserting large data into a single coap packet. Fixes eclipse-wakaama#770

Signed-off-by: Sergio Gras <[email protected]>
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