Project

General

Profile

Unable to close UDP sockets

Added by Suphichaya Youngsubtargul (โอปอ) about 2 years ago

Hello,
I get an error when creating UDP sockets, errno 23, "too many files open", after the third creating cycle.
The model attached will demonstrate the problem.
To run the model you should power up the esp32 devkit and connect with a mobile phone to the WIFI AP "ESP_ROUTER1".
The passcode is set to "WAIJUNG1234".
But before power up the esp32 device, please open a serial ascii terminal, baudrate 115200.
The esp32 module will print debug information every 5 seconds. the info shows the number of connected clients and the state of the UDP sockets.
After creating the 4 sockets, it will be active for 20 second, after this the 4 sockets will be closed for a period of 40 seconds.
This loop is repeating endless.
When the sockets created for the third time, the esp32 will report errno 23, there are too much udp sockets open.
From this moment the esp32 will show this errno 23 every time you try to create new sockets.
Hopefully you can solve this problem, at this moment the UDP socket can not be used in an application, sooner or later the application get stuck.
Best regards,

Martin.


Replies (10)

RE: Unable to close UDP sockets - Added by Suphichaya Youngsubtargul (โอปอ) about 2 years ago

Hi Martin, we are looking into your query and will keep you updated.

--
Parth Maheshwari
Application Engineer

RE: Unable to close UDP sockets - Added by Suphichaya Youngsubtargul (โอปอ) about 2 years ago

Hello Parth,
Is there any update about this issue?
Best regards,

Martin.

RE: Unable to close UDP sockets - Added by Suphichaya Youngsubtargul (โอปอ) about 2 years ago

Hi Martin,

It is in the pipeline and we can look at it after the end of next week. Hope that is not an issue.

--
Parth Maheshwari
Application Engineer

RE: Unable to close UDP sockets - Added by Suphichaya Youngsubtargul (โอปอ) about 2 years ago

Hi Parth,
Do you've an update about this issue.
It should be nice when there is a solution end of this week.
I need to release the customer product, but without correct software, it is not possible.
Best regards,

Martin.

RE: Unable to close UDP sockets - Added by Suphichaya Youngsubtargul (โอปอ) about 2 years ago

Hi Martin,

Please give us 3-4 days. We are working on another bug and will look at finding a solution to your issue soon.

Thank you for your patience.


Parth Maheshwari
Application Engineer

RE: Unable to close UDP sockets - Added by Suphichaya Youngsubtargul (โอปอ) about 2 years ago

Hi Parth,
How is it going with this issue, when do you expect to send the patch file?
Best regards,

Martin.

RE: Unable to close UDP sockets - Added by Suphichaya Youngsubtargul (โอปอ) about 2 years ago

Hi Martin,

The root cause is found, that's the good news. Still working on a solution so it's a little difficult to estimate the time at the moment. I'll update you as soon as I have an estimate.

Sorry for the delay and thank you once again for your patience.


Parth Maheshwari
Application Engineer

RE: Unable to close UDP sockets - Added by Suphichaya Youngsubtargul (โอปอ) about 2 years ago

Hi Martin,

Please find the patch file here: https://waijung2-doc.aimagin.com/patch-files.html View

Hope this helps and solves your problem.

Once again, thank you so much for your patience.

--
Parth Maheshwari
Application Engineer

RE: Unable to close UDP sockets - Added by Suphichaya Youngsubtargul (โอปอ) about 2 years ago

Hi Parth,
Thanks for the patch file.
It seems to be the right solution for this issue.
The esp32 is now running for several hours, endless opening and closing udp sockets, without errors.
Thanks for the great service, and have a nice day.
Best regards,

Martin.

RE: Unable to close UDP sockets - Added by Suphichaya Youngsubtargul (โอปอ) about 2 years ago

Glad it is working for you, Aimagin is always happy and ready to help!

--
Parth Maheshwari
Application Engineer

    (1-10/10)