https://github.com/janekbaraniewski/ser2net2ser
Share and connect to serial devices over network!
https://github.com/janekbaraniewski/ser2net2ser
asio boost c cmake cpp devices network network-devices physical-devices ser2net serial-communication serial-communications serial-devices serial-over-ip serial-port serialport socat virtual-devices virtual-serial-port
Last synced: 4 months ago
JSON representation
Share and connect to serial devices over network!
- Host: GitHub
- URL: https://github.com/janekbaraniewski/ser2net2ser
- Owner: janekbaraniewski
- License: mit
- Created: 2024-04-25T12:08:03.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-09-09T23:30:00.000Z (9 months ago)
- Last Synced: 2025-09-10T02:54:33.968Z (9 months ago)
- Topics: asio, boost, c, cmake, cpp, devices, network, network-devices, physical-devices, ser2net, serial-communication, serial-communications, serial-devices, serial-over-ip, serial-port, serialport, socat, virtual-devices, virtual-serial-port
- Language: C++
- Homepage:
- Size: 836 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ser2net2ser
## Motivation
I've been using `socat` + `ser2net` for sharing serial devices over network for some time, mainly in my other project [kubeserial]. I've run into few limitations so I created this project to recreate the behaviour of `socat` + `ser2net` and then solve connection issues I've been having.
## Requirements
- Linux or macOS operating system
- CMake for building the project
- Docker (optional) for containerization
## Building the Project
Clone the repository and use CMake to build the project:
```bash
git clone https://github.com/janekbaraniewski/ser2net2ser.git
cd ser2net2ser
make build
```
This will compile both the server and client applications.
## Running the Server
The server needs to be connected to a serial device. It can be started with the following command:
```bash
ser2net2ser serve \
--device /dev/ttyUSB0 \
--baud 9600 \
--port 12345
```
```text
--device: Specifies the serial device.
--baud: Sets the baud rate for the serial device.
--port: TCP port on which the server will listen for incoming connections.
```

## Running the Client
The client should be run on the machine where you want the virtual serial port to be created:
```bash
ser2net2ser connect \
--server 192.168.1.100 \
--port 12345 \
--vsp "tty.usbserial-666"
```
```text
--server: IP address of the server.
--port: TCP port on which the server is running.
--vsp: Name of the virtual serial port to be created.
```

## Docker Containers
Dockerfiles for both the server and client are included. Build and run the containers using:
```bash
make build-images
```
[kubeserial]: https://github.com/janekbaraniewski/kubeserial "KubeSerial"