Dear Fellows,
I am working through the Firebase Web App book and have problems with stability of my WiFi connection:
[788650][E][WiFiClientImpl.h:468] tcpWrite(): fail on fd 48, errno: 128, "Socket is not connected"
FAILED
REASON: connection refused
Using my router, all seems to be O.K. – But I want to use a ‘free’ WiFi access point and suddenly get the error mentioned above.
Could you think of a more solid way to verify the state of WiFi-Connection?
E.g. trying to verify state of connection and reconnect in case of difficulties?
Any constructive feedback welcome,
Yours Loetluemmel
Hi.
As I mentioned in another thread:
You can take a look at Wi-Fi events.
You can create an event that listens for a disconnection and tries to reconnect.
Here’s a link to some useful tutorials:
- https://randomnerdtutorials.com/esp32-useful-wi-fi-functions-arduino/
- https://randomnerdtutorials.com/solved-reconnect-esp32-to-wifi/
I hope this also helps.
Regards,
Sara