UDP Initial Receive Delay

jhinkle
Posts: 32
Joined: Tue Apr 19, 2016 12:09 am

UDP Initial Receive Delay

Postby jhinkle » Sat Apr 23, 2016 2:48 am

I'm experiencing a delay in initially receiving UDP messages -- I'm wondering if I can do something different to remove the delay.

Explain:

I have a remote computer that sends UDP packets to a ESP-12 running RTOS SDK.

Each UDP packet/message is 635 bytes in length.

A burst of 16 messages are sent every 25 milliseconds. Per a wireshark capture - there is a 50 microsecond gap between each of the messages forming the 16 message burst. Again - the burst is repeated every 25 milliseconds.

I have a Task that just receives the message and then passes it to another lower priority task.

The first message seen by my code occurs after 5 of the 16 message bursts have been sent --- I'm missing the first 80 messages.

Time from first message being sent by the remote computer until the first message received is 5 * 25 msec = 125 msec window in which messages are lost.

If I change the rate of bursts from 25 milliseconds to 50 milliseconds then I only miss the first 16 messages or the first burst.

Time window for missing messages - 1 * 50 msec = 50 msec.

The ESP sees no communication on the open UDP port until the messagebursts start to arrive.

Can you explain what might be happening within the SDK that would cause the initial message being dropped. Once my code receives the first message (after the initial loss) - I never miss another one.

Thanks in advance for your comments.

Who is online

Users browsing this forum: No registered users and 237 guests