Huzzah ESP8266 not able to connect

For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
twfry
 
Posts: 4
Joined: Wed Mar 16, 2022 7:30 pm

Huzzah ESP8266 not able to connect

Post by twfry »

Hello,

Using the current version of the ESP8266 libraries I have been unable to perform basic client connectivity or anything else. The ESP8266's successfully connect to a wifi access point in WIFI_STA mode. However, when using a WiFiClient instance to connect to an external server as shown in the client connect sketches from adafruit's webpage and the ESP2866 documentation examples, the client connection always times out.

I have spent a few days now reading the Arduino ESP8266 Core documentation and looking at examples. I have tried configuring the ESP8266s with static IPs, setting hostnames, disabling persistence or autoconnect during setup, etc. and nothing has worked with the current libraries. I have also tried a few different wifi access points, and changed their settings to legacy mode and other advise found online, again without success.

However, if I switch the ESP8266 board version to 2.5.2 in Arduino board manager everything works fine, from the basic WiFiClient example to complicated websocket server sketches.

I guess I could just build everything on version 2.5.2 going forward, but I am worried it will cause problems later. I also have been unable to fix this when using PlatformIO instead of ArduinoIDE even with setting the board version in platformio.ini to @2.5.2, so would like to figure this out.

Again the basic client connect example here (https://learn.adafruit.com/adafruit-fea ... rduino-ide) is not working on the current board version (3.0.2), but is working on 2.5.2. Has this been encountered before? Is there anything else I could try.

Thank you

User avatar
adafruit_support_carter
 
Posts: 29457
Joined: Tue Nov 29, 2016 2:45 pm

Re: Huzzah ESP8266 not able to connect

Post by adafruit_support_carter »

Just did a quick test here using the example from here:
https://learn.adafruit.com/adafruit-fea ... 2720763-33
using the 3.0.2 version of the ESP8266 BSP and it worked as expected. So it seems like something unique to your setup. Double check all the wifi settings. If possible, also test with a different wifi network.

User avatar
twfry
 
Posts: 4
Joined: Wed Mar 16, 2022 7:30 pm

Re: Huzzah ESP8266 not able to connect

Post by twfry »

Thanks for checking and following up. That is one of the many examples I tried without success. The client.connect() call continuously fails. Also tried another AP with the same results. Downgrading the board library to 2.5.2 resolves all issues while using any version after 2.5.2 causes issues. Interestingly changing the ESP8266 to run in AP mode and allow other clients to connect to the ESP8266 as a webserver works flawlessly.

From that I'd assume there is an issue with the Wifi network, I am using ASUS ZenWiFi AX (XT8) and have configured the 2.4GHz band to legacy mode and tried a few things but without success. If anyone has wifi network configuration recommendations that would be great.

I also picked up a few ESP32 feathers to test out and they work flawlessly.

From digging more into Espressif's lineup it looks that they have moved away from ESP8266 and are focusing on and investing in the ESP32 line. The ESP32-C3 seems to be their 8266 replacement line and is price competitive with the 8266, so from this I am now considering just investing in the ESP32 line and use their C3 parts instead of the 8266 parts. Curious if others have come to the same conclusion.

If anyone has network configuration suggestions to try I'd really appreciate it.

Locked
Please be positive and constructive with your questions and comments.

Return to “Wireless: WiFi and Bluetooth”