-
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
sock_dtls: unable to send big messages #17996
Comments
Is the send-buffer maybe too small? |
send-buffer? You mean my application-site buffer? It has size 256 and I am trying to send 106 bytes. Or is there an internal buffer I should know about? |
Could you check, what the return value was? |
I went down the rabbit hole:
I've increased But the question now is: Is setting I just hit the next issue: |
@leandrolanzieri do you have an idea what this is about? |
Hmm not sure, I don't remember bumping into this one. It seems that it was introduced with the addition of sock_async in #12907. |
Ah... that's because @HendrikVE is using lwIP and that stack is delivering the UDP packet in chunks, not as a continuous memory area, as GNRC does ... not sure this is fixed quickly :(. @HendrikVE, maybe if you address the TODO this will work out? |
Not sure, if TinyDTLS is able to handle chunked messages by now, though :-/ |
Is there a way to increase the chunk size in
When I executed the test application by sending like 1000 bytes of data, it was split into chunks of 199 bytes. But I don't know whether these are the chunks we are talking about here. The tinydtls repository does not mention anything about chunks, neither in PRs nor in issues or code in general. |
Mh.. maybe @yarrick has an idea here? By just poking through the lwIP code, I was not able to find a quick way to increase the
Yeah, that's a thing specific to |
I am not sure how this is written but if the |
We wrote |
Description
When running
examples/gcoap_dtls
it is not possible to send messages bigger than 99 bytes. When sending>= 100
bytes the application fails withgcoap_cli: msg send failed
. The test apps in the originaltinydtls
repository have no such problem, but apparently the message is split into blocks of 199 bytes. Furthermore, it is most likely a dtls and not a gcoap issue, because the standardexamples/gcoap
works perfectly fine with bigger messages.The dtls handshake works fine, but sending the actual message does not.
I have tried to verify the results with
tests/pkg_tinydtls_sock_async
but when sending more than 91 bytes of payload the test application crashes with*** stack smashing detected ***
. However, the server app printsReceived 92 bytes -- (echo)
before crashing.Steps to reproduce the issue
examples/gcoap_dtls
SHELL_DEFAULT_BUFSIZE * 4
CONFIG_GCOAP_PDU_BUF_SIZE
to e.g.1024
(CFLAGS += -DCONFIG_GCOAP_PDU_BUF_SIZE=1024
in the Makefile)Expected results
Message exchange should work.
Actual results
If you wonder about port 5683: it's proxied ;)
Versions
Latest master
The text was updated successfully, but these errors were encountered: