-->
Page 2 of 4

Re: UDP Packet sending, time delays of about 150ms

PostPosted: Sat Aug 19, 2017 11:06 am
by rudy
When I decrease the send rate to 5mS I do see a few missed packets on the receive side. The delay is more variable and can be longer. I also can see the occasional received indication at 6mS and then followed by the next 1mS later.

EDIT

I set both ESPs to 160MHz. Got rid of a couple of print statements on the receive side. Send at 5mS rate.

Re: UDP Packet sending, time delays of about 150ms

PostPosted: Sat Aug 19, 2017 1:47 pm
by MM596
Hello and thank you for your help!

Have you checked, what happens, if you set the delay to about 10ms. And have you checked the distance between two packets on the second ESP? So if the distance stays at 10ms or if you see some really far away, like 100 to 200ms ?

I am going to post my code tomorrow, as I don't have it on this computer now.

Thank you!

EDIT:
Sorry I haven't seen your second post, before.
That's very interesting, as I have some really big delays.
I am going to post some values and my code tomorrow, thank you for all your help!

Re: UDP Packet sending, time delays of about 150ms

PostPosted: Sat Aug 19, 2017 2:01 pm
by rudy
Don't assume that the PC is able to process (and time stamp) when packet actually arrives. Maybe it does. But I sure don't know that. If your internet connection is using WiFi that might also affect the results. That is why I tested with the minimal configuration. I don't know where the delays I have are coming from. On the transmit side or the receive side. (likely both) But I do see how long it takes in total.

Re: UDP Packet sending, time delays of about 150ms

PostPosted: Sat Aug 19, 2017 2:30 pm
by MM596
Hello,

please have a look at the picture attached, I can see that there are many frames lost, so that's why there is such a big delay.

I use my ESP as a SoftAP, may this be an issue?

Here is my test code:
Code: Select allvoid loop() {
 
 
    UDP.beginPacket(ip, 65432);
    UDP.write("Test Test");
    UDP.endPacket();
 

  delay(10);
}