views:

386

answers:

1

Hello, all.

Currently I need to develop some program that will communicate with cisco devices over serial line. I want to build testing environment on my development linux machine. So, I found dynamips cisco emulator. This emulator can provide interface via serial line with '-U /dev/ttyS0' option. Well, this causes dynamips to open hardware serial port and communicate via it. I'm able to connect to this hardware serial port from another linux machine with serial client like minicom.

However, since i'm using virtualbox for both linux machines, I link serial ports via virtualbox ability to forward serial port to named pipe. This scheme seems to be working, but very redunant. I'm looking for a method to run dynamips and minicom on a single linux machine.

I found that pseudo-terminals could be useful in my case. But I've tried to run dynamips with '-U /dev/ptmx' and then connect with minicom to created /dev/pts/... port and vice versa. In both cases I've got input/output error on both sides.

+2  A: 
ephemient
Or you could use `socat` to open two ptys, and join the master ends together (then connect to one pty from `dynamips`, and the other from `minicom`).
caf
I don't have `minicom` installed, so I didn't know if it could do that. I'm reading its man page now, and it claims to work on UNIX sockets too! That would obviate the second `socat` altogether.
ephemient