ENOMEM when sending udp packet to disconnected address

harrison
Posts: 1
Joined: Mon Sep 09, 2024 1:24 pm

ENOMEM when sending udp packet to disconnected address

Postby harrison » Mon Sep 09, 2024 1:41 pm

I'm using a WT-32-S1 to send udp packets to another device over ethernet.
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)
I've increased the ETH_DMA_TX_BUFFER_NUM to the maximum with no effect.

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

ESP_ondrej
Posts: 207
Joined: Fri May 07, 2021 10:35 am

Re: ENOMEM when sending udp packet to disconnected address

Postby ESP_ondrej » Wed Sep 11, 2024 6:24 am

What IDF version do you use? And what do you mean by "the device is not connected to the network"? Do you mean the cable is unplugged from WT-32-S1? Could you please be more specific about your setup?

Who is online

Users browsing this forum: No registered users and 93 guests