Closed macpijan closed 10 months ago
@johanes2115 You could drop here the config from PiKVM you have used.
@PLangowski I added a new connection to the default config file in order to read from ttyACM0.
@macpijan I have set up the yaml config here, but it doesn't seem to work properly for some reason. I get the following output:
# systemctl status ser2net
● ser2net.service - ser2net
Loaded: loaded (/lib/systemd/system/ser2net.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2023-09-22 05:58:53 UTC; 41s ago
Process: 192 ExecStart=/usr/sbin/ser2net -c /etc/ser2net.yaml -P /run/ser2net.pid (code=exited, status=0/SUCCESS)
Main PID: 202 (ser2net)
CGroup: /system.slice/ser2net.service
└─202 /usr/sbin/ser2net -c /etc/ser2net.yaml -P /run/ser2net.pid
Sep 22 05:58:53 rte systemd[1]: Starting ser2net...
Sep 22 05:58:53 rte ser2net[192]: Unable to start mdns: Operation not supported
Sep 22 05:58:53 rte ser2net[192]: Invalid port name/number: Invalid data to parameter on line 12 column 0
Sep 22 05:58:53 rte ser2net[192]: Invalid port name/number: Invalid data to parameter on line 16 column 0
Sep 22 05:58:53 rte systemd[1]: Started ser2net.
Online sources suggest that the Invalid port name/number
message may appear when the serial devices are not ready when the service starts, however this didn't seem to be a problem before. The service seems to be running but i don't know if it works properly. How can I test it?
If you want to test, you should connect something to the given serial port device and on your PC use telnet command with RTE IP and reelvant port, e.g.
telnet 192.168.10.228 13541
If you can access this serial over IP, it works.
If you add another USB to serial converter to RTE, you may need to adjust the device name in config, of course.
Unfortunately the config attached above is plain wrong and results in parsing error when ser2net get started, so it was not tested.
The proper relevant section of the /etc/ser2net/ser2net.yaml` looks like follows:
# Create a connection to read from /dev/ttyACM0
connection: &con00
accepter: tcp,13541
connector: serialdev,/dev/ttyACM0,115200n81,local
@macpijan I don't quite understand. My sections look like that except I changed the serial device names so that they match the previous config and I add a timeout, which I believe was the meaning behind 600
in the .conf
file. Am I missing something?
@macpijan the current configuration in the PR above has been tested and works.
Below are boot logs from Protectli Ubuntu in the lab:
[ OK ] Started Show Plymouth Boot Screen.
plymouth-start.service
[ OK ] Started Forward Password R…s to Plymouth Directory Watch.
[ OK ] Reached target Local Encrypted Volumes.
[ OK ] Found device /dev/ttyS0.
[ OK ] Found device INTEL SSDPEKNU512GZ SYSTEM.
Starting File System Check…/dev/disk/by-uuid/6C5C-F654...
[ OK ] Started File System Check Daemon to report status.
systemd-fsckd.service
[ OK ] Listening on Load/Save RF …itch Status /dev/rfkill Watch.
Starting Load/Save RF Kill Switch Status...
[ OK ] Finished File System Check…n /dev/disk/by-uuid/6C5C-F654.
systemd-fsck@dev-disk-by\x2duuid-6C5C\x2dF654.service
Mounting /boot/efi...
[ OK ] Started Load/Save RF Kill Switch Status.
systemd-rfkill.service
Starting Load Kernel Module efi_pstore...
[ OK ] Finished Load Kernel Module efi_pstore.
boot-efi.mount
[ OK ] Mounted /boot/efi.
[ OK ] Reached target Local File Systems.
Starting Load AppArmor profiles...
Starting Set console font and keymap...
Starting Tell Plymouth To Write Out Runtime Data...
Starting Set Up Additional Binary Formats...
Starting Create Volatile Files and Directories...
Starting Uncomplicated firewall...
console-setup.service
[ OK ] Finished Set console font and keymap.
Mounting Arbitrary Executable File Formats File System...
[ OK ] Finished Uncomplicated firewall.
[ OK ] Reached target Preparation for Network.
ufw.service
[ OK ] Finished Tell Plymouth To Write Out Runtime Data.
plymouth-read-write.service
[ OK ] Mounted Arbitrary Executable File Formats File System.
[ OK ] Finished Set Up Additional Binary Formats.
[ OK ] Finished Create Volatile Files and Directories.
Starting Userspace Out-Of-Memory (OOM) Killer...
proc-sys-fs-binfmt_misc.mount
systemd-binfmt.service
systemd-tmpfiles-setup.service
Starting Network Name Resolution...
Starting Network Time Synchronization...
Starting Record System Boot/Shutdown in UTMP...
[ OK ] Finished Record System Boot/Shutdown in UTMP.
systemd-update-utmp.service
[ OK ] Finished Load AppArmor profiles.
apparmor.service
Starting Load AppArmor pro…managed internally by snapd...
[ OK ] Finished Load AppArmor pro…s managed internally by snapd.
snapd.apparmor.service
[ OK ] Started Userspace Out-Of-Memory (OOM) Killer.
systemd-oomd.service
[ OK ] Started Network Time Synchronization.
systemd-timesyncd.service
[ OK ] Reached target System Initialization.
[ OK ] Started ACPI Events Check.
[ OK ] Started CUPS Scheduler.
[ OK ] Started Start whoopsie on …n of the /var/crash directory.
[ OK ] Started Daily Cleanup of Temporary Directories.
[ OK ] Started Ubuntu Advantage Timer for running repeated jobs.
[ OK ] Reached target Path Units.
[ OK ] Reached target System Time Set.
[ OK ] Started Trigger anacron every hour.
[ OK ] Started Daily apt download activities.
[ OK ] Started Daily apt upgrade and clean activities.
[ OK ] Started Daily dpkg database backup timer.
[ OK ] Started Periodic ext4 Onli…ata Check for All Filesystems.
[ OK ] Started Discard unused blocks once a week.
[ OK ] Started Refresh fwupd metadata regularly.
[ OK ] Started Daily rotation of log files.
[ OK ] Started Daily man-db regeneration.
[ OK ] Started Message of the Day.
[ OK ] Listening on ACPID Listen Socket.
[ OK ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[ OK ] Listening on CUPS Scheduler.
[ OK ] Listening on D-Bus System Message Bus Socket.
Starting Socket activation for snappy daemon...
[ OK ] Listening on UUID daemon activation socket.
[ OK ] Started Network Name Resolution.
systemd-resolved.service
[ OK ] Listening on Socket activation for snappy daemon.
[ OK ] Reached target Host and Network Name Lookups.
[ OK ] Reached target Socket Units.
[ OK ] Reached target Basic System.
Starting Accounts Service...
[ OK ] Started ACPI event daemon.
acpid.service
[ OK ] Started Run anacron jobs.
anacron.service
Starting LSB: automatic crash report generation...
Starting Avahi mDNS/DNS-SD Stack...
Starting Bluetooth service...
[ OK ] Started Regular background program processing daemon.
cron.service
[ OK ] Started D-Bus System Message Bus.
dbus.service
Starting Network Manager...
[ OK ] Started Save initial kernel messages after boot.
dmesg.service
Starting Remove Stale Onli…t4 Metadata Check Snapshots...
Starting Detect the availa…eal with any system changes...
Starting Record successful boot for GRUB...
[ OK ] Started irqbalance daemon.
irqbalance.service
Starting Dispatcher daemon for systemd-networkd...
Starting Authorization Manager...
Starting Power Profiles daemon...
Starting System Logging Service...
snapd.aa-prompt-listener.service
[ OK ] Started Userspace listener for prompt events.
[ OK ] Reached target Preparation for Logins.
Starting Snap Daemon...
Starting Switcheroo Control Proxy service...
Starting User Login Management...
Starting Thermal Daemon Service...
Starting Disk Manager...
Starting WPA supplicant...
[ OK ] Started System Logging Service.
rsyslog.service
[ OK ] Started Avahi mDNS/DNS-SD Stack.
avahi-daemon.service
[ OK ] Started WPA supplicant.
wpa_supplicant.service
apport.service
thermald.service
[ OK ] Started LSB: automatic crash report generation.
[ OK ] Started Thermal Daemon Service.
[ OK ] Finished Record successful boot for GRUB.
Starting GRUB failed boot detection...
[ OK ] Finished Detect the availa… deal with any system changes.
[ OK ] Finished GRUB failed boot detection.
[ OK ] Started Authorization Manager.
polkit.service
Starting Modem Manager...
[ OK ] Started Network Manager.
[ OK ] Reached target Network.
Starting Network Manager Wait Online...
Starting CUPS Scheduler...
Starting OpenVPN service...
NetworkManager.service
Starting OpenBSD Secure Shell server...
Starting Permit User Sessions...
[ OK ] Finished OpenVPN service.
openvpn.service
[ OK ] Finished Permit User Sessions.
systemd-user-sessions.service
power-profiles-daemon.service
switcheroo-control.service
[ OK ] Started Power Profiles daemon.
[ OK ] Started Switcheroo Control Proxy service.
Starting GNOME Display Manager...
Starting Hold until boot process finishes up...
Starting Hostname Service...
[ OK ] Finished Remove Stale Onli…ext4 Metadata Check Snapshots.
[ OK ] Started OpenBSD Secure Shell server.
ssh.service
bluetooth.service
[ OK ] Started Bluetooth service.
[ OK ] Reached target Bluetooth Support.
cups.service
[ OK ] Started CUPS Scheduler.
[ OK ] Started Accounts Service.
accounts-daemon.service
[ OK ] Started User Login Management.
systemd-logind.service
[ OK ] Started Unattended Upgrades Shutdown.
[ OK ] Started GNOME Display Manager.
unattended-upgrades.service
gdm.service
[ OK ] Started Modem Manager.
ModemManager.service
udisks2.service
systemd-hostnamed.service
networkd-dispatcher.service
NetworkManager-dispatcher.service
run-user-128.mount
user-runtime-dir@128.service
alsa-restore.service
user@128.service
rtkit-daemon.service
run-user-128-gvfs.mount
tmp-syscheck\x2dmountpoint\x2d2207654072.mount
snapd.service
systemd-timedated.service
upower.service
snapd.seeded.service
run-user-128-doc.mount
run-snapd-ns.mount
systemd-localed.service
run-snapd-ns-snapd\x2ddesktop\x2dintegration.mnt.mount
packagekit.service
geoclue.service
colord.service
fprintd.service
Ubuntu 22.04.2 LTS 3mdeb ttyS0
3mdeb login:
I think the problem in this comment was caused by faulty RTE. That one did not even work with the old config - there was no output.
I changed the RTE to a different one. I connected it via USB-UART to another platform. I flashed it with the image from my branch, then from within Linux I changed /dev/ttyS1
to /dev/ttyUSB0
in ser2net.yaml
, so that I would get output from USB-UART. The parse errors did not appear:
# systemctl status ser2net
● ser2net.service - ser2net
Loaded: loaded (/lib/systemd/system/ser2net.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2023-09-27 11:42:43 UTC; 1 day 23h ago
Process: 196 ExecStart=/usr/sbin/ser2net -c /etc/ser2net.yaml -P /run/ser2net.pid (code=exited, status=0/SUCCESS)
Main PID: 206 (ser2net)
CGroup: /system.slice/ser2net.service
└─206 /usr/sbin/ser2net -c /etc/ser2net.yaml -P /run/ser2net.pid
Sep 27 11:42:43 rte systemd[1]: Starting ser2net...
Sep 27 11:42:43 rte ser2net[196]: Unable to start mdns: Operation not supported
Sep 27 11:42:43 rte systemd[1]: Started ser2net.
Then I was able to get output from the other platform by connecting to the tcp port from my host PC.
$ telnet 192.168.4.134 13541
Trying 192.168.4.134...
Connected to 192.168.4.134.
Escape character is '^]'.
U-Boot SPL 2023.01-g62e2ad1 (Jan 09 2023 - 16:07:33 +0000)
DRAM: 1024 MiB
CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from MMC1
U-Boot 2023.01-g62e2ad1 (Jan 09 2023 - 16:07:33 +0000) Allwinner Technology
DRAM: 1 GiB
Core: 51 devices, 19 uclasses, devicetree: separate
WDT: Not starting watchdog@1c20c90
MMC: mmc@1c0f000: 0
Loading Environment from FAT... OK
Unknown monitor
Unknown monitor
In: serial
Out: serial
Err: serial
Unknown command 'usb' - try 'help'
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
1439 bytes read in 1 ms (1.4 MiB/s)
## Executing script at 43100000
Saving Environment to FAT... OK
Saving Environment to FAT... OK
27044 bytes read in 3 ms (8.6 MiB/s)
11170224 bytes read in 464 ms (23 MiB/s)
## Booting kernel from Legacy Image at 42000000 ...
Image Name: Linux-6.1.9
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 11170160 Bytes = 10.7 MiB
Load Address: 40008000
Entry Point: 40008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 43000000
Booting using the fdt blob at 0x43000000
Working FDT set to 43000000
Loading Kernel Image
Loading Device Tree to 49ff6000, end 49fff9a3 ... OK
Working FDT set to 49ff6000
DE is present but not probed
Starting kernel ...
(...)
So in my opinion, that was an issue with a bad RTE, not with my config. I could check more RTEs if you think that is necessary.
I could check more RTEs if you think that is necessary.
@PLangowski there is no need for that; I merged changes
The config has been updated in v0.7.4. Can we close this issue?
meta-rte version
v.0.7.1
Affected component(s) or functionality
ser2net
Brief summary
ser2net switched to yaml config since v4.0.0 version
How reproducible
100%
How to reproduce
Steps to reproduce the behavior:
Expected behavior
No errros / warnings regarding the config are displayed
Actual behavior
May 26 11:56:29 rte ser2net[179]: ser2net:WARNING: Using old config file format, this will go away May 26 11:56:29 rte ser2net[179]: soon. Please switch to the yaml-based format.
Screenshots
N/A
Additional context
N/A Solutions you've tried