Cannot Receive Serial from Hardware when changing espressif32 core 6.10.0

Hi, ESP32 xiao board cannot receive data over hardware serial when changing from
core espressif32 2025.3.30 to Esperssif 32 6.10.0.
I find out that espressif32 2025.3.30 is Tasmota Espressif 32
But when using espressif32 2025.3.30 version, esp32 can sends and receives data over UART normally. When I changed to version 6.10.0, it cannot receives anything. But the problem is espressif32 2025.3.30 cannot include WiFiClientSecure.h library which I need to use for MQTT client. Please hep
This is my platformio.ini

[env:seeed_xiao_esp32s3]
platform = espressif32
board = seeed_xiao_esp32s3
framework = arduino
build_flags = -DBOARD_HAS_PSRAM
	-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_WARN
board_build.arduino.memory_type = qio_opi
board_build.f_flash = 80000000L
board_build.flash_mode = qio
monitor_speed = 115200
monitor_rts = 0
monitor_dtr = 0
board_build.filesystem = littlefs
lib_deps = 
	seeed-studio/Seeed_Arduino_SSCMA@^1.0.0
	bblanchon/ArduinoJson@^7.4.1
	hideakitai/ArduinoEigen@^0.3.2
	knolleary/PubSubClient@^2.8

And this is my code to config to communicate between ESP32Xiao module with other devices over serial

void startRemoteProxy(Proto through = PROTO_UART) {
    switch (through) {
    case PROTO_UART: {
#ifdef ESP32
        static HardwareSerial atSerial(0);
        atSerial.setRxBufferSize(128 * 1024);
        atSerial.begin(921600);
#else
    #define atSerial Serial1
        atSerial.setRxBufferSize(128 * 1024);
        atSerial.begin(921600);
#endif
        AI.begin(&atSerial, D3);
        delay(100);
        char* cmd_buf = (char*)malloc(CMD_BUFFER_SIZE);
        size_t cmd_size = 0;
        memset(cmd_buf, 0, CMD_BUFFER_SIZE);
        strcpy(cmd_buf, "AT+STAT?");
        cmd_size = strlen(cmd_buf);
        AI.write(CMD_PREFIX, strlen(CMD_PREFIX));
        AI.write(cmd_buf, cmd_size);
        free(cmd_buf);
        AI.write(CMD_SUFFIX, strlen(CMD_SUFFIX));
        break;
    }

Please support me. Thank you

The board manifest for the seeed_xiao_esp32s3 defines

  -DARDUINO_USB_CDC_ON_BOOT=1

Which means that every output to the Serial object is routed to the native USB port of the ESP32-S3 and not to the UART port.

You can either

  • change your code to use Serial0
    or
  • stay with Serial and change the setting in the platformio.ini:
build_unflags = 
  -DARDUINO_USB_CDC_ON_BOOT

The following settings should be removed from your platformio.ini as they are handled by the board manifest:

  -DBOARD_HAS_PSRAM
board_build.arduino.memory_type = qio_opi
board_build.f_flash = 80000000L
board_build.flash_mode = qio

Please ask yourself whether you really need these settings or whether they can be removed:

monitor_rts = 0
monitor_dtr = 0
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_WARN
1 Like

Hi, thank you for your reply
I still use the Serial.print() for debugging over the usb port on ESP32S3 Xiao module.
And I need 1 more Serial interface to communicate with other module (Grove AI Vision V2). That why I need to setup HardwareSerial.
The problem is: when using Tasmota ESP32 core, the 2 modules communicates fine. Only when changging to ESP32 6.10.0, it not work anymore.

If you use -DARDUINO_USB_CDC_ON_BOOT=1 (which is the default for the seeed_xaio_esp32s3), Serial will print to USB and Serial0 print to UART:

Serial β†’ USB
Serial0 β†’ UART

Sorry, I don’t know the modifications of the Tasmota fork. But I know there are alot.

1 Like

And I compile and upload code via arduino IDE, it still works fine.
Do you any changes related to Hardware serial on Espersiff32 6.10.0?

Which Espressif32 Arduino version do you have installed in your ArduinoIDE?

platform = espressif32 @ 6.10.0 is Espressif32 Arduino 2.0.17.

If you want to use Espressif32 Arduino 3.x you have to use the pioarduino fork:

platform = https://github.com/pioarduino/platform-espressif32/releases/download/54.03.20/platform-espressif32.zip β†’ Espressif32 Arduino 3.2.0

1 Like

I use Arduino IDE 2. Espressiff32 version is 3.0.7. Maybe this is the reason.

3.0.7 is

platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.07/platform-espressif32.zip

I have listed the available versions here.

1 Like

thank you very much for your enthusiastic support.
I’m really appreciate your kindness and knowledge. I will try and inform back to you the result

1 Like

thanks, it worked.
Thank for your help