1. intro

ser2net is a Linux utility that allows serial devices to be accessed over a network.
It enables the serial port of a device to be "shared" or made accessible to other devices on the same network,
as if they were physically connected to the serial port locally.
The typical use case for ser2net is in situations where a device communicates through a serial port,
and you want to access or control that device remotely over a network.
This can be useful in various scenarios, such as industrial automation, embedded systems, or any situation where remote access to serial devices is required.
ser2net works by creating a server that listens for incoming network connections and redirects the data between the connected devices and the network clients.
It supports various serial port parameters and provides a flexible configuration to meet different needs.

2. install

yum -y install ser2net

3. config

ls -1 /dev/serial/by-id/
usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_d8ecdfefb512ec11a9c921c7bd930c07-if00-port0
vi /etc/ser2net/ser2net.yaml
#%YAML 1.1
#---
connection: &con3333
  accepter: tcp, 3333
  enable: on
  connector: serialdev, /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_d8ecdfefb512ec11a9c921c7bd930c07-if00-port0, 115200n81, local
  options:
    chardelay-min: 0
    chardelay-max: 0
    kickolduser: true
Tip do not use tabs in the config file

4. service

systemctl enable --now ser2net.service

5. homeassistant

tcp://ser2net.d01.net:3333

./pic/snap01.png