I have a STM32-Bluepill board where I flashed an USB Bootloader. If I attach it to my computer, it is mounted at /dev/ttyACM0. lsusb shows it as Bus 001 Device 006: ID 1eaf:0004 Leaflabs Maple serial interface
For Arduino-Projects I do have a diy group on my computer. So for the Bluepill I created the following udev rule:
#Bootloader-Mode DRIVERS=="usb", SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0004", GROUP="diy", MODE="0660" #Normal-Operation-Mode DRIVERS=="usb", SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", GROUP="diy", MODE="0660" Both rules do apply, but none sets the group of /dev/ttyACM0 correctly (its alway uucp). I know that those rule are applied, because I currently use a workaround by setting the mode to 0666 instead. That gives me the permission to work with the device, but anyways I want to set the group correctly.
uucp is only set by one of my default-rules: /usr/lib/udev/rules.d/50-udev-default.rules. But my rule lies at /etc/udev/rules.d/100-bluepill.rules so it should be higher prioritized.
man udev