# 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="0660", GROUP="plugdev"

# 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="0660", GROUP="plugdev", ENV{ID_MM_DEVICE_IGNORE}="1"
```

Reload the rules, then unplug and reconnect the board:

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

Make sure the current user is in the `plugdev` group before restarting Arduino
IDE:

```sh
groups
sudo usermod -aG plugdev $USER
```

Log out and log back in after adding the group.

Useful checks:

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