Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
nmea0183-serial is an extremely simple program that opens a serial port using POSIX system calls and then sends out the data received on stdout. As such it is very much written in the UNIX filter style of programming.
It is commonly used together with iptee and other receivers of this data to send the received data to consumers.
MARINETRAFFIC="-u 18.104.22.168 6047" AISHUB="-u 22.214.171.124 2112" nmea0183-serial -r -d /dev/ttyUSB0 | iptee $MARINETRAFFIC $AISHUB
As said this program is very simple. Simplistic even -- it can't even switch baud rate to a different value than 38,400.
Usage: nmea0183-serial [-r] [-d] device -r : read-only, do not pass stdin to stdout -d : debug mode Example: nmea0183-serial /dev/ttyUSB0
You may wonder about the
-r option; it is used if you want to combine multiple serial ports and/or data from other sources. If you have, for instance, two serial ports you could do this:
nmea0183-serial -r /dev/serial-0 | nmea0183-serial /dev/serial-1 > combined-serial-data.log