Skip to content

Instantly share code, notes, and snippets.

@tjvr
Created April 6, 2021 19:08
Show Gist options
  • Save tjvr/3c406bddfe9ae0a3860a3a5e6b381a93 to your computer and use it in GitHub Desktop.
Save tjvr/3c406bddfe9ae0a3860a3a5e6b381a93 to your computer and use it in GitHub Desktop.
Raspberry Pi Pico/RP2040 udev rules
# /etc/udev/rules.d/99-pico.rules
# Make an RP2040 in BOOTSEL mode writable by all users, so you can `picotool`
# without `sudo`.
SUBSYSTEM=="usb", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0003", MODE="0666"
# Symlink an RP2040 running MicroPython from /dev/pico.
#
# Then you can `mpr connect $(realpath /dev/pico)`.
SUBSYSTEM=="tty", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0005", SYMLINK+="pico"
@linux4life798
Copy link

linux4life798 commented Feb 14, 2025

Then reload with the following:

sudo udevadm control --reload-rules && sudo udevadm trigger

The official/comprehensive udev rules for all raspberry pis can be seen in the picotool repo:

https://github.com/raspberrypi/picotool/blob/master/udev/99-picotool.rules

This udev (and the tool) are included in the picotool Debian package, which is currently available in the Debian testing repo:

https://packages.debian.org/trixie/picotool

sudo apt install picotool

@FilipDominec
Copy link

FilipDominec commented Aug 22, 2025

For Pico2 featuring the RP2350 chip, I started getting picotool complaints like:

RP2350 device at bus 1, address 36 appears to be in BOOTSEL mode, but picotool was unable to connect. Maybe try 'sudo' or check your permissions.

I needed to add

SUBSYSTEM=="tty", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="000f", SYMLINK+="pico"

I.e. the entry has to be almost duplicated, just taking into account different idProduct. This shouldn't interfere with the rest of the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment