Using gensio and ser2net
gensio and the related ser2net are generic tools for communication. With gensio, you can set up a sort of pipeline of communication, using sockets, files, stdin/stdout, serial lines, external programs, and so forth. It is akin to a more powerful version of socat, netcat, redir, or stunnel. Generally, with gensio and ser2net, you can: Provide services that are started from inetd, init, or systemd Convert an unpacketized link (such as a serial port) into a packetized interface Convert an unreliable packetized link (such as UDP or a gensio-packetized serial interface) into a reliable link Add encryption and authentication to any link A communication pipeline is called a “gensio stack” and is given in a string format, separated by commas.