USB port rights – udev rules

Warning: Undefined variable $optionString in /customers/8/4/7/usbpicprog.org/httpd.www/wp-content/plugins/wpmu-syntax-highlighter.php on line 52 Warning: Undefined variable $optionString in /customers/8/4/7/usbpicprog.org/httpd.www/wp-content/plugins/wpmu-syntax-highlighter.php on line 52

In Ubuntu Linux or other udev enabled systems, libusb devices can only be used as a root user by default. In order to communicate with usbpicprog as a normal user, the following steps can be taken.

Note: in the .deb package, the udev file is already included!

This is an extension of the page USB port problems on the Piklab wiki, it will allow Usbpicprog to access the hardware, it also allows piklab to access the the ICD2 programmer, the Picdem USB bootloader and some other programmers as a normal user. This method works for udev enabled systems (Ubuntu, Debian, …) only, see for other systems the original Piklab wiki in the link above.

  • Create file /etc/udev/rules.d/26-microchip.rules:

#PICKit 1
SYSFS{idVendor}=="04d8", SYSFS{idProduct}=="0032", MODE="0660",GROUP="plugdev"
#PICKit 2
SYSFS{idVendor}=="04d8", SYSFS{idProduct}=="0033", MODE="0660",GROUP="plugdev"
#ICD2
SYSFS{idVendor}=="04d8", SYSFS{idProduct}=="8000", MODE="0660",GROUP="plugdev"
#ICD21
SYSFS{idVendor}=="04d8", SYSFS{idProduct}=="8001", MODE="0660",GROUP="plugdev"
#PICDEM FS USB Bootloader
SYSFS{idVendor}=="04d8", SYSFS{idProduct}=="000b", MODE="0660",GROUP="plugdev"
#USBPICPROG
SYSFS{idVendor}=="04d8", SYSFS{idProduct}=="000e", MODE="0660",GROUP="plugdev"

For OpenSuse users

Thanks to Robert Currie

#PICKit 1 
ATTR{idVendor}=="04d8", ATTR{idProduct}=="0032", OWNER:="root", GROUP:="users",MODE:="0660" 
#PICKit 2 
ATTR{idVendor}=="04d8", ATTR{idProduct}=="0033", OWNER:="root", GROUP:="users",MODE:="0660" 
#ICD2 
ATTR{idVendor}=="04d8", ATTR{idProduct}=="8000", OWNER:="root", GROUP:="users",MODE:="0660" 
#ICD21 
ATTR{idVendor}=="04d8", ATTR{idProduct}=="8001", OWNER:="root", GROUP:="users",MODE:="0660" 
#PICDEM FS USB Bootloader 
ATTR{idVendor}=="04d8", ATTR{idProduct}=="000b", OWNER:="root", GROUP:="users",MODE:="0660" 
#USBPICPROG 
ATTR{idVendor}=="04d8", ATTR{idProduct}=="000e", OWNER:="root", GROUP:="users",MODE:="0660" 

Leave a Reply