A few weeks ago I acquired a dAISy HAT in order to investigate the issue from the thread started by Richard Montgomery about sending data to Marinetraffic. I agree it's a super-cute device which in the flat I'm renting is sat atop a pi 2 and gathering data from passing Thames traffic. I'm still trying to work out the relationship between Marinetraffic's email notifications and traffic but I've learned a few things and sometime in the next few weeks will try and write those up.
To specifically address your question...
/dev/serial0 is a serial device and tcpdump works on network devices so it's not the tool you need. In fact it's much easier than that. If you have an ssh login to your pi, login in, stop kplex, then assuming your kplex.conf looks as it does above type:
kplex file:
kplex will add any interfaces you put on the command line to what is in the config file and you already have the serial interface in the config file. "file:" without a filename argument and not direction argument will use standard input/output so what you should see is the same messages you saw using "screen".
Kill that with ctrl-C and you're ready for the next step. Not interested in the detail and just want a config which works? Add this to kplex.conf after the serial interface, reboot and looks for the pleasing green "Active" symbol on marinetraffic:
[udp]
address=<address marinetraffic gave you>
port=<port they gave you>
coalesce=yes
direction=out
..but for added interest read on..
You can connect to marinetraffic via tcp or udp. If you go tcp you want something which at a basic level looks like this:
[tcp]
address=<ip address marinetraffic gave you>
port=<port they gave you>
persist=fromstart
But things start to get a little more complex if you don't transmit much data. Now you'd think that:
direction=out
..makes sense, right? But here's the problem. Because of an implementation detail, kplex only detects that an out-only connection has been dropped when it tries to send data but can't. Marinetraffic reboot their services at regular intervals (hourly in the one I have, though I understand different machines on different occasions are restarted 3-hourly or 6-hourly). If you have an outbound-only connection which is reset when marinetraffic reboots but you don't send any data for another hour kplex won't restart the connection, so you think you're "online no data" but marintraffic thinks you're "offline". So what can you do? If you leave out "direction=out" then the "read" side of the connection *will* respond immediately to a dropped connection and restart the interface. You might want to filter out all input though with:
ifilter=-all
The alternative is to give kplex something to send at regular intervals. Not in 1.4 but in the current develop tree, you can configure a legal-but-meaningless sentence to be sent out of an interface at regular intervals (e.g. every 4 mins) with:
heartbeat=240
The other danger of low data rates for stations behind NAT routers is that some of them only maintain connection state for 5 mins, so if you get a lull in traffic the connection can time out. "persist=fromstart" has a side effect of initialising tcp keepalives, packets which are sent simply to check the other end is still there but which have a side effect of keeping connections open over stateful firewalls and NAT routers. kplex sets the period before these are sent much lower than the system default but for NAT routers with a 5 minute timeout it's still too long so you'd want to add:
keepidle=240
...to set the inactive period before keepalives are sent at 4 minutes (240 seconds).
So what would I do behind a NAT router with an unknown timeout with kplex 1.4? perhaps:
[tcp]
address=<ip address marinetraffic gave you>
port=<port they gave you>
persist=fromstart
ifilter=-all
keepidle=240
If using the devlop tree I'd replace ifilter=all and keepidle=240 with
heartbeat=240
direction=out
But actually I'd prefer to go with the UDP option above. It's lower overhead and there are fewer pitfalls. The only downside for a low-data station is that if you don't transmit for an hour you're marked "offline" rather than "online no data", although in my experiments you can keep yourself "online no data" using the heartbeat option (again, not in the "production" 1.4 version), e.g.
heartbeat=900