Monday, 31 March 2025

ESP32 C3 Mini - Ubuntu, PlatformIO - Error: esp_usb_jtag: could not find or open device!

When debugging the ESP32 C3 device using Ubuntu and PlatformIO, the error message as follows is seen:

...
Info : esp_usb_jtag: VID set to 0x303a and PID to 0x1001
Info : esp_usb_jtag: capabilities descriptor set to 0x2000
Warn : Transport "jtag" was already selected
Error: libusb_open() failed with LIBUSB_ERROR_ACCESS
Error: esp_usb_jtag: could not find or open device!
...

Steps to debug:

1. Ensure user is in the plugdev group

groups
sudo vi /etc/group

If you have added the user to the group, remember to log out and back in 

2. Try adding a udev rule:

lsusb

Bus 003 Device 071: ID 303a:1001 Espressif USB JTAG/serial debug unit

  

sudo vi /etc/udev/rules.d/99-arduino.rules

# ESP32 C3

SUBSYSTEM=="tty", ENV{ID_REVISION}=="303a", ENV{ID_MODEL_ID}=="1000", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_CANDIDATE}="0"

SUBSYSTEM=="usb", ATTR{idVendor}=="303a", ATTR{idProduct}=="1001", MODE="0666", GROUP="plugdev", ENV{ID_MM_DEVICE_IGNORE}="1"

sudo udevadm control --reload-rules