PlatformIO in VS Code running on Linux Debian - access to /dev/ttyUSB0 - port doesn't exist

i did it and my username is in the group. actually i figured out where the problem comes from, but i can’t fix it.

when i type command lsusb → Bus 001 Device 009: ID 10c4:ea60 Silicon Labs CP210x UART Bridge

but in the rules → sudo nano /etc/udev/rules.d/99-platformio-udev.rules →

CP210X USB UART

ATTRS{idVendor}==“10c4”, ATTRS{idProduct}==“ea[67][013]”, MODE:=“0666”, ENV{ID_>
ATTRS{idVendor}==“10c4”, ATTRS{idProduct}==“80a9”, MODE:=“0666”, ENV{ID_MM_DE

but when i convert it to my UID and VID, the problem is not solved and i see this error →

Building in release mode
Retrieving maximum program size .pio/build/esp32dev/firmware.elf
Checking size .pio/build/esp32dev/firmware.elf
Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
RAM: [= ] 6.4% (used 21032 bytes from 327680 bytes)
Flash: [== ] 17.8% (used 233185 bytes from 1310720 bytes)
Configuring upload protocol…

Warning! Your /etc/udev/rules.d/99-platformio-udev.rules are outdated. Please update or reinstall them.
More details: 99-platformio-udev.rules — PlatformIO latest documentation

AVAILABLE: cmsis-dap, esp-bridge, esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port…
Auto-detected: /dev/ttyUSB0
Uploading .pio/build/esp32dev/firmware.bin
esptool.py v4.5.1
Serial port /dev/ttyUSB0
Connecting…

A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool.py latest documentation
*** [upload] Error 2
================================= [FAILED] Took 10.45 seconds =================================

Please post the result of
ls -l /dev/ttyUSB0
and
getent group | grep dialout

sbzrobot@sbzrobot-desktop:~$ ls -l /dev/ttyUSB0

crw-rw-rw- 1 root dialout 188, 0 Feb 16 11:55 /dev/ttyUSB0

sbzrobot@sbzrobot-desktop:~$ getent group | grep dialout

dialout:x:20:sbzrobot

That looks good to me.
Which board you use exactly?

esp32-wroom-32.
I also have an esp32-s3-32s board that is with ft232. I want to test it with that too.

Some of those boards need an addiional 10nf capacitor between enable and GND to make the autoreset circuit work.

Please put the board into bootloader manually:

  • press & hold BOOT button
  • press RESET button
  • release the BOOT button
  • upload the sketch

yes, i did it before

How about the ESP32-S3 ? Do you have the same issues?

oh, no. it is OK. i dont know whats going on with esp32-wroom?
i think its because the ft232 rules is OK. i dont know. maybe

Afaik as your user is member of the dialout group the udev-rules can be ignored.
Either you define the rules or your user is member of the dialout group to gain access to the port (99-platformio-udev.rules — PlatformIO latest documentation)

Just to be clear: the ESP32-S3 works, but the ESP32 does not?

yes, the ESP32-S3 with the FT232 works.

So the issue could be anything from the cable (as the ESP32 is using micro USB whereby S3 is using USB-C) up to a broken USB2Serial Chip on the board itself.

Did you try a different cable? Some cables are just for charging and have no data connections.
Did you try the ESP32 on a different PC, maybe a Windows PC?

sorry, i forgot to say
yes, i tested with another cable and also i tested with win10, it was correct and there was no problem. my problem is with Ubuntu.

My only knowledge about PlatformIO + VS-Code and Ubuntu is using Ununtu WSL on Windows 11. Works without issues as my ubuntu user is member of the dialout group.

Maybe there is someone else here in the forum with more knowledge about Ubuntu

sorry again, is this result correct?

sudo lsof /dev/ttyUSB0

lsof: WARNING: can’t stat() fuse.portal file system /run/user/1000/doc
Output information may be incomplete.
lsof: WARNING: can’t stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
Output information may be incomplete.

My result is “nothing”

sivar2311@Boris-Notebook:~$ sudo lsof /dev/ttyUSB0
sivar2311@Boris-Notebook:~$