-
Notifications
You must be signed in to change notification settings - Fork 2k
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
examples/gcoap: client broken #19379
Comments
Do you use IPv6 address in square brackets? I test this example from current master in the I do little investigation and the |
No I didn't :-/ But honestly, that is a mayor regression from the UX point of view. It would make sense to enforce square brackets if the cmd would expect an URI (e.g. |
Also: Both the gcoap and the nanocoap shell cmd give cryptic error messages claiming send failed when a reply with an error status code came in. The underlying issues is that the API used is broken by design: It converts CoAP status codes to errno codes (e.g. 4.XY to |
Hi! I investigate However, I add work around (rather dirty hack - I'm not proud of it :( ) which checks if user give only IPv6 address - without port or netif. Of course if you would like for example add port - brackets are needed. This fix issue with The code is on my branch - sock_util. If you think such solution is allowed I could do a PR. |
Maybe the cleanest approach would be to change the command line syntax to expect a full URI? That way the API can be reused, it is obvious that square brackets are needed for IPv6 literals, and the number of argument change so that things at least break noticeably? |
As a user I would expected the simplest command. Maybe a good solution will be something similar to the CLI from
where
If you agree with such solution, I could try to refactor |
That makes sense. The cli interface has been like this since recently, anyway. While at it: Would you mind to move that to an a module in sys/shell? I think it could be quite useful to be able to add a shell CoAP client to a custom app be just selecting a module. |
Ok. I try to fix CLI interface. I did not think before about making a dedicated |
Could you, if possible, rewrite it so that it expects URIs (e.g. using the |
Hi! Sorry, for many questions, but I would like detect all possible problems and needed features before I start coding ;). I looked at |
We have a potentially related issue on current Quoting from there:
I was also able to reproduce this locally with |
Aha, regression from #20554, the release tests need to be adapted accordingly. |
There you go: RIOT-OS/Release-Specs#308 |
So the client is not broken, just the test had to be adapted? |
I don't know what the current state of this issue is, but the failing release test is actually unrelated to it - sorry for the noise here. |
Description
Sending a get request from one RIOT device to a separate device fails with an error message, something along the line of
send failed
. Both notes ping each other fine andtests/nanocoap_cli
can successfully communicate with the server.Steps to reproduce the issue
Expected results
A GET request is send and the reply is echoed in the shell soonish afterwards.
Actual results
An error message complaining that send failed is printed in the shell.
Versions
Current
master
.The text was updated successfully, but these errors were encountered: