-
Notifications
You must be signed in to change notification settings - Fork 40
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
Linux install of /etc/udev/rules.d/52-airspyhf.rules maybe could add group and mode #46
Comments
I'll just chime in here since I just noticed that the udev rules have been reduced to From what I can tell, the idea is that the uaccess tag will handle the permissions of the devices "automagically" through ACLs when a user logs in. From what I can tell, this is probably working for SDR applications running in userspace. The problem with the uaccess tagging is that it leaves a big hole for anything that does not run in a systemd user session, for example any application running as a systemd service unit will not be able to access the devices (unless it is run as root, which is probably not a good choice in general). I have brought this to the attention of the Debian maintainers of the libairspy packages (yes, i know that's a different library, but they introduced the same change a while back and it cause the same issues) and they have now brought back the group assignment for "plugdev" in the most recent version. See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1033121 I don't know if there's another solution to this in the systemd universe. If you know how to solve this differently, please let me know. For me, it seems there has to be at least some "classical" permissions in place for this to work correctly, so I'd recommend combining the best of both worlds, that is: having both a group assignment and uaccess tagging. |
The key takeaway from that reference is:
Which makes sense. Plus,
With 0660 mode and group "plugdev" this will be a step forward. Those still running as root (ie. Everyone following the instructions) won't be affected. Those following newer versions of instructions will benefit. (Or their system will benefit - more correctly). I'll PR it and see how this goes. |
It would be ideal if the udev rules (for both airspy and airspyhf) were submitted into upstream udevd (systemd), just like other devices do. It would prevent similar issues and make airspy work out-of-box on all modern Linux distributions (including containerized environments like Flatpak, Snap or AppImage). |
Yes that would be idea (and I believe needs a different issue opened - along with an advocate to do that work); however, that doesn't detract from this issue and its (present day) need. |
On fedora there isn't a plugdev group, and removing that reference was needed to get running on my fedora-iot hosts. There probably is a better way to handle cross-distro support though, I'm not really an expert in udev rules and would be willing to test on a fedora install. I probably should have tested on the debian side too, but I don't currently run any debian based systems |
The same modification was needed to run libairspyhf on Raspberry Pi OS 64bit. See this comment: jj1bdx/airspy-fmradion#77 (comment) |
The same modification was also needed to run libairspyhf on Ubuntu 22.04.4 LTS. |
+1 on this issue - I just spent an hour trying to workout why airspyhf_info will only run as sudo. Still a little unclear on steps from here? |
I happened upon this issue when getting OpenWebRX+ to run on my AirSPY HF+. As distributed, the v1.2.61 version udev rules generate this exception:
see also discussion at https://groups.io/g/openwebrx/topic/103545886 |
Unrelated to this repos. |
In order to remove the need to run everything accessing the AirspyHF+ via
sudo
; I'm wondering if the following is acceptable as a change to the s/w? (If so, I'll PR it). It does work.The distributed
52-airspyhf.rules
file does not specify the group id or mode for the created device file/dev/airspyhf-*
. I've addedGROUP="dialout", MODE="0660",
to the file and now I can use the AirspyHF+ withoutsudo
. My file is as follows:I picked
dialout
as the group as I was already a member. I don't know if there's a better choice (maybegpio
ornetdev
? - neither is great!)Thoughts. As I said, I'm happy to PR this.
The text was updated successfully, but these errors were encountered: