I currently evaluate an ESP32-C3 Super Mini board because of it's small form factor.
I noticed that on linux the device name of the usb serial port changes all the time (e.g. on every press of the reset button).
Since it is good practice anyways, I wanted to set up an udev rule to create an alias for the device with a fixed name.
For that I created a file /etc/udev/rules.d/98_c3mini.rules with this content:
Code: Select all
SUBSYSTEMS=="usb", ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1001", MODE:="0660", GROUP:="dialout", SYMLINK+="ttyUSB_c3mini"
Code: Select all
/dev/ttyUSB_c3mini_1
--------------------
Hardware ID: LINK=/dev/bus/usb/003/044 LINK=/dev/bus/usb/003/044
Description: n/a
Code: Select all
pio device monitor -p /dev/ttyUSB_c3mini -b 115200
UserSideException: Could not configure port: (25, 'Inappropriate ioctl for device')
Code: Select all
/dev/ttyACM1
------------
Hardware ID: USB VID:PID=303A:1001 SER=48:31:B7:3E:6B:F4 LOCATION=3-9.1:1.0
Description: USB JTAG/serial debug unit