Is it possible to configure Kplex to read the info from the USR-TCP232-410 IP Address?
Whilst I can telnet directly (using telnet 172.16.10.254 10110) to the serial-to-Ethernet device from the Raspberry Pi and see the nmea data, how do I tell that data is being received by Kplex on the Raspberry Pi in order to output it to other sources?
#Marinetraffic[tcp]address=5.9.207.224port=5986persist=yesdirection=yes
Could it be that kplex is starting up before the network has been fully initiated?
Do the recent versions now use systemd?
what version are you running on your Pi?
in that in the main script /etc/init.d/kplex file?
Apr 12 08:30:28 AISPi kplex[527]: Starting kplex multiplexer: kplexkplex DEBUG: Using config file /etc/kplex.conf
Apr 12 08:30:28 AISPi systemd[1]: Starting Terminate Plymouth Boot Screen...
Apr 12 08:30:28 AISPi kplex[527]: .
Apr 12 08:30:28 AISPi kplex[527]: kplex DEBUG: kplex starting, config file /etc/kplex.conf
Apr 12 08:30:28 AISPi kplex[527]: Failed to open tcp connection for 172.16.10.254/10110
Apr 12 08:30:28 AISPi kplex[527]: Failed to initialize Interface _tcp-id1
Apr 12 08:30:28 AISPi systemd[1]: Started LSB: Start kplex NMEA 0183 multiplexer.
Apr 12 08:30:28 AISPi systemd[1]: Started Wait for Plymouth Boot Screen to Quit.
Apr 12 08:30:28 AISPi ntpd[543]: ntpd 4.2...@1.2349-o Mon Nov 2 04:29:47 UTC 2015 (1)
Apr 12 08:30:28 AISPi systemd[1]: Started Terminate Plymouth Boot Screen.
When I issue the commands to stop and start the service, I get the following in the log.
Apr 12 08:35:20 AISPi systemd[1]: Starting LSB: Start kplex NMEA 0183 multiplexer...
Apr 12 08:35:20 AISPi kplex[902]: Starting kplex multiplexer: kplexkplex DEBUG: Using config file /etc/kplex.conf
Apr 12 08:35:20 AISPi kplex[902]: .
Apr 12 08:35:20 AISPi systemd[1]: Started LSB: Start kplex NMEA 0183 multiplexer.
Apr 12 08:35:20 AISPi kplex[902]: kplex DEBUG: kplex starting, config file /etc/kplex.conf
Apr 12 08:35:20 AISPi kplex[902]: kplex DEBUG: _tcp-id1: initialised
Apr 12 08:35:20 AISPi kplex[902]: kplex DEBUG: _tcp-id2: initialised
Apr 12 08:35:20 AISPi kplex[902]: kplex DEBUG: _tcp-id3: initialised
Will give that a try in the morning when I get in to work. Incidentally, where does the log file be kept? Apologies for my lack of programming knowledge. New to all this.
Apr 12 08:30:28 AISPi kplex[527]: kplex DEBUG: kplex starting, config file /etc/kplex.conf
Apr 12 08:30:28 AISPi kplex[527]: Failed to open tcp connection for 172.16.10.254/10110
Apr 12 08:30:28 AISPi kplex[527]: Failed to initialize Interface _tcp-id1
Also tried the persist=fromstart
start)
log_daemon_msg "Starting kplex multiplexer" "kplex"
start)
log_daemon_msg "Starting kplex multiplexer" "kplex"
(date; ifconfig -a ; netstat -rn --inet) >> /var/log/kplexlog 2>&1
Wed 13 Apr 09:58:22 UTC 2016
eth0 Link encap:Ethernet HWaddr b8:27:eb:be:d6:3b
inet addr:169.254.238.120 Bcast:169.254.255.255 Mask:255.255.0.0
inet6 addr: fe80::db71:a826:4655:d101/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:5078 (4.9 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
This is the second part of the same log AFTER the Pi has connected to the DHCP Server and I have stopped and restarted the kplex service. tcpdump data displayed.
Wed 13 Apr 10:04:33 UTC 2016
eth0 Link encap:Ethernet HWaddr b8:27:eb:be:d6:3b
inet addr:172.16.10.251 Bcast:172.16.255.255 Mask:255.255.0.0
inet6 addr: fe80::db71:a826:4655:d101/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:37783 errors:0 dropped:851 overruns:0 frame:0
TX packets:122 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:11309286 (10.7 MiB) TX bytes:15919 (15.5 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:136 errors:0 dropped:0 overruns:0 frame:0
TX packets:136 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11472 (11.2 KiB) TX bytes:11472 (11.2 KiB)
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 172.16.0.1 0.0.0.0 UG 0 0 0 eth0
172.16.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
This is the kplexlog file when pi rebooted. As you can see, the interface starts up with the 169.x.x.x. IP Range as the Pi hasn't fully connected to the DHCP Server. No tcpdump data
Meant to get back to you on that one. Which tcp section do I put that under?