TCP/UDP server and switching between AP and STA mode

daniSi
Posts: 47
Joined: Thu Dec 23, 2021 9:43 am

TCP/UDP server and switching between AP and STA mode

Postby daniSi » Mon May 23, 2022 1:20 pm

Dear

In our project we use both, UDP and TCP server when the ESP is either in AP or STA mode. Before we switch between modes(AP/STA) we close and delete the socket and at the end also the whole task, where the socket was initialised and has run.

The problem is that after we have successfully switched the mode we create the new UDP/TCP task which binds the socket (successfully), but the connection to the server UDP/TCP can not be established. Have you maybe some suggestion why this could be the case?

But, if we just disable/enable a specific mode (e.g. AP->OFF->AP or STA->OFF->STA) where the same procedure is followed (closing/deleting the socket and again running the task) then everything works as expected.

Thank you

regards, Danijel

Who is online

Users browsing this forum: Bing [Bot] and 120 guests