Transfer data between two esp32's with usb C cable

Thank you for reading this.

I'm planning on using XIAO esp32c3's from Seeed Studio to communicate with each other with a usb C cable (they have a usb C connector). I'll have them battery powered since it is built in so not to worry about the power.

Here is the link to the official Product website: https://www.seeedstudio.com/Seeed-XIAO-ESP32C3-p-5431.html
Here is the link to the official Product Datasheet: https://files.seeedstudio.com/wiki/Seeed-Studio-XIAO-ESP32/esp32-c3_datasheet.pdf

Now what I want to do is to have two of them connected per usb C cable and be able to have them communicate. Not much, only a few hex numbers.
Now I'm looking myself too if this is even possible. The usb C connectors have to be connected because they are flashed over that but I'm not sure if I can just use some data lines to send and receive data. Maybe you know this specific esp32 or maybe even how to do what I'm trying to do. So please, any help is welcome and appreciated.

Thank you for reading and have a nice day!

If you look at the Xiao ESP32C3 examples in Arduino IDE 2.X, the one named "OnReceive_Demo" has two UART ports cross coupled to do what you want to do. You can use that to figure out how to do it between two separate boards.

Thank you for the response.

Is the UART over the usb C connector?

One of them is.

Edit:

I took a closer look at the Xiao ESP32C3 and I see now that it has direct USB input to the ESP module. That means that a USB-C to C connection will require some negotiation between the two boards to establish how to handle power to the ports, etc. Not as simple as the example sketch which uses a couple of pins configured as RX/TX.

So to answer your question, "probably" but not as easily as I thought. It would be much easier to use Serial1 and communicate between normal UART ports.

I blame my overenthusiastic response on a giant Dairy Queen Reese's Peanut Butter Cup Blizzard. Sorry.

Then one of these has to be configured as USB host.

Thank you guys for your help. I've decided that it's better and easier to just use the UART pins instead of trying it over usb C,