OpenMarine
Reliably connect two Pi's with SignalK - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1)
+--- Forum: How do I...? (https://forum.openmarine.net/forumdisplay.php?fid=3)
+--- Thread: Reliably connect two Pi's with SignalK (/showthread.php?tid=3454)



Reliably connect two Pi's with SignalK - rszemeti - 2021-05-24

So,  I have two devices ...  both running OpenPlotter

device one is the "Gateway" ... it is a Pi and has NMEA200 via a PiCan-M and is my WiFi accesspoint ...


Device two is another Pi, with my Moitessier Hat and its only job in life is to serve up the various Moitessier data via SignalK to the Gateway box.

The Hat box successfully connects via WiFi to the Gateway access point, gets an address via DHCP (so far, its been the same IP) ...  The SignalK server on the Gateway box then connects to the Hat box as a data source ... so far, so good.

I've used the IP address of the "Hat" box in the config for the Gateway SignalK data source ... I'm worried at some time the DHCP lease will expire and the address will change ... is there a better way?  Should I manually configure the IP?  Should I use some sort of DNS entry   foo.local or something?  Is there some "service discovery" thing that will help?

I've noticed if they don't all come up together, I sometimes have to restart the Gateway SignlaK server process to get it to pick up the Hat data .. it seems if the Hat box is not there as it all boots up it doesn't retry to connect?  Its only done it a couple of times, that may be a red herring.