# Linux udev rules

Create `/etc/udev/rules.d/99-k230.rules` with the content below:

```udev
# K230 USB boot ROM used by kburn/k230_flash.
SUBSYSTEM=="usb", ATTR{idVendor}=="29f1", ATTR{idProduct}=="0230", MODE="0666", TAG+="uaccess"

# K230 CanMV CDC serial port used to request boot ROM mode.
# Use ATTRS here because idVendor/idProduct belong to the parent USB device.
SUBSYSTEM=="tty", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="abd1", MODE="0666", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
```

Reload the rules, then unplug and reconnect the board:

```sh
sudo udevadm control --reload-rules
sudo udevadm trigger
```

If you prefer group-based permissions, replace `MODE="0666"` with
`MODE="0660", GROUP="plugdev"` and make sure the current user is in the
`plugdev` group before restarting Arduino IDE.

Useful checks:

```sh
udevadm info -a -n /dev/ttyACM0 | grep -E 'idVendor|idProduct'
udevadm monitor --environment --udev
```
