EleksTubeHAX icon indicating copy to clipboard operation
EleksTubeHAX copied to clipboard

Joining WiFi sometimes fails. Be more graceful

Open SmittyHalibut opened this issue 3 years ago • 6 comments

Sometimes, when joining wifi on boot, it just keeps writing . to the TFT and never succeeds. Be more graceful with wifi connection failures.

  • Timeout and retry?
  • Timeout and error on the TFT?
  • Better error messages. Can we detect if the wifi password is incorrect so a misconfiguration and occasional failure don't look the same?

SmittyHalibut avatar May 14 '21 01:05 SmittyHalibut

Option to skip and run off RTC... (maybe people take it somewhere to demo.. who knows)

RedNax67 avatar May 14 '21 11:05 RedNax67

Maybe this will help?

/* Set the ESP to be a WiFi-client, otherwise by default, it acts as both a client and an access-point

  • and can cause network-issues with other WiFi-devices on your WiFi-network. */ WiFi.mode(WIFI_STA);

This came from a very easy way to handle timezones. It's basically built in.. see here: https://github.com/G6EJD/ESP_Simple_Clock_Functions

RedNax67 avatar May 14 '21 15:05 RedNax67

I added your suggested code: WiFi.mode(WIFI_STA); It seems a reasonable thing to do anyway.

SmittyHalibut avatar Sep 29 '21 20:09 SmittyHalibut

Mark, I think this is an old issue, never had any problems mentioned above. Probably you can close this as resolved?

aly-fly avatar Jan 10 '23 08:01 aly-fly

But! But! But! I opened it! </sarcasm>

Yeah, you're probably right. This was firmware from ages ago, and the WiFi code has changed dramatically since then.

Resolving.

SmittyHalibut avatar Jan 10 '23 19:01 SmittyHalibut

@ExplodingLemur just reported this problem happening to him. Reopening.

Its probably a good idea to put some retry logic around wifi connection failures. That seems reasonable.

SmittyHalibut avatar Jan 17 '23 00:01 SmittyHalibut