-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Description
Board
ESP32-S3 Dev Module
Device Description
Electronic Cats WiFi Dev Board - an ESP32-S3 based board designed as a Flipper Zero add-on.
Key detail: This board uses native USB-CDC for serial communication. There's no external UART chip (like CH340 or CP2102) - it uses the ESP32-S3's built-in USB peripheral.
Hardware Configuration
Nothing else attached. Just the board connected to a computer via USB-C cable.
Using the native USB port for both power and serial communication (USB CDC On Boot: Enabled).
Version
v2.0.7
Type
Bug
IDE Name
Arduino IDE 2.3.4
Operating System
26.2 Beta (25C5048a)
Flash frequency
40MHz
PSRAM enabled
no
Upload speed
921600
Description
The Problem
When calling WiFi.softAPConfig() with any custom IP address on an ESP32-S3 using native USB-CDC, serial communication dies immediately and never recovers.
What happens
- Serial works fine at startup
- I call
WiFi.softAPConfig(customIP, customIP, netmask) - Serial output freezes instantly - nothing more prints
- WiFi AP starts correctly (I can see the network and connect to it)
- Serial never comes back, even after WiFi is working
Expected behavior
Serial should keep working after WiFi.softAPConfig(), regardless of the IP address.
Tested IPs
| IP Address | Serial works? |
|---|---|
| 192.168.4.1 (default, no softAPConfig call) | ✅ Yes |
| 192.168.4.1 (explicit call) | ❌ No |
| 192.168.1.1 | ❌ No |
| 10.0.0.1 | ❌ No |
| 4.3.2.1 | ❌ No |
| 8.8.8.8 | ❌ No |
Any call to softAPConfig() breaks serial, even with the default IP.
Why this matters
For captive portal projects, Samsung phones need a "public-looking" IP to trigger automatic portal detection. The workaround (not calling softAPConfig) limits functionality.
Sketch
#include <WiFi.h>
IPAddress apIP(4, 3, 2, 1);
IPAddress netMsk(255, 255, 255, 0);
void setup() {
Serial.begin(115200);
delay(2000);
Serial.println("=== USB-CDC + WiFi.softAPConfig Test ===");
Serial.println("[1] Serial is working fine here");
Serial.println("[2] Configuring WiFi mode...");
WiFi.disconnect();
delay(100);
WiFi.mode(WIFI_OFF);
delay(100);
WiFi.mode(WIFI_AP);
delay(100);
Serial.println("[3] About to call WiFi.softAPConfig()...");
// *** THIS LINE KILLS SERIAL ***
WiFi.softAPConfig(apIP, apIP, netMsk);
delay(100);
// Nothing below this point ever prints
Serial.println("[4] softAPConfig done - you won't see this");
WiFi.softAP("TestNetwork", "");
delay(100);
Serial.println("[5] AP started at IP:");
Serial.println(WiFi.softAPIP());
}
void loop() {
Serial.println("Loop...");
delay(1000);
}Debug Message
=== USB-CDC + WiFi.softAPConfig Test ===
[1] Serial is working fine here
[2] Configuring WiFi mode...
[3] About to call WiFi.softAPConfig()...
That's it. Output stops completely after line [3].
No crash, no Guru Meditation error, no backtrace - just silence. The WiFi network "TestNetwork" appears and works, but serial is dead.
Other Steps to Reproduce
Steps
- Get any ESP32-S3 board that uses native USB (no external UART chip)
- In Arduino IDE: Tools → USB CDC On Boot → Enabled
- Upload the sketch above
- Open Serial Monitor at 115200 baud
- Reset the board
- Watch - output stops after "[3] About to call..."
Workaround
Don't call WiFi.softAPConfig() at all. Just use:
WiFi.softAP("NetworkName", "");This uses the default 192.168.4.1 and serial keeps working.
My theory
WiFi.softAPConfig() seems to trigger a TCP/IP stack reconfiguration that somehow disrupts the USB-CDC driver. Maybe shared DMA buffers or some internal resource conflict specific to ESP32-S3's native USB implementation?
Boards tested
- Electronic Cats WiFi Dev Board (ESP32-S3) → issue present
- ESP32-S3-DevKitC → issue present (based on community reports)
Original ESP32 (non-S3) boards don't have this issue because they use external UART chips.
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.