add README entry for udevadm usage
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
Robin Müller 2022-11-15 16:06:23 +01:00
parent cf57be14bc
commit 9ee969218c
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -1055,6 +1055,29 @@ Get fill count:
xsc_scratch read | wc -c
```
## Custom device names in Linux with the `udev` module
You can assign custom device names using the Linux `udev` system.
This works by specifying a rules file inside the `/etc/udev/rules.d` folder
which creates a SYMLINK if certain device properties are true.
Each rule is a new line inside a rules file.
For example, the rule
```txt
SUBSYSTEM=="tty", ATTRS{interface}=="Dual RS232-HS", ATTRS{bInterfaceNumber}=="01", SYMLINK+="ploc_supv
```
Will create a symlink `/dev/ploc_supv` if a connected USB device has the
same `interface` and `bInterfaceNumber` properties as shown above.
You can list the properties for a given connected device using `udevadm`.
For example, you can do this for a connected example device `/dev/ttyUSB0`
by using
```txt
udevadm info -a /dev/ttyUSB0
```
## Using `system` when debugging