Open
Description
Board
ESP32-C6
Device Description
Esp32-c6 custom board
Hardware Configuration
ESP32-C6 custom board
Version
latest master (checkout manually)
IDE Name
Arduino
Operating System
Macos
Flash frequency
40
PSRAM enabled
yes
Upload speed
115200
Description
Wifi doesn't work in STA or AP more when Zigbee is initialized. Also I don't see a way to de-init zigbee.
Idea is to use Wifi OTA activated with a switch.
-> When using AP mode, the client can find the AP but cannot connect.
-> When using STA mode, the WiFi won't connect and return error:
Sketch
STA code:
WiFi.mode(WIFI_MODE_AP);
if (!WiFi.softAP(ssid, password))
{
log_e("Soft AP creation failed.");
}
IPAddress IP = WiFi.softAPIP();
Serial.print("AP IP address: ");
Serial.println(IP);
STA code:
WiFi.mode(WIFI_OFF);
delay(100);
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
delay(5000);
while (WiFi.waitForConnectResult() != WL_CONNECTED) {
WiFi.begin(ssid, password);
log_i("WiFi failed, retrying.");
}
Debug Message
Debug logs for STA mode
[ 20549][V][STA.cpp:110] _onStaArduinoEvent(): Arduino STA Event: 110 - STA_START
[ 22960][V][STA.cpp:216] _onStaEvent(): STA Disconnected: SSID: Soni_wifi2G_IOT, BSSID: 00:00:00:00:00:00, Reason: 201
[ 22961][V][NetworkEvents.cpp:113] _checkForEvent(): Network Event: 113 - STA_DISCONNECTED
[ 22962][V][STA.cpp:110] _onStaArduinoEvent(): Arduino STA Event: 113 - STA_DISCONNECTED
[ 22962][W][STA.cpp:137] _onStaArduinoEvent(): Reason: 201 - NO_AP_FOUND
[ 22963][D][STA.cpp:155] _onStaArduinoEvent(): WiFi Reconnect Running
[ 22963][W][STA.cpp:541] disconnect(): STA already disconnected.
[ 25370][V][STA.cpp:216] _onStaEvent(): STA Disconnected: SSID: Soni_wifi2G_IOT, BSSID: 00:00:00:00:00:00, Reason: 201
[ 25371][V][NetworkEvents.cpp:113] _checkForEvent(): Network Event: 113 - STA_DISCONNECTED
[ 25371][V][STA.cpp:110] _onStaArduinoEvent(): Arduino STA Event: 113 - STA_DISCONNECTED
[ 25372][W][STA.cpp:137] _onStaArduinoEvent(): Reason: 201 - NO_AP_FOUND
[ 25372][D][STA.cpp:158] _onStaArduinoEvent(): WiFi AutoReconnect Running
[ 25373][W][STA.cpp:541] disconnect(): STA already disconnected.
E (29754) wifi:sta is connecting, return error
[ 25566][E][STA.cpp:417] connect(): STA connect failed! 0x3007: ESP_ERR_WIFI_CONN
[ 25567][I][Handle_OTA.ino:37] init_wifiAP(): WiFi failed, retrying.
E (29766) wifi:sta is connecting, return error
Other Steps to Reproduce
Init Zigbee and then init the wifi.
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.