Skip navigation.

FreeBSD - Linux C Based Program to Read a Serial Port

Back in 2007 or so I wrote a C program to read my TP-200 serial port based GPS unit.  I was supprised to find that in 2012, the same program would compile on a Raspberry Pi Linux environment!  Go POSIX programming.

Attached is the C code file and my Makefile I use to compile it.  Use at your own risk.  It works for me, but maybe not you?  To use it, I just run  ./gps > gps_data_file-20121121.txt  and a number of lines will be written to the file each second.

AttachmentSize
gps.c1.77 KB
Makefile456 bytes