You are not logged in.

#1 2015-10-25 00:30:40

rgkaizen
Member
Registered: 2015-09-25
Posts: 8

Adding udev rules for USB device

Hi everyone,

I'm trying to hit my Ardunio using PyUSB but I get the following error
usb.core.USBError: [Errno 13] Access denied (insufficient permissions)

lsusb shows me ardunio as:
Bus 004 Device 007: ID 2341:8036 Arduino SA Leonardo (CDC ACM, HID)

Googling suggests that I'm missing a udev rule to give everyone permission to the Ardunio so I tried adding a new file /etc/udev/rules.d/99-Ardunio.rules
SUBSYSTEM=="sub",
ATTRS{idVendor}=="2341",
ATTRS{idProduct]=="8036",
MODE="0666",
GROUP="usbusers"

Did sudo udevadm trigger to update udev with the new rule (Is that right?)

Same issue. Where do I go from here?

Offline

#2 2015-10-25 00:41:04

loqs
Member
Registered: 2014-03-06
Posts: 17,450

Re: Adding udev rules for USB device

SUBSYSTEM=="sub",

should that not be

SUBSYSTEM=="usb",

Offline

#3 2015-10-25 01:31:22

rgkaizen
Member
Registered: 2015-09-25
Posts: 8

Re: Adding udev rules for USB device

You're right, that's my mistake.

So, relogged in before making that change and the issue has been resolved. I think adding myself to the usbusers group (and adding that the udev as it wasn't there at 3pm today) solved the issue.

Thank you!

Offline

#4 2015-10-25 02:59:14

mpan
Member
Registered: 2012-08-01
Posts: 1,216
Website

Re: Adding udev rules for USB device

Until you have a reason to not do so, I would suggest limiting the privilege to the particular instance of Arduino. "ATTRS{serial}" is what you're searching for. Use `udevadm info -a device` to obtain it. Note, however, that udev allows you to use attributes only from one parent device, so if idVendor or idProduct don't come from the same device as serial, you will not be able to construct a corresponding rule.


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

Board footer

Powered by FluxBB