UDP sendto return ENOMEM when a station disconnected.

anmnmnly
Posts: 7
Joined: Mon Feb 05, 2024 7:29 am

UDP sendto return ENOMEM when a station disconnected.

Postby anmnmnly » Mon Feb 05, 2024 7:45 am

There are three devices A, B and C, where A is the AP, B and C are the stations. Device A sends data to the B and C using UDP, during the transmiting, if B or C disconnected or powered off, the sendto() will return ENOMEM for a long time (approximate 3 seconds). I traced this issue and find esp_wifi_internal_tx() return this error. Does anyone know the reason for this issue?

anmnmnly
Posts: 7
Joined: Mon Feb 05, 2024 7:29 am

Re: UDP sendto return ENOMEM when a station disconnected.

Postby anmnmnly » Sun Feb 18, 2024 10:20 am

please see the codes below:

int ret_len = sendto(socket_fd, tx_buffer, sizeof(tx_buffer), 0, (struct sockaddr*)&server_addr, server_addr_len);
if (ret_len < 0)
{
ESP_LOGI(TAG, "sent to %s failed, errno=%d:%s", inet_ntoa(server_addr.sin_addr), errno, strerror(errno));
}
vTaskDelay(pdMS_TO_TICKS(5));

Who is online

Users browsing this forum: No registered users and 249 guests