Sunday, April 1, 2012

set permission of usb device (HID)


in /etc/udev/rules.d/
add a rule file
the EXTENSION MUST BE .rules

SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="1962", \
SYSFS{idProduct}=="1000"
MODE="660", GROUP="ff"

or more general


KERNEL=="hidraw*", MODE="666"


on the raspberry pi, this is confirmed to work (remember to end the line with a carriage return)

ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", MODE="0660", GROUP="pi"


this is to set the i2c on beaglebone
ACTION=="add", KERNEL=="i2c*", GROUP="dialout"

to make the usbasp work without sudo on avrdude:
SUBSYSTEM=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", GROUP="dialout", MODE="0666"

No comments:

Post a Comment