Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USBError UDEV rules? #11

Open
assada opened this issue Jul 4, 2023 · 3 comments
Open

USBError UDEV rules? #11

assada opened this issue Jul 4, 2023 · 3 comments

Comments

@assada
Copy link

assada commented Jul 4, 2023

$ python3 -m radiacode-examples.basic

usb.core.USBError: [Errno 13] Access denied (insufficient permissions)
$ lsusb

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0483:f123 STMicroelectronics RadiaCode-101
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ cat /lib/udev/rules.d/50-radiacode.rules

# Radiacode-10X radiation detector
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="f123", ATTRS{manufacturer}=="AngioScan", TAG+="uaccess", MODE="0660"
@cdump
Copy link
Owner

cdump commented Jul 8, 2023

What is your OS, is it systemd-based?

This udev rule should work

@assada
Copy link
Author

assada commented Jul 9, 2023

RPI4 Debian based latest raspbian os

$ lsb_release -a 
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye
$ uname -a
Linux home-serve 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux

I removed the manufacturer and set MODE="0777" and now its ok for me

$ cat /lib/udev/rules.d/50-radiacode.rules
# Radiacode-10X radiation detector
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="f123", TAG+="uaccess", MODE="0777"

@ckuethe
Copy link
Contributor

ckuethe commented Nov 27, 2023

It does appear that the manufacturer name has changed, so removing the manufacturer condition is a good choice.

You don't need to set the x permissions, so 0666 is wide open. If you check your group membership (with id or groups) combined with udev matching on just the usb id, you shouldn't need to make it wide open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants