Why the Serial Port Disappears on ESP32‑S3 (and How to Fix It)
Copilot (Microsoft’s AI)
Problem Summary
Many ESP32‑S3 users (especially with Ebyte EoRa‑S3‑900TB modules) experience a “disappearing serial port” after deep sleep. The board wakes, runs code, but no USB port shows up on Windows, Linux, or macOS. Uploading fails, Serial Monitor fails, and the device appears “dead” until reset.
This is not a driver issue, wiring issue, or hardware failure.
It is a USB‑CDC timing issue unique to the ESP32‑S3.
Root Cause
When the ESP32‑S3 enters deep sleep:
- USB PHY turns off
- USB device controller turns off
- JTAG turns off
- CDC turns off
- Bootloader does not run on wake
- Your sketch starts immediately
- USB is still OFF
- If any other peripheral initializes first → USB never enumerates
So the serial port “disappears” simply because:
USB‑CDC was not re‑initialized before SX1262, I²C, SPI, or other subsystems.
The Fix (100% reliable)
On wake from deep sleep, USB‑CDC must be the first thing you bring back:
cpp
Serial.begin(115200);
delay(200); // allow USB to enumerate
Only after this should you initialize:
- SX1262 LoRa radio
- I²C sensors (BME280, MPU6050)
- ESP‑NOW
- WiFi stack
- Anything else
If SX1262 or I²C initializes first, USB will not enumerate.
Required Board Settings (Arduino Core 3.3.10)
These settings ensure the USB device controller is active:
- JTAG Adapter: Integrated USB JTAG
- Upload Mode: USB
- USB CDC On Boot: Enabled
- USB Mode: TinyUSB (works fine only when JTAG is enabled)
- Port: USB JTAG/Serial Debug Unit
Earlier 3.x versions disabled JTAG and broke USB‑CDC. Version 3.3.10 restores the correct behavior.
Minimal Working Deep Sleep Sequence
cpp
void setup() {
// 1. Re-enable USB-CDC FIRST
Serial.begin(115200);
delay(200);
// 2. Initialize SX1262 AFTER USB
radio.begin();
// 3. Initialize ESP-NOW
WiFi.mode(WIFI_STA);
esp_now_init();
// 4. Do your work (read sensors, send packets)
// 5. Prepare for sleep
Serial.println(“Sleeping…”);
delay(50);
// 6. Enter deep sleep
esp_deep_sleep_start();
}
This sequence prevents the disappearing‑port problem entirely.
Why This Matters for EoRa‑S3 Users
The Ebyte EoRa‑S3‑900TB:
- Has no CH340
- Has no CP2102
- Uses native USB‑UDC only
- Shares USB‑CDC and JTAG on the same internal peripheral
- Requires USB first on wake
If USB‑CDC isn’t initialized immediately, the board cannot enumerate and appears “dead.”
This fix makes the module behave predictably and eliminates the most common frustration.
73’s
William