Help fixing device permissions for A000092 usb programmer board, in Ubuntu

The problem seems to be that the device permissions are not being correctly set by udev when the board is plugged into the pc's usb connector.

If I run the Arduino IDE as root, it lets me use the ISP R3 usb programmer board. Not convenient for sketchbook management!

I can temporarily fix this problem by opening terminal, and typing

lsusb

to bring up a list of attached usb devices, then type

sudo chmod 666 /dev/bus/usb/006/005

(or whatever the bus/device number happens to be at the time), which lets me as an ordinary user write to the device from the IDE. So for now, I keep using this temporary fix.

Meanwhile, I have tried following the instructions at https://andreasrohner.at/posts/Electronics/How-to-fix-device-permissions-for-the-USBasp-programmer/ , in order to make a udev rule that should fix this, but no success yet.

I have created a new file called /etc/udev/rules.d/99-USB_ISP_R3.rules , which reads like this:

# UDEV rule for Arduino ISP R3 programmer board,
# to prevent having to run Arduino IDE as root to get it to program.
# Copy this file to /etc/udev/rules.d so

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", SYSFS{idVendor}=="1781", SYSFS{idProduct}=="0C9f", MODE="0666"

and executed

gpasswd -a <username> uucp

but to no avail; I still have to use the temporary fix.

Please can anyone shine some light on this problem? Is there a patch for this anywhere?

Thanks, Matt.

Try to use this rule

SUBSYSTEMS=="usb", ATTRS{idVendor}=="1781", ATTRS{idProduct}=="0C9f", GROUP="plugdev", MODE="0666"

You have to add user into plugdev group.
Restart udev service

service udev restart

udevadm control --reload-rules

Disconnect/reconnect device and it should work.

Thanks Budvar10 for replying.

I've changed the rule as you suggested, added my username to the plugdev group, restarted the udev process, and even rebooted.

Sadly, the problem still remains:

avrdude: Warning: cannot open USB device: Permission denied
avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)

So it's back to the temporary patch for now... :confused:

Rule file has to be readable by all users [-rw-r--r-- 1 root root]. Make sure that the user is in the group (id command).
Which OS do you use?

Thanks for your persistence; I've checked your points above and the problem remains.

Here's the rule file listed in /etc/udev/ruled.d/* :

-rw-r--r-- 1 root root  371 Mar 21 13:03 99-USB_ISP_R3.rules

Should it be named differently, I wonder?

My username is in the group plugdev.

I'm using Ubuntu 14.04 LTS.

Thanks again.

Hmm, hard to say. You should check the syslog and others. I'm not sure about the rule file name, I know that the number is required and means the order of use and also suffix .rules is required. Maybe underscore in the name is the problem? I'm usiing the same for the USBasp on Mint and it works for me fine but have no experience with the Arduino ISP R3. SYSFS parameter is deprecated in newer lnxs and ATTRS have to be used instead. Try to read this Arduino Playground - All.

This is working for me on Linux Mint 17.3 using Arduino IDE 1.6.7.
I have two different USBtiny Programmer, one uses the 6 and 10 lead cable and the other uses 6 leads and a micro usb connection.
Both identify as:

lsub
Bus 009 Device 009: ID 1781:0c9f Multiple Vendors USBtiny
/etc/udev/rules.d/99-USBtiny
SUBSYSTEM=="usb", ATTR{idVendor}=="1781", ATTR{idProduct}=="0c9f", GROUP="adm", MODE="0666"

Sorry

Should have been

/etc/udev/rules.d/99-USBtiny.rules