When the other device is connected to the network packets send without issue every 100ms however when the device is not connected to the network I receive an ENOMEM error after only two packets are sent.
When lwip debugging is on I can see the issue is:
Code: Select all
etharp_query: could not queue the packet 0x3ffafcf8 (queue is full)
Code: Select all
lwip_sendto(54, data=0x3ffb02dc, short_size=2, flags=0x8 to=192.168.4.200 port=9999
pbuf_alloc(length=2)
pbuf_alloc(length=2) == 0x3ffafcf8
netconn_send
netconn_send: sending 2 bytes
UDP_SENDTO
pbuf_add_header: old 0x3ffafd40 new 0x3ffafd38 (8)
pbuf_add_header: old 0x3ffafd38 new 0x3ffafd24 (20)
ip4_output_if: en0
IP header:
+-------------------------------+
| 4 | 5 | 0x00 | 30 | (v, hl, tos, len)
+-------------------------------+
| 3 |000| 0 | (id, flags, offset)
+-------------------------------+
| 64 | 17 | 0xf045 | (ttl, proto, chksum)
+-------------------------------+
| 192 | 168 | 4 | 110 | (src)
+-------------------------------+
| 192 | 168 | 4 | 200 | (dest)
+-------------------------------+
ip4_output_if: call netif->output()
etharp_find_entry: found matching entry 0
pbuf_free(0x3ffafcf8)
pbuf_free: 0x3ffafcf8 has ref 1, ending here.
etharp_query: could not queue the packet 0x3ffafcf8 (queue is full)
pbuf_free(0x3ffafcf8)
pbuf_free: deallocating 0x3ffafcf8
E (4413) NETSTOP: Error occurred during sending: errno 12, -1