File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -98,6 +98,27 @@ I assume that you have a Mango PI Pro-Q.
9898 * for [ actor configuration] ( ./server/config-sample-sml.yaml )
9999 * for [ a smart meter with modbus connection] ( ./server/config-sample-modbus.yaml )
100100
101+ ## Stabilizing device names
102+
103+ It is the recommended way to connect devices via USB. However, this usually
104+ leads to non-deterministic distribution of device names (e.g. ` /dev/ttyUSB0 ` ).
105+ This can be fixed simply by creating symlinks for the devices based on the
106+ serial numbers.
107+
108+ A file ` 10.hackdose.rules ` might contain the following entries:
109+ ```
110+ SUBSYSTEMS=="usb", ATTRS{serial}=="5432", KERNEL=="ttyUSB*", SYMLINK+="smartmeter"
111+ SUBSYSTEMS=="usb", ATTRS{serial}=="1234", KERNEL=="ttyUSB*", SYMLINK+="marstek"
112+ ```
113+
114+ You can find the serial number of your device (assumed to be named ` ttyUSB0 ` )
115+ udevadm info -a -p $(udevadm info -q path -n /dev/ttyUSB0)
116+ using the somewhat clunky command:
117+
118+ ``` bash
119+ udevadm info -a -p $( udevadm info -q path -n /dev/ttyUSB0)
120+ ```
121+
101122# Deploy
102123
103124You can use the deploy script ` install.sh ` to deploy.
You can’t perform that action at this time.
0 commit comments