lkarsten / fdxread

Nexus FDX decoder for Garmin GND10
GNU General Public License v2.0
15 stars 4 forks source link

GND10read and kplex #2

Closed free-x closed 7 years ago

free-x commented 7 years ago

I usually run a kplex TCP server on port 10110, and pipe the output from nmeaformat.py to it using netcat.

Could you explain, how do you use this?

I'm trying this without success my kplex.conf

[udp]
name=system_input
direction=in
optional=yes
address=127.0.0.1
port=10110

[tcp]
name=system_output
direction=both
mode=server
port=10110

It works fine with tcp and udp cat mynmea.log | nc 127.0.0.1 cat mynmea.log | nc -u 127.0.0.1

But it doesn't work if using ./olddumpformat.py dumps/onsdagsregatta-2016-08-17.dump | ./fdxdecode.py | ./nmeaformat.py 2>/dev/null | nc 127.0.0.1 10110

Regards free-x

lkarsten commented 7 years ago

Hi.

This is the kplex config file I'm using:

[global]
checksum=no
strict=no

[tcp]
mode=server
direction=both
port=10110

and then I start kplex with: ./kplex -f tcp.conf

I've pushed a small replay tool to the repo now, that eats NMEA0183 files and pace the output. It needs a complete file right now (no stdin), but it should get you started: https://github.com/lkarsten/GND10read/blob/master/replaynmea.py

Regarding working with cat and not with the pipe chain, very strange. What error message are you seeing?

free-x commented 7 years ago

Hi,

I haven't any error message. But I'm also don't see neither any "connect" messages nor processing. :-(

Regards free-x

free-x commented 7 years ago

Thanx. I have added [global] section, as you describe and now it works

Regards free-x

lkarsten commented 7 years ago

Good to hear you got it working.

Most likely the NMEA0183 output isn't entirely correct, even if OpenCPN accepts it.

Shouldn't be necessary to reduce the strictness without good reason. I'll leave this open until I have time to hunt down the problem. (I'm guessing line feeds or checksum)

lkarsten commented 7 years ago

Hi.

I've improved the NMEA0183 output a bit in 595a4856 now, and as far as I can tell the checksum and format should be right. Can you give the new code a spin and see if it works without reducing strictness now?

lkarsten commented 7 years ago

Hi. This should be sorted now, but confirmation from you would be nice.

Let me know if you have had the chance to test.

-Lasse