Commit 75696630 authored by Stefan Brüns's avatar Stefan Brüns Committed by Uwe Hermann

cleanup udev part of README.devices, reflect split rules

Remove vague statements from the README. On all current distributions,
the udev paths are identical, anyone deliberately deviating from the
defaults should be able to handle it by themselves.

Rules in /etc/udev/rules.d/ should only be used for customization, or
for locally built packages.
parent f19fc2af
...@@ -213,33 +213,39 @@ For USB-to-serial based devices, we recommended using our udev rules file ...@@ -213,33 +213,39 @@ For USB-to-serial based devices, we recommended using our udev rules file
(see below for details). (see below for details).
Permissions for USB devices (udev rules file) Permissions for USB devices (udev rules files)
--------------------------------------------- ----------------------------------------------
When using USB-based devices supported by libsigrok, the user running the When using USB-based devices supported by libsigrok, the user running the
libsigrok frontend (e.g. sigrok-cli) has to have (read/write) permissions libsigrok frontend (e.g. sigrok-cli) has to have (read/write) permissions
for the respective USB device. for the respective USB device.
On Linux, this is accomplished using either 'chmod' (not recommended) or On Linux, this is accomplished using udev rules. libsigrok ships a rules
using the udev rules file shipped with libsigrok (recommended). file containing all supported devices which can be detected reliably
(generic USB-to-serial converters are omitted, as these are used for a wide
range of devices, e.g. GPS receivers, which are not handled by libsigrok).
The file is available in contrib/z60_libsigrok.rules. It contains entries The file is available in contrib/60-libsigrok.rules. This file just contains
for all libsigrok-supported (USB-based) devices and changes their group the list of devices and flags these devices with ID_SIGROK="1". Access is
to 'plugdev' and the permissions to '664'. granted by the 61-libsigrok-plugdev.rules or 61-libsigrok-uaccess.rules files,
allowing access to members of the plugdev group or to currently logged in
users, respectively.
When using a libsigrok package from your favorite Linux distribution, the When using a libsigrok package from your favorite Linux distribution, the
packager will have already taken care of properly installing the udev file files should already be installed in /usr/lib/udev/rules.d/, i.e.
in the correct (distro-specific) place, and you don't have to do anything. 60-libsigrok.rules and one of the access granting rules files. Use of
The packager might also have adapted 'plugdev' and '664' as needed. 61-libsigrok-uaccess.rules is encouraged on systemd distributions.
The access policy can be locally overridden by placing appropriate rules in
/etc/udev/rules.d/, disabling or ammending the default policy. See the
udev documentation, e.g. man 7 udev, for details.
If you're building from source, you need to copy the file to the place If you're building from source, you need to copy the file to the place
where your distro expects such files. This is beyond the scope of this README, where udev will read these rules. Local rules should go to /etc/udev/rules.d.
but generally the location could be e.g. /etc/udev/rules.d, or maybe Keep the file naming, otherwise interaction between the libsigrok rules and
/lib/udev/rules.d, or something else. Afterwards you might have to restart rules shipped by the system will be broken.
udev, e.g. via '/etc/init.d/udev restart' or similar, and you'll have to
re-attach your device via USB.
Please consult the udev docs of your distro for details. Please consult the udev docs for details.
Cypress FX2 based devices Cypress FX2 based devices
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment