USB permission errors on Ubuntu 16.04


#1

I followed the getting started instructions and setup my udev rules accordingly. However, they didn’t work for me on Ubuntu 16.04. The below worked for me, posting here in case it’ll help someone else:

In the file /etc/udev/rules.d/50-odrive.rules, I modified the text from
SUBSYSTEM=="usb", ATTR{idVendor}=="1209", ATTR{idProduct}=="0d[0-9][0-9]", MODE="0666"
to
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", MODE:="0666"


#2

Interesting. According to https://docs.oracle.com/cd/E37670_01/E41138/html/ch07s03.html the := operator prevents the value to be overridden by rules that are processed later (as opposed to the = operator).

Given this observation I believe
SUBSYSTEM=="usb", ATTR{idVendor}=="1209", ATTR{idProduct}=="0d3[1-3]", MODE:="0666"
should also work. I hesitate to recommend people to omit the idProduct constraint because vendor ID 1209 is shared by many vendors.

What other rules do you have in /etc/udev/rules.d/? I suspect there may be a rule that applies to tty[...] devices and overrides the mode. You can also try to rename 50-odrive.rules to 99-odrive.rules and change back MODE:=0666 to MODE=0666. The rules are processed in lexicographical order so this should give the ODrive rule the final say.


#3

Thanks for that link! Very very helpful, I now understand udev rules much better now.

I will check for my other rules and post here. I’ll also try adding the productid condition back into my current rule and see what happens. Thank you for the suggestions.

Why do you suggest changing the := to =? Should we want the value to not be changed by anything else? Why do you suppose it is recommended to name the file 50-odrive instead of 99-odrive?