Thursday, January 28, 2010

Serial Loopback

If you need to create unit tests that deal with serial ports or are trying to build a GPS emulator for you robot simulator, you need a way of creating a null modem device.

Socat is pretty awesome and seems to do the job. Why Linux doesn't have a native virtual serial port device remains a mystery. Windows has com0com which seems to be popular.


Rob said...

You may find that pseudo terminals are what you're looking for.

I Heart Robotics said...

Thanks for the feedback.

Do you know of any utils that make working with ptys more like working with the com0com driver?

I'm looking for something that works consistently and is scriptable for unit testing.