Page 1 of 1

Beginner's issues with flashing via serial port

Posted: Wed Aug 07, 2024 8:17 am
by VanKurt
Hello,
I have installed the following:
  • latest esp-idf
  • vscode with espressif esp-idf extension
on my arch linux system.

Then I created new project based on the empty template. It compiles fine, just as I expected.

But now the hard part:
I connected a Seeed Studio XIAO ESP32C6 vio USB to my PC.
Running lsusb shows me "Bus 003 Device 005: ID 303a:1001 Espressif USB JTAG/serial debug unit". Is that correct?

But flashing from vscode does not work:
esptool.py v4.8.dev4
Serial port /dev/ttyS0

A fatal error occurred: Could not open /dev/ttyS0, the port is busy or doesn't exist.
(Could not configure port: (5, 'Input/output error'))
Is there anything I need to do to make my ESP32C6 show up as a serial port? Or do I need to flash it in another way?

Re: Beginner's issues with flashing via serial port

Posted: Fri Aug 09, 2024 7:59 am
by ESP_frhr
Hello,

it seems you just selected a wrong device file. It should be something like /dev/ttyACM0. You can check dmesg

Code: Select all

sudo dmesg

[  629.711014] usb 3-2: new full-speed USB device number 3 using xhci_hcd
[  629.866286] usb 3-2: New USB device found, idVendor=303a, idProduct=1001, bcdDevice= 1.01
[  629.866300] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  629.866306] usb 3-2: Product: USB JTAG/serial debug unit
[  629.866311] usb 3-2: Manufacturer: Espressif
[  629.866316] usb 3-2: SerialNumber: 7C:DF:A1:E8:5D:68
[  629.899999] cdc_acm 3-2:1.0: ttyACM0: USB ACM device

Try to change the device file in the VSC extension(bottom left). I believe it should also give you some hints what port to select. HTH

Re: Beginner's issues with flashing via serial port

Posted: Fri Aug 09, 2024 8:02 am
by VanKurt
You're right!
The device name is different from all my other ESP32 that I have programmed so far. "/dev/ttyACM0" works!