Software serial port loopback on linux -
Currently I need to develop some programs that will communicate with Cisco devices on the serial line. I want to build a testing environment on my development Linux machine. So, I got the mobility of the sync emulator, this emulator could provide the interface through the serial line with the option '-U / DEV / TTI 0'. Well, this causes mobility to open the hardware serial port and communicate through it. I can connect from this hardware serial port to another Linux machine with a serial client like MiniCom.
However, since I am using virtualboxes for both Linux machines, I am linking to serial ports through the ability to forward virtualboxes. Serial Port for Named Pipe This scheme is working, but it is very typical I am looking for a method to run mobility and minicom on a Linux machine.
I found that the pseudo terminal can be useful in my case. But I have tried to run the dynamics with'U / Dive / PTX 'and then created with minisque / dev / pts / ... port and its exact opposite. In both cases, I get input / output error on both sides.
Unfortunately, modern pseudo-terminal is not that easy posix_openpt ()
or After opening the master with open ("/ dev / ptmx")
, you must call grant ()
and to unlock ()
master Before FDC and its related slave tools are usable ( OpenPT ()
etc. Utility functions make it easy.)
As an alternative solution, anytime useful It is possible. $ PWD / PTU / Pty / Pty / Pty: $ PWD / PT-Pipe and Dynamics - U $ PWD / PTS # Terminal 2 Socket Unix: $ PWD / PTM-Pipe -
Comments
Post a Comment