-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to connect fdxread to nmea sleuth/opencpn (Was: netcat) #6
Comments
Hi. Not a whole lot of documentation ready, but let me try to explain. These NMEA consuming programs are often made to either read from serial ports or from a TCP socket. (virtual) Serial ports can only be opened by one program at the time, and are complicated beasts, so I don't want to do that. Making a TCP server that they can connect to and receive NMEA0183 over, is certainly possible. Netcat ("nc") is a program for creating and communicating over TCP sockets. By piping the output from stdout into netcat, we can ship the data over the network. In this case we just want to ship it to another server on localhost, that does the "fan-out" to multiple reading programs when/if they connect. My current favourite for such multiplexing/fan-out is kplex by Keith Young. See http://www.stripydog.com/kplex/ . Kplex, after installed, can be started with the following command:
This creates a listening TCP server on 10110, where connecting clients can write data in (which is sent to all other clients) and read what the others have said. If a client disconnects, the others remain. In a shell, run To verify that this part works you can use a new shell/window and connect manually to kplex: Now NMEA Sleuth can be configured to connect to kplex just like our verification netcat. Options -> Settings. Pick the "NMEA" tab, set "Source" to "IP Address", and fill out the IP and port on the right panel. IP address is 127.0.0.1, and port is 10110. Press Save, and then start it with the "open" button on the main screen. Right now the position, depth and date are being read correctly. I think For OpenCPN 4.4.0, it is mostly the same procedure. Options -> Connections -> "Add connection" of type "Network" using TCP to 127.0.0.1 and (here: dataport) 10110. Note that OpenCPN will write waypoint NMEA back into kplex if you have an active route, which may be picked up by NMEA Sleuth and others. I haven't looked at it in detail. A workaround is to make kplex have a direction=out port in addition that opencpn connects to. Anyway, that was a short getting started guide. Hope it helps. |
Looking good! :) |
From a dump file, I tried to pipe fdxread nmea output with only $GPRMC to OpenCPN or Chrome extension NMEA Sleuth without success.
Can you insert in the documentation an example ?
Thanks
The text was updated successfully, but these errors were encountered: