Welcome to SerialServer 🎉
SerialServer is a tiny server that bridges a serial device to UDP - incoming packets are written to the serial
device's input, and the serial device's output can be forwarded to a given UDP address.
The server is configured via a config file. The path to the config file can be specified via:
- the
SERIALSERVER_CONFIGenvironment variable - the first command line argument
If no path is specified, the server expects a config.toml in the current working directory.
An example configuration file could look like this:
[serial]
# The path to the serial device
device = "/dev/tty.usbmodem21201"
# The baudrate of the serial connection (defaults to 115200)
baudrate = 115200
[udp]
# The UDP port to listen on for incoming packets
listen = "127.0.0.1:6666"
# The UDP port to send the serial device's output to (optional; if omitted, nothing is sent)
send = "224.0.0.1:6666"
# The TTL for outgoing UDP packets (defaults to 0)
ttl = 0
[log]
# Whether to log the serial device's I/O to stdout (defaults to false)
enabled = trueThis server acts as a simple, stupid bridge – there is no authentication or data validation. The primary usecase for this server is to run within a docker container or similar with UDP on localhost as brigde to e.g. NodeRED.