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

server write operation , response COAP_400_BAD_REQUEST #734

Closed
nanioo opened this issue Nov 9, 2023 · 2 comments
Closed

server write operation , response COAP_400_BAD_REQUEST #734

nanioo opened this issue Nov 9, 2023 · 2 comments

Comments

@nanioo
Copy link

nanioo commented Nov 9, 2023

when I start the server and client, i command like "exec 0 /1" 、"write 0 /1" and so on, there is no OK response, but 400, why this response

exec 0 /1
Error: 4.00 (COAP_400_BAD_REQUEST)

@nanioo
Copy link
Author

nanioo commented Nov 9, 2023

write 0 /1/0/1 20
OK

Client #0 /1/0/1 : 5.03 (COAP_503_SERVICE_UNAVAILABLE)
non block transfer
0 bytes received of type text/plain:

and like this

@mlasch
Copy link
Contributor

mlasch commented Nov 9, 2023

Hi @nanioo

when I start the server and client, i command like "exec 0 /1" 、"write 0 /1" and so on, there is no OK response, but 400, why this response

Error 4.00 makes sense here, because you try to exec on object instead of resource level. Try a resource which has the executable flag, e.g. exec 0 /1/0/8.

write 0 /1/0/1 20 works for me:

> write 0 /1/0/1 20
OK
> 8 bytes received from [::1]:56830
64 44 7C 45  45 7C C1 86   dD|EE|..

Client #0 /1/0/1 : 2.04 (COAP_204_CHANGED)
    non block transfer
    0 bytes received of type text/plain:

Are you using the Wakaama client and Wakaama server?

@mlasch mlasch closed this as completed Feb 8, 2024
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

2 participants