ESPHome on ESP32C6 with Xiao 24GHz mmWave = no data

Hi :wave:
I have a Xiao 24GHz mmWave connected to a Seeed ESP32C6 but cannot get any sensor data. I using ESPHome and started with this configuration here, which is for the Seeed MR60BHA2 (based on the ESP32C6). The problem is, no matter what I do, I am not able to see sensor data in ESPHome.

I have tried:

  • A different Seeed ESP32-C6, same problem
  • Changing the firmware version on the mmWave sensor (via the app, bluetooth)
  • Changing the baud rate on the mmWave sensor (via the app, bluetooth)
  • Resetting the mmWave sensor back to defaults (via the app, bluetooth)
  • Switching back to ESP32-C3, sensor works perfectly

Is there something here I am missing with UART on the ESP32C6 and/or ESPHome?

This is my config:

esp32:
  board: esp32-c6-devkitc-1
  variant: esp32c6
  flash_size: 4MB
  framework:
    platform_version: 6.6.0
    type: esp-idf
    version: 5.2.1
    sdkconfig_options:
      CONFIG_ESPTOOLPY_FLASHSIZE_4MB: y

logger:
  level: DEBUG
  baud_rate: 0

uart:
  id: ld2410_uart
  baud_rate: 256000
  rx_pin: 17
  tx_pin: 16

ld2410:
  uart_id: ld2410_uart
  throttle: 500ms

binary_sensor:
  - platform: ld2410
    has_target:
      name: Presence
    has_moving_target:
      name: Moving Target
    has_still_target:
      name: Still Target
    out_pin_presence_status:
      name: out pin presence status

Hi there,

Yes. :grinning: I bet it doesn’t work in the App then?

HTH
GL :slight_smile: PJ :v:

baud_rate: 115200
rx_pin: 17 (no such pin no,) C3 it’s GPIO4 & GPIO5 , C6 its GPIO02(RX) & GPIO21(TX)
tx_pin: 16 (nope)
parity: NONE
stop_bits: 1

FYI, Those pins are for the DeV-KIT 1C hardware, you are using a Xiao.

1 Like

Sorry, yes to what? I don’t understand :upside_down_face:

1 Like

Hi there,

Just messing with you, Fix those pin nums , you be golden
:v:
PJ :slight_smile:

from the wiki, example: for c3

# Per https://wiki.seeedstudio.com/XIAO_ESP32C3_Getting_Started/#pinout-diagram and https://wiki.seeedstudio.com/mmwave_for_xiao/#hardware-overview
uart:
  tx_pin: GPIO5
  rx_pin: GPIO4
  baud_rate: 9600

# Example configuration entry from https://esphome.io/components/sensor/ld2410
ld2410:

binary_sensor:
  - platform: ld2410
    has_target:
      name: Presence
    has_moving_target:
      name: Moving Target
    has_still_target:
      name: Still Target
    out_pin_presence_status:
      name: out pin presence status

change the Gpio’s of 04 & 05 to 02 & 21 :+1: for c6

2 Likes

You are my hero @PJ_Glasso :sparkling_heart: Now it works.

But I don’t understand where do you get these pin numbers from? If I look at the official docs, it clearly shows GIO16/17 for UART?

Thank you, I was looking to do the same thing!!

Too bad it’s not possible with Zigbee.

@PJ_Glasso I am now having trouble with the I2C pins. Can you explain how you worked out that on the C6 the pins were 2 and 21 for UART? So that I can work out what the correct I2C pins are?

Hi there,

Yes, Sure, those pins match the module(it’s serial port)…Not the xiao. The Xiao’s second com port is 16,17 using GPIO #'s
The code is using a softSerial port on the Xiao would be my bet.

HTH
GL :slight_smile: PJ :v:

I2C on Xiao ESP32C6 is GPIO22 (D4) SDA & GPIO23 (D5) SCL
AFAIK, I have seen this chart floating around though and it get’s confusing for folks, some stuff only supported by the ESP-IDF

Reality Check on the Xiao ESP32C6 Board:

Xiao Pin Functionality ADC PWM UART/I2C/SPI Capable?
D0–D9 GPIO0–9 :x: :white_check_mark: :white_check_mark: Yes, with remapping
A0–A3 GPIO10–13 :white_check_mark: :white_check_mark: :white_check_mark:
SDA/SCL GPIO18/17 :x: :white_check_mark: :white_check_mark: I2C default
RX/TX GPIO20/21 :x: :white_check_mark: :white_check_mark: UART default

So while the chip has 7 ADC channels, the Xiao board exposes only 4.

Thanks great, thanks @PJ_Glasso but where are you finding this information?Where can I read this myself? Is it in the schematic?

Hi there,

Much of it comes from the Technical Reference guide and The Espressif website, as well as Xiao schematics. Some of it is generic to ESP32 , but the C3 messed that up… it’s different… ;grin:

HTH
GL :slight_smile: PJ :v:

Often the TRG will offer more current info than the data-sheet that include errata notes and updates. YMMV :bow:

Yes, it’s in the schematic and shows the original (solved) response had a typo.

Anyway this is how I check with the schematic.

You can also reference the ESP32-C6 datasheet to get the pin numbers for Uart0.

2 Likes

Thank you @PJ_Glasso :purple_heart: