- Install
sudo apt-get -y libyaml-dev libgensio-dev
sudo apt-get -y install ser2net
- configure file
test.yaml
#%YAML 1.2 # Use YAML version 2
define: &banner \r\nser2net port \p device \d [\B] (Debian GNU/Linux)\r\n\r\n
connection: &conn0
accepter: telnet(rfc2217),tcp,4001
enable: on
options:
max-connections: 4
banner: *banner
kickolduser: true
telnet-brk-on-sync: true
connector: serialdev,/dev/ttyUSB0,115200n81,local
Replace ttyUSB0 by your Serial port
- On the Beaglebone side
ser2net -l -n -c ./test.yaml
- On client side
nc 10.66.77.28 4001
where 10.66.77.28 is the IP or domain of BB Note that: nc require enter to flush the msg through tcp. You should enter after input sothat the msg can be sent
- cp
test.yaml
above to/etc/ser2net.yaml
- Note that the default service(/lib/systemd/system/ser2net.service) one don't have the constraint to start after network service. So need modify it before run
[Unit]
Description=Serial port to network proxy
Documentation=man:ser2net(8)
After=network-online.target
Wants=network-online.target
[Service]
EnvironmentFile=-/etc/default/ser2net
ExecStart=/usr/sbin/ser2net -n -c $CONFFILE -P /run/ser2net.pid
Type=exec
Restart=on-failure
[Install]
WantedBy=multi-user.target
- run
sudo systemctl enable ser2net
sudo systemctl restart ser2net
sudo systemctl status ser2net
- Overview
--------------------------------------------------- ----------------------------------
| | | Remote PC |
USB_UART--->| ttyUSB0 <--->Soc Linux (ser2net listen on 4001) |<-----Network<--------| rfc2217(tcp_client) to VCOM |
| | | |
--------------------------------------------------- ----------------------------------
- Free Software:
- CMD line tool: com0com and hub4com
- GUI Tool: USR-VCOM(Virtual Serial Software V3.7.2.525)
- Paid Software with Trial:
- Serial to Ethernet Connector
- HW VSP3 - Virtual Serial Port
- Client-Server Application (Single port- free)
- Standalone Application (Multiple port -Charge fee)