In order to receive the data, we must prepare a listener on the destination IP address (this is not covered in detail in this article). In our case we simply use netcat, always monitoring the 60001 port (make sure the chosen port is not already in use). Obviously it will be sufficient to modify the command with the desired serial and IP:port address.Īnother possible use is the binding (union) of two different serials: socat PTY,link =/dev/ttyS10 PTY,link =/dev/ttyS11 Open a terminal and acquire ROOT privileges (important).Įxecute this command to initialise the forwarding of incoming packets to the serial port. Socat is a very useful tool that is already present in many Linux distros, enabling you to manipulate and forward network packets. It is possible to view the list of virtual serial numbers available in the system with the following command: dmesg | grep tty Let’s see how to forward data from a virtual serial to a network address.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |