Skip to content

Cannot connect to WiFi on ESP32-S3-DevKitC-1 #7424

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

Closed
1 task done
sayanee opened this issue Nov 2, 2022 · 5 comments
Closed
1 task done

Cannot connect to WiFi on ESP32-S3-DevKitC-1 #7424

sayanee opened this issue Nov 2, 2022 · 5 comments

Comments

@sayanee
Copy link

sayanee commented Nov 2, 2022

Board

ESP32-S3-DevKitC-1

Device Description

Just the dev board ESP32-S3-DevKitC-1 and nothing else.

Hardware Configuration

No

Version

v2.0.5

IDE Name

Arduino IDE

Operating System

macOS 12.6.1

Flash frequency

80MHz

PSRAM enabled

no

Upload speed

921600

Description

Cannot connect to WiFi SSID

Sketch

#include <WiFi.h>

char ssid[] = "WIFI_SSID";
char pass[] = "WIFI_PASSWORD";

void setup() {
  Serial.begin(115200);
  while (!Serial) { }

  Serial.print("Attempting to connect to SSID: ");
  Serial.println(ssid);

  WiFi.useStaticBuffers(true);
  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid, pass);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }

  Serial.println("");
  Serial.println("Connected to WiFi");
  printWifiStatus();
}

void loop() {}

void printWifiStatus() {
  Serial.print("SSID: ");
  Serial.println(WiFi.SSID());

  IPAddress ip = WiFi.localIP();
  Serial.print("IP Address: ");
  Serial.println(ip);

  long rssi = WiFi.RSSI();
  Serial.print("signal strength (RSSI):");
  Serial.print(rssi);
  Serial.println(" dBm");
}

Debug Message

Attempting to connect to SSID: WIFI_SSID_NAME
[  4216][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 0 - WIFI_READY
[  4249][V][WiFiGeneric.cpp:338] _arduino_event_cb(): STA Started
[  4251][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 2 - STA_START
[  4250][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
....[  6674][V][WiFiGeneric.cpp:360] _arduino_event_cb(): STA Disconnected: SSID: WIFI_SSID_NAME, BSSID: 00:00:00:00:00:00, Reason: 201
[  6674][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[  6682][W][WiFiGeneric.cpp:950] _eventCallback(): Reason: 201 - NO_AP_FOUND
[  6689][D][WiFiGeneric.cpp:966] _eventCallback(): WiFi Reconnect Running
[  6697][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
.....[  9114][V][WiFiGeneric.cpp:360] _arduino_event_cb(): STA Disconnected: SSID: WIFI_SSID_NAME, BSSID: 00:00:00:00:00:00, Reason: 201
[  9114][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[  9122][W][WiFiGeneric.cpp:950] _eventCallback(): Reason: 201 - NO_AP_FOUND
[  9129][D][WiFiGeneric.cpp:975] _eventCallback(): WiFi AutoReconnect Running
[  9137][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
.....[ 11557][V][WiFiGeneric.cpp:360] _arduino_event_cb(): STA Disconnected: SSID: WIFI_SSID_NAME, BSSID: 00:00:00:00:00:00, Reason: 201
[ 11557][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 11565][W][WiFiGeneric.cpp:950] _eventCallback(): Reason: 201 - NO_AP_FOUND

Other Steps to Reproduce

I have successfully connected to the same WiFi network with Tasmota as suggested in #6430 (although it's for ESP32-C3). WiFiScan example code is also successful and it shows all the WiFi networks nearby!

I have also added WiFi.useStaticBuffers(true); and WiFi.mode(WIFI_STA); before WiFi.begin(ssid, pass); as suggested in the issue #6430.

WiFi SSID details:
wifi-network-details

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@sayanee sayanee added the Status: Awaiting triage Issue is waiting for triage label Nov 2, 2022
@me-no-dev
Copy link
Member

Can you please enable Debug to Info or Verbose and try again. Should print more info on what is the WiFi doing.

@sayanee
Copy link
Author

sayanee commented Nov 3, 2022

Apologies, I completely missed the Arduino IDE Tools menu on Core Debug Level. I have also updated the original post.

Here's the output on the serial monitor in VERBOSE mode:

Attempting to connect to SSID: WIFI_SSID_NAME
[  4216][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 0 - WIFI_READY
[  4249][V][WiFiGeneric.cpp:338] _arduino_event_cb(): STA Started
[  4251][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 2 - STA_START
[  4250][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
....[  6674][V][WiFiGeneric.cpp:360] _arduino_event_cb(): STA Disconnected: SSID: WIFI_SSID_NAME, BSSID: 00:00:00:00:00:00, Reason: 201
[  6674][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[  6682][W][WiFiGeneric.cpp:950] _eventCallback(): Reason: 201 - NO_AP_FOUND
[  6689][D][WiFiGeneric.cpp:966] _eventCallback(): WiFi Reconnect Running
[  6697][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
.....[  9114][V][WiFiGeneric.cpp:360] _arduino_event_cb(): STA Disconnected: SSID: WIFI_SSID_NAME, BSSID: 00:00:00:00:00:00, Reason: 201
[  9114][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[  9122][W][WiFiGeneric.cpp:950] _eventCallback(): Reason: 201 - NO_AP_FOUND
[  9129][D][WiFiGeneric.cpp:975] _eventCallback(): WiFi AutoReconnect Running
[  9137][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
.....[ 11557][V][WiFiGeneric.cpp:360] _arduino_event_cb(): STA Disconnected: SSID: WIFI_SSID_NAME, BSSID: 00:00:00:00:00:00, Reason: 201
[ 11557][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 11565][W][WiFiGeneric.cpp:950] _eventCallback(): Reason: 201 - NO_AP_FOUND

Since the debug message says "NO_AP_FOUND", I have tried to reconnect my computer / macbook with the password again and it is fine.

As a note, I am not sure whether having a special character of . in my SSID name is also creating this problem of not being able to find the SSID.

@me-no-dev
Copy link
Member

Error says that it was not able to find the AP. Maybe that AP is only 5GHz? Or SSID is wrong? And yeah, maybe it could be the ., though if it's valid char, it should work.

@me-no-dev
Copy link
Member

Nevermind, I see up in the initial post that it is indeed 2.4GHz. Try with SSID without the dot

@sayanee
Copy link
Author

sayanee commented Nov 5, 2022

Thanks, @me-no-dev!

I tried with temporary hotspots with my iPhone and it seems the password is the issue, not the SSID name with the . dot.
Both the password are alphanumeric with less than 30 characters 🤷🏻‍♀️

SSID has . Same password Connect?
Yes Yes No
Yes No Yes
No Yes No
No No Yes
Connected to WiFi
SSID: WIFI_SSID
IP Address: 172.20.10.3
signal strength (RSSI):-37 dBm

I have no idea how to reproduce this bug, but I got it working and connected to WiFi.

So I will close this issue, I guess.

@sayanee sayanee closed this as completed Nov 5, 2022
@VojtechBartoska VojtechBartoska added Status: Solved and removed Status: Awaiting triage Issue is waiting for triage labels Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants