I would use udp_sendto since this does send immediately if lwIP
has an ARP entry to know the MAC destination address and your Ethernet driver
(low_level_output) sends immediately without some delay or wait for interrupt.
You might make your call, delay a few mS for it to process and then disable
How to prove this? Start WireShark capturing on the PC
(assuming the PC will get/see the UDP packet). Step in the debugger over
lwip_sendto stopping after this line. Does WireShark contain the UDP
packet(s)? If you can’t stop in a debugger, simply test adding
for(;;); after lwip_sendto. If you don’t see anything, add a
software delay after lwip_sendto.
[mailto:address@hidden On Behalf
Sent: Tuesday, January 19, 2010 11:14 AM
Subject: [lwip-users] How do I check if a packet is sent out?
In my project, I need to send out an UDP packet then stop the system interrupts
for a few ms, but I need to confirm the UDP packet is sent out first (I don't
need to confirm if it will reach the destination)
I send out the UDP packet using
lwip_sendto(lSocketUDP, myudpout.buffer, sizeof(myudpout),
0, (struct sockaddr
How can I confirm *THIS* packet is sent out?
Can anyone be so kind to give me a pointer?
BTW, I also have an active TCP connection at the same time