From f2da2140512befc117421522e07d17bb698e7069 Mon Sep 17 00:00:00 2001 From: Pawel Langowski Date: Tue, 2 Apr 2024 10:20:03 +0200 Subject: [PATCH 1/3] generic-testing-stand-setup: Use yaml config for ser2net Signed-off-by: Pawel Langowski --- .../generic-testing-stand-setup.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/unified-test-documentation/generic-testing-stand-setup.md b/docs/unified-test-documentation/generic-testing-stand-setup.md index 6d0670599f..263b07c961 100644 --- a/docs/unified-test-documentation/generic-testing-stand-setup.md +++ b/docs/unified-test-documentation/generic-testing-stand-setup.md @@ -199,15 +199,19 @@ micro USB-USB converter is used to connect the DUT with RTE. [ 164.136255] usb 8-1: f81232 converter now attached to ttyUSB0 ``` -1. Then use vim to modify settings in `/etc/ser2net.conf` according to the port +1. Then use vim to modify settings in `/etc/ser2net.yaml` according to the port received from the `dmesg -w` command, in this case(`ttyUSB0`): ```sh - 13541:telnet:1200:/dev/ttyUSB0:115200 8DATABITS NONE 1STOPBIT + connection: &con1 + accepter: telnet, tcp, 13541 + connector: serialdev, /dev/ttyUSB0, 115200n81, local ``` ```sh - 13542:telnet:1200:/dev/debug_uart_converter:115200 8DATABITS NONE 1STOPBIT + connection: &con2 + accepter: telnet, tcp, 13542 + connector: serialdev, /dev/debug_uart_converter, 115200n81, local ``` 1. Check access to the DUT using the `telnet ` command. From 1dbd93694f103229b7c789a351070b27dc69986d Mon Sep 17 00:00:00 2001 From: Pawel Langowski Date: Tue, 2 Apr 2024 11:39:31 +0200 Subject: [PATCH 2/3] generic-testing-stand-setup: Creating custom device nodes Signed-off-by: Pawel Langowski --- .../generic-testing-stand-setup.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/unified-test-documentation/generic-testing-stand-setup.md b/docs/unified-test-documentation/generic-testing-stand-setup.md index 263b07c961..2eecaeaa9f 100644 --- a/docs/unified-test-documentation/generic-testing-stand-setup.md +++ b/docs/unified-test-documentation/generic-testing-stand-setup.md @@ -216,6 +216,28 @@ micro USB-USB converter is used to connect the DUT with RTE. 1. Check access to the DUT using the `telnet ` command. +In case you have multiple ttyUSB devices, you may want to assign persistent +names to them. In that case you need to define udev rules that will create the +device nodes. Create them in `/etc/udev/rules.d/51-usb-converters.rules`: + +```sh +SUBSYSTEM=="tty" ACTION=="add", ATTRS{idVendor}==, ATTRS{idProduct}==, SYMLINK+="debug_uart_converter_" +``` + +Replace `` and `` with the converter's vendor ID and product ID. + +Then, specify the name in `ser2net` config: + +```yaml +connection: &con3 + accepter: telnet, tcp, + connector: serialdev, /dev/debug_uart_converter_, 115200n81, local +``` + +You may need to change `&con3` to another number, if 3 is already taken. + +After making the changes you should reboot the platform. + In case it is not possible to read the device via serial, set up PiKVM and properly connect to the platform. PiKVM setup documentation can be found [here](https://docs.dasharo.com/transparent-validation/pikvm/assembly-and-validation/). From 35e2c5139ecf2c2754b2924bb37f9d053f4bc569 Mon Sep 17 00:00:00 2001 From: Pawel Langowski Date: Tue, 2 Apr 2024 13:30:55 +0200 Subject: [PATCH 3/3] generic-testing-stand-setup: reload udev rules + ser2net instead of rebooting Signed-off-by: Pawel Langowski --- .../generic-testing-stand-setup.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/unified-test-documentation/generic-testing-stand-setup.md b/docs/unified-test-documentation/generic-testing-stand-setup.md index 2eecaeaa9f..3e8b1a1512 100644 --- a/docs/unified-test-documentation/generic-testing-stand-setup.md +++ b/docs/unified-test-documentation/generic-testing-stand-setup.md @@ -236,7 +236,12 @@ connection: &con3 You may need to change `&con3` to another number, if 3 is already taken. -After making the changes you should reboot the platform. +After making the changes you should reload udev rules and restart the `ser2net` +service: + +```bash +udevadm control --reload-rules && udevadm trigger && systemctl restart ser2net +``` In case it is not possible to read the device via serial, set up PiKVM and properly connect to the platform. PiKVM setup documentation can be found