ESP8266 Developer ZoneThe Official ESP8266 Forum2016-12-07T00:02:53+08:00https://bbs.espressif.com:443/feed.php?f=7&t=31582016-12-07T00:02:53+08:002016-12-07T00:02:53+08:00https://bbs.espressif.com:443/viewtopic.php?t=3158&p=10821#p10821 Thanks
Yiming
Statistics: Posted by Guest — Wed Dec 07, 2016 12:02 am
]]>2016-12-02T00:53:40+08:002016-12-02T00:53:40+08:00https://bbs.espressif.com:443/viewtopic.php?t=3158&p=10749#p10749 What might be the causes of "ESPCONN_IF" returned by espconn_sendto() to send UDP data, and how to fix it or handle it?
sdk: 1.5.4 NON-OS
Here below is the reproduction scenario:
1. We call espconn_sendto() to continuously send udp packet of 1024 bytes as below: (1) espconn_sendto() to send a packet of 1024 bytes to an existing ip address of the same LAN; (2) wait espconn_sent_callback() called, or wait more than 1ms using timer (3) go to (1) to repeat
2. However, we found via debug info that, we could repeat only tens of times, then the espconn_sent_callback() will not be called and no data will be sent out, while espconn_sendto() will return -14, that is "ESPCONN_IF" error.
3. The first tens of packets in 1024 bytes each have been sent out succesfully and received by the UDP peer successfully.
4. If we call espconn_sendto() sending to a "fake" (not present) ip addiress, the espconn_sendto() always return successfully, no "ESPCONN_IF" error will returned.
What makes differences here between 2 and 4?
5. If we give some delay after every 8 packets have been sent out as above 1, then there will be no "ESPCONN_IF" error as well. However, this slowdown the throughout we don't expected.
Would you please kindly give us some hints to fix it here?
Thanks in advance!
Yiming Li
Statistics: Posted by Guest — Fri Dec 02, 2016 12:53 am