Simulate serial device with pty's
Hi,
I wrote software which access and reads a serial device. I would like to test this software on my computer without loop-wiring or without a second computer. How could I use pty's to simulate a serial device? Actually I would like to temporary replace the /dev/ttyS1 file by one end of the pty. How could I do this? Is there a command to create a pty pair? Thanks for any suggestions. |
The pairs are already there. Hope that the below gives you the idea what to do.
Run this first in a terminal; it will simulate your serial port Code:
minicom -p /dev/ptyp0 Code:
minicom -p /dev/ttyp0 |
Quote:
The pty pair doesn't exist on my computer. Is there a command to create such a pty pair?? In the folder /dev/pts/ there are plenty of pty ports. But the all end up in open terminal session. |
For me it worked long ago under RH7.x (or maybe it was even 6.2). I did check before I posted on my Ubuntu 8.04 box.
I can't find the links any more ( :( ) but there seem to be two styles. Maybe do a search for pmtx. Which distro are you using? |
Hi,
I'm using Linux Mint Gloriqa (Linux Ubunut 8.0 Derivat). The two devices /dev/ptyp0 and /dev/ttyp0 don't exist. There is a application called socat which can create to pseudo terminals. With this app I'm able to create a pair of ptys. |
All times are GMT -5. The time now is 09:22 AM. |