How to create a virtual serial port?

Grant Edwards grante at
Sat Apr 11 19:05:21 CEST 2009

On 2009-04-11, Scott David Daniels <Scott.Daniels at Acm.Org> wrote:

>>>> ... I'm on a OS X, python 2.5.... Then the GPS program I have
>>>> running on my MAC, RouteBuddy, can read the data from that
>>>> serial port as standard.

> I'ms confused by this statement.  What physical connector does
> your "serial port" use to get the serial data to the Mac? 

The data comes in on the TCP/IP network.

The OP wants to send that data to a program called RouteBuddy.

RouteBuddy will only read data from a serial port.

The phrase "that serial port" in the text which you quote
refers to the virtual serial port that the elided text says the
OP wants to create.

The OP wants what is called a "serial port redirector" in
Windows-speak.  It's a program that routes data between a
network connection (often a TCP/IP connection that implements
RFC2217) and what appears to other programs to be a normal
serial port device API.

You can write a port redirector in user-space in MS-Windows,
but you can't in Linux/Unix.  On Unix systems you have to write
a kernel module that sits below the tty layer.  The tty layer
is what user applications talk to with open/close/read/write/ioctl


More information about the Python-list mailing list