Creating a virtual serial port

Solution 1:

Google has an extremely useful tool for Arduino developers and it simulates serial ports very well on OS X for testing purposes. It only works until 10.6

https://github.com/clokey/PublicCode/tree/master/MacOSXVirtualSerialPort

(previously available from http://code.google.com/p/macosxvirtualserialport/ )

Might this help you?

Solution 2:

I think what you are looking for is a Pseudo Terminal, as noted in Text-Terminal-HOWTO. It looks like Mac OS X has built in in /dev and it seems like this can do what you want to do, e.g. two programs talking together via a "virtual" serial port.

Pseudo terminals are pairs of devices such as /dev/ptyp3 and /dev/ttyp3. There is no physical device directly associated with either of them, not even a serial port connector. But if a program treats ttyp3 like it was a serial port, what is read and written to that port appears on the other member of the pair ptyp3 which another program uses to read and write to. Thus two programs talk to each other via this method and one program on ttyp3 thinks it's talking to a serial port. It's something like a "pipe" between these two tty's.

Additionally, the screen program may be useful to you as well.

Solution 3:

There are several angles to your question here:

  • Do you just want to convert NMEA tracks etc. into something Google Earth can read (and display)? GPSBabel is the tool of choice for these kind of things.
  • Do you want to attach your GPS and read its content via a serial port? Macs don't have serial ports, you will need something like Keyspan USA-19HS to connect serial devices via USB.
  • Do you want to create virtual serial devices out of curiosity? That's definitively possible but beyond my knowledge...