Closed desireesantos closed 2 years ago
Hi! Thanks for reporting the issue :) Could you try out a bigger block size? You can increase argument in the buffer up to 0x06
(for the maximum blocksize of 1024 bytes), maybe this could help?
I changed the block2 toreq.setOption('Block2', Buffer.of(0x6))
Hmm, that is strange :/ I found no indication in the specification both for blockwise and observe that could hint why this is interpreted as a bad request. Does sending the observe request without the block2 option set also lead to an error?
Perhaps it could also be an issue with the server implementation? Is the server also using node-coap or another library?
Good point @JKRhb! From server-side is another library(libcoap). I'll will change from libcoap to node-coap to check!
Currently, I use the Copper plugin to execute some tests and I can get large messages using this plugin.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days. Please check if the issue is still relevant in the most current version of the adapter and tell us. Also check that all relevant details, logs and reproduction steps are included and update them if needed. Thank you for your contributions.
This issue has been automatically closed because of inactivity. Please open a new issue if still relevant and make sure to include all relevant details, logs and reproduction steps. Thank you for your contributions.
On the client side, I want to observe a resource with a large message and I'm getting a bad request as a status code. I would like to intensify that for small and medium messages(size until 1K), it works well.
... const setup = { host: 'CLOUD_IP', observe: true, port: 5683, pathname: '/middlewareToCloud', method: 'GET' } const req = coap.request(setup)
I had added the option Block2, but it did not work:
req.setOption('Block2', Buffer.of(0x2))
What do I need to do to get the payload for the large message? Am I doing something wrong or is it an issue for a large message?