Open nashif opened 7 years ago
by David Brown:
by Mark Linkmeyer:
Andrei Laperie , please set the priority of this bug. Thx.
by Aska Wu:
David,
Some questions:
Thanks
by David Brown:
You can also reconfigure dtls-client to talk to a localhost dtls-server to see how it is expected to work. It is also possible to use openssl as the dtls-client, although I found it to not successfully complete:
$ openssl s_client -connect ipaddr:4242 -dtls
not sure how new of an openssl is needed to have dtls support. The ipaddr should be the ipv4 or ipv6 address of the Zephyr target. Openssl has the advantage of being fairly verbose. When it is finally working, you should be able to type lines and have them echoed back.
by Aska Wu:
David, Thanks for the explanation.
by Aska Wu:
Update:
David, can you try the rx buffer setting and see if it works on your side? I have no idea why I don't need to tweak the rx buffer parameter when running other samples. And I think it's related to the ethernet driver, should I assign this ticket to guys from NXP for further investigation?
by David Brown:
I'll be able to try this on Tuesday when I'm back to work (Mon is a US holiday).
Having to reduce buffers is definitely a bug. I suspect it is caused, some how, by enabling TLS/DTLS. I would suggest an email to the zephyr list, possibly "To" some key MCUX eth people, pointing to this ticket, and see if they have any thoughts.
It might be worth digging into what is happening when there are two buffers, and how that could be causing the packet to be missed.
Reported by David Brown:
The attached patch enabled TLS/DTLS in the {{samples/net/echo_server}} app (the ip addresses at the end will need to be adjusted to the local network). You can also build the net-tools package (the dtls-client.c source needs to be edited for the client addresses).
I used wireshark to capture traffic, but running the dtls-client is able to communicate with this echo server. However, a significant number of packets don't seemed to be received by the device, and the test takes quite a long time. {{wireshark -f 'udp port 4242'}} is good for capturing this, and there are clear 1-second pauses with re-transmissions.
(Imported from Jira ZEP-2582)