User manual https://opencpn.org/OpenCPN/info/manuals.html I pdf-dokumentet sid 189 finns följande text.
TCP
A “connection-oriented” protocol which provides a reliable link between two network
endpoints. TCP ensures that any network packets lost in transit are re-transmitted. Internet
AIS servers normally accept TCP connections as do many serial-to-network/wifi devices.
To make a connection to a remote TCP server, enter its IP address or hostname in the
“Address” box and the TCP port on which the server listens in the “DataPort” box. Many
devices use a non-standard TCP port rather than OpenCPN's standard 10110, so do check the
server's documentation.
If “0.0.0.0” is entered in the Address box, OpenCPN will act as a TCP server accepting a
connection from a remote TCP client. OpenCPN will listen on all its host computer's
network interfaces for TCP connections to the port specified in the “DataPort” field. There
should normally be no reason to select a “DataPort” value other than the standard 10110
unless multiple servers are required:
Python-klienten jag testar med:
Kod: Markera allt
#!/usr/bin/env python3
import socket
HOST = '0.0.0.0'
PORT = 10110
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.connect((HOST, PORT))
s.sendall(b'$GPGSV 4,1,14,01,29,162,10,03,81,134,13,06,30,307,,09,19,221,27*7D')
Bild från OpenCPN connections: