Creating Serial COMM-Port Simulator using Socat
Developing an application that integrates with devices like Printer, Cash Acceptor, or any other device requires us to carry the devices anywhere and anytime when we are going to work, especially when we are working in a hybrid WFH-WHO office. In this post, we will talk about Creating a Serial COMM-Port Simulator using Socat. Socat stands for SOcket CAT, its utility to transfer data between two channels with both directions. There are many different types of channels socat can connect, including: Files Pipes Devices (serial line, pseudo-terminal, etc) Sockets (UNIX, IP4, IP6 - raw, UDP, TCP) SSL sockets Proxy CONNECT connections File descriptors (stdin, etc) The GNU line editor (readline) Programs Combinations of two of these For more information about Socat you can find it on its documentations ( http://www.dest-unreach.org/socat/ ) We are going to create a Printer Simulator using Serial comm-port forwarded to TCP Servers’s Simulator using Socat and Java: First of al...