Skip to content

Commit 8cdbc7b

Browse files
committed
labs: fix bryans exporter config
Signed-off-by: Paul Spooren <mail@aparcar.org>
1 parent 49986be commit 8cdbc7b

2 files changed

Lines changed: 19 additions & 5 deletions

File tree

ansible/files/exporter/labgrid-bryan/exporter.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1+
## These consoles hang off an 8-port WCH CH34x adapter whose 8 ports share ONE
2+
## USB interface (…:2:1.0), so ID_PATH / ID_SERIAL / ID_USB_INTERFACE_NUM are
3+
## identical for every port and can't select one. The stable per-port key is the
4+
## parent's sysfs attr `port_number` (== the /dev/serial/by-path -portN index),
5+
## reached with labgrid's `@` ancestor-match (udev.py match_single checks sysfs
6+
## attributes). ID_PATH scopes to this adapter; @port_number picks the channel.
7+
## (labgrid renders this file with jinja2; '#' is a statement, '##' a comment.)
18
labgrid-bryan-glinet_gl-mt6000:
29
location: labgrid-bryan
310
USBSerialPort:
4-
port: "/dev/ttyUSB1"
11+
match:
12+
ID_PATH: "platform-xhci-hcd.1-usb-0:2:1.0"
13+
"@port_number": "1"
514
speed: 115200
615
PDUDaemonPort:
716
host: localhost:16421
@@ -17,7 +26,9 @@ labgrid-bryan-glinet_gl-mt6000:
1726
labgrid-bryan-bananapi_bpi-r4:
1827
location: hsn-desk
1928
USBSerialPort:
20-
port: "/dev/ttyUSB2"
29+
match:
30+
ID_PATH: "platform-xhci-hcd.1-usb-0:2:1.0"
31+
"@port_number": "2"
2132
speed: 115200
2233
PDUDaemonPort:
2334
host: localhost:16421
@@ -33,7 +44,9 @@ labgrid-bryan-bananapi_bpi-r4:
3344
labgrid-bryan-teltonika_rut976:
3445
location: labgrid-bryan
3546
USBSerialPort:
36-
port: "/dev/ttyUSB3"
47+
match:
48+
ID_PATH: "platform-xhci-hcd.1-usb-0:2:1.0"
49+
"@port_number": "3"
3750
speed: 115200
3851
PDUDaemonPort:
3952
host: localhost:16421
@@ -44,4 +57,4 @@ labgrid-bryan-teltonika_rut976:
4457
external: "teltonika_rut976/"
4558
NetworkService:
4659
address: "192.168.1.1%vlan105"
47-
username: "root"
60+
username: "root"

ansible/files/exporter/labgrid-bryan/pdudaemon.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"pdus": {
99
"tasmota": {
1010
"driver": "tasmota",
11-
"ip": "10.35.35.91"
11+
"ip": "10.35.35.91",
12+
"port_count": 4
1213
},
1314
"192.168.128.2": {
1415
"driver": "ubus"

0 commit comments

Comments
 (0)