-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Unable to connect to WiFi network on ESP32-C3 #6430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I've disabled the USB serial to follow the issue @ladyada was having in #6264 (comment), still getting a crash when attempting to connect.
Open to more testing ideas if you have them! |
my notes: also the same hardware works great with micropython wifi projects, with native USB, and micropy is using IDF 4.3.1 (or 4.4? hard to tell) https://github.com/micropython/micropython/tree/master/ports/esp32 |
@me-no-dev Making that change does not work. If it helps, I am using a network with WPA2 security.
|
@me-no-dev Here's the output of connecting to an open (no password) network. Note that an ESP32, ESP32-S2 were successfully able to connect to both of these networks.
|
@brentru Please let me know. Thanks. |
@SuGlider It pushes it a bit further, but seems to be intermittently working. Successful Output from WiFiClientSecure
I reset the board and it connected, then immediately disconnected. Was unable to re-join.
|
@SuGlider Ok, so, calling However, it fails when I test
|
Well, that's an improvement from the previous situation. It seems that the issue is really related to static cache configuration from sdkconfig. Are both sketches, used for testing it, in the link you sent here? |
Out of interrest (since we do not have problems with the c3) can you try Tasmota? |
@Jason2866 It's important things to be fixed here first. Running on your fork will not help in that case. |
@me-no-dev I do understand, and i agree, but we have not changed anything in code regarding wifi. If it works it is "just" a different setting in sdkconfig we have choosen. So this can help to fix this issue. (Btw. nearly no change in the fork, only the unicore update wdt fix, which is a open PR and #6434. The main differences are only sdconfig settings) |
@Jason2866 @me-no-dev Thank you for the suggestion, I was able to connect to this network using the QTPY C3 and Tasmota firmware. |
Tasmota lib builder https://github.com/Jason2866/esp32-arduino-lib-builder Our fork is based on esp32-s3 branch |
the only notable difference see is |
Yes, we have some c3 boards not v3 (side note; which have been sold as v3...) |
We have enabled WPA3 too, which is not enabled in official build. |
@P-R-O-C-H-Y @SuGlider I tested this with the recent release of ESP32 Arduino 2.0.3-RC1 based on ESP-IDF 4.4 and the QTPY ESP32-C3 The On a successful run:
On an unsuccessful run:
The WiFiClient (insecure) sketch also works intermittently. Unsuccessful run output:
|
Which Brand is your Router / Accesspoint? |
@Jason2866 I'm using a Verizon FiOS G3100. Devices connect to the 2.4GHz "IoT Device Network". |
So a very new one. We have users which have problems with brand new feature rich routers when using Tasmota Brand Asus are most of the time problematic. But not only. Until now we did not find the reason for this issue. Other do just work fine. Maybe your issue is such a combination too. |
@Jason2866 I don't think it's the AP's age - I've had this router a well over a year and have used it with a large number of ESP8266, ESP32, ESP32-S2 development boards for the development of our IoT libraries. Additionally, this AP works with ESP32 (non-c3) hardware running the same sketches. The Tasmota C3 firmware you provided works correctly and reliably on this AP and the QTPY ESP32-C3. I would be open to trying another AP and/or diving into the network traffic sometime next week but ultimately this setup does work with non-c3 hardware running this BSP. |
Okay, router issues hit all esp devices. If only the C3 behaves badly it is something else. |
@brentru I'll look into it. |
@brentru Board: ESP32-C3-DevkitM1-v1.0 (C3 Mini1 module) UART0 Debug output (CDC on -- which doens't work with WiFi):
|
@brentru - Please let me know if you still have problems with WiFi using Arduino Core 2.0.3-RC1. |
@SuGlider @VojtechBartoska Please do not automatically close this, just got back from travel. I will test on Monday. |
Sure, thanks @brentru for your help. |
@SuGlider @VojtechBartoska I've re-tested both sketches with Arduino Core 2.0.3-RC1 and they're working. OK to close this issue, thank you for the assistance! |
Perfect, thank you. Closing. |
Not sure why, but i'm using the wemos C3 mini with 2.0.3 version of the arduino lib, and i have still the same issue as reported above.
Edited note: |
@nielsnl68 The board (wemos lolin c3) has a faulty hf-design. The reduce of wifi transmit power is just a bad workaround for the reflections caused by the not matching antenna design. |
It always gives me confidence in a design when the reference photo from the mfr looks like it has had a capacitor ripped off with pliers. |
Thanks for clearing that out for me. I hope they will make a new version then in the near future, where this is fixed. |
The only way I was able to fix the AP not showing up was by setting the TX Power to a very low value, here's my full sample code: #include <WiFi.h>
#include <esp_wifi.h>
void setup(){
Serial.begin(115200);
Serial.setDebugOutput(true);
Serial.setDebugOutput(true);
delay(2000);
Serial.println("Startup....");
WiFi.hostname("esp32");
WiFi.begin("BOTEROS-NET","qti6-9mi6-p5eu");
WiFi.setTxPower(WIFI_POWER_8_5dBm);
int txPower = WiFi.getTxPower();
Serial.print("TX power: ");
Serial.println(txPower);
while (WiFi.status() != WL_CONNECTED && millis()<20000) {
delay(500);
Serial.print(".");
}
if(WiFi.status() == WL_CONNECTED){
Serial.println("");
Serial.println("WiFi connected.");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}
else {
Serial.println("WiFi NOT CONNECTED, starting ap");
delay(2000);
WiFi.mode(WIFI_AP);
WiFi.softAP("espsoftap","12345678"); // no errors that I can see, but ap never shows up
}
}
void loop(){
} |
@ljbotero thank you very much for your comment! Only the line you provided Does this mean that my board also has a faulty hf design like @Jason2866 mentioned? |
@greycoding Probably, not a good sign when reducing transmit power is needed. |
we spent the last few days trying to find if something was changed - we had a good 'run' of the C3 working well after tweaking some component values. the latest boards were built with the same components that we can determine so not sure why they are not working nicely anymore. @greycoding we can replace with S3 or S2 QT Py, which should do the trick. or just provide a refund, email support@adafruit with a link to this thread. |
Thank you @ladyada, Adafruit support was quick to provide a replacement. |
Board
Adafruit QTPy ESP32-C3
Device Description
Adafruit QTPy ESP32-C3
Hardware Configuration
N/A
Version
latest master
IDE Name
Arduino IDE 1.8.20
Operating System
macOS
Flash frequency
80Mhz
PSRAM enabled
no
Upload speed
115200
Description
Unable to connect to both a secure WPA2 and an insecure (open) network. The ESP32-C3 seems to disconnect and the authorization expires. The logs show that the static IP is not assigned by the AP.
I've been able to connect to this network with ESP32, ESP8266, ESP32-S2.
Output from WiFiScan's listing, showing this network:
It may be similar to #6379, however, reverting to commit bb09615 does not solve the issue.
Sketch
Using WiFiClientSecure library sketch, https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFiClientSecure/examples/WiFiClientSecure/WiFiClientSecure.ino
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: