Closed as not planned
Description
Board
ESP32-WROOM-32
Device Description
ESP32 DevKitV1 (can't find manufacturer) with CH9102x USB-Serial chip
Hardware Configuration
No.
Version
v2.0.9
IDE Name
PlatformIO
Operating System
Ubuntu 22.04
Flash frequency
40MHz
PSRAM enabled
yes
Upload speed
115200
Description
I got a ESP32 development board with a different USB-Serial converter, CH9102x, and I'm having trouble making it work. More specifically, I can't make WiFi and serial output work together. I've tried a bunch of different things, so I'll just list what I got so far:
- Running code that prints to Serial and does NOT use WiFi works normally, eg. serial output is correct
- Running code that both prints to Serial and uses WiFi does not. The serial output sometimes becomes garbage (as if baudrate was wrong), and the board keeps resetting, here is an example of the output (the first 2 lines are my output)
================================ SETUP ================================
Calling WiFi.begin
Disconnected (device reports readiness to read but returned no data (device disconnected or multiple access on port?))
Reconnecting to /dev/ttyACM0 ... Connected!
- Tried to run example code from Arduino IDE and ESP-IDF for a simple WiFiScan script, but results were the same as above
- I've found similar issues espressif/esp-idf#8046 and ESP32-C3 native USB CDC stops workng when Wifi is used #6264, but the solution did not work. I've confirmed that the version I'm has the solution to the issue in espressif/arduino-esp32#6287, but it seems it's only for ESP32-C3 board, and I've tried to manually add the workaround from this comment, but I get the following error:
main.cpp:24: undefined reference to `phy_bbpll_en_usb'
- Finally, I tested on Windows 11, and to my surprise, it works normally, without even installing any drivers
My best guess so far is that it has something to do with the CH9102x chip and the Linux driver, but I'm not sure how to debug or work around it.
Sketch
void setup()
{
Serial.begin(115200);
// Any code that has Serial and WiFi
WiFi.mode(WIFI_STA);
WiFi.disconnect();
delay(100);
Serial.println("Setup done");
}
Debug Message
# with build_type = debug and monitor_filters = esp32_exception_decoder
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13192
load:0x40080400,len:3028
entry 0x400805e4
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.