Configuring NMEA0183 traffic between a talker and listener using TCP or UDP requires understanding that standard NMEA0183 is serial-based, while modern implementations use Ethernet. To send data via TCP on port 10110, the talker must establish a persistent connection to the listener’s IP address. For UDP, the talker broadcasts or unicasts datagrams to the listener’s port without maintaining a session, which affects reliability and configuration steps significantly.
Understanding NMEA0183 Protocol Layers
Traditional NMEA0183 devices communicate over serial interfaces like RS-422 at fixed baud rates such as 4800 or 38400. However, marine electronics manufacturers have long provided Ethernet gateways that translate these serial sentences into network packets. When you see references to "Talker" and "Listener" in an Ethernet context, you are dealing with IP-based communication rather than physical wire connections.
The Talker is the device generating the data, such as a GPS receiver, AIS transponder, or autopilot. The Listener receives this data, often a chartplotter, VHF radio, or logging software. The choice between TCP and UDP depends on your network infrastructure and the specific requirements of your listening application.
Configuring TCP Communication on Port 10110
TCP (Transmission Control Protocol) provides a reliable, ordered stream of data. This is crucial for applications where missing a single sentence could cause navigation errors. Port 10110 is commonly used by Raymarine and other marine brands for proprietary TCP streams, though many generic NMEA-over-TCP implementations also use this port.
To configure a TCP Talker:
- Identify the Listener's IP Address: Ensure the receiving device has a static IP or a DHCP reservation within the same subnet.
- Enable TCP Output: In the Talker’s network settings, select TCP mode instead of UDP or Multicast. Enter the Listener’s IP address in the destination field.
- Set the Port: Configure the source or destination port to 10110. Some devices require you to specify the local port if acting as a server, but typically the Talker initiates the connection to the Listener’s listening port.
- Verify Connection: Use a tool like
netstat or a packet sniffer to confirm the three-way handshake completes successfully.
If you encounter issues, remember that TCP requires the listener to be actively waiting for connections. If the listener restarts, the talker may need to reconnect. See
Understanding the 'listen()' Call and 3-Way Handshake in TCP Server Debugging for deeper insights into connection stability.
Configuring UDP Communication
UDP (User Datagram Protocol) is connectionless. It sends data packets without verifying delivery. This makes it faster and less resource-intensive but prone to packet loss if the network is congested. Many open-source NMEA listeners prefer UDP because it allows multiple listeners to receive the same data simultaneously without complex routing.
To configure a UDP Talker:
- Choose Unicast or Multicast: Unicast sends data to a specific IP. Multicast sends data to a group address (e.g., 239.255.0.1), allowing any listener on the network to join the stream.
- Select a Port: Common ports include 10110, 10111, or 61998. Ensure no other device on the network is using the same port to avoid conflicts.
- Configure the Listener: Set the listening device to accept UDP on the chosen port. For multicast, ensure the listener joins the correct multicast group.
Be aware that UDP does not guarantee delivery. If your chartplotter misses sentences, it may display stale data. Check
Ethernet Connection: UDP Packets Lost Upstream but Fine Downstream to troubleshoot potential network bottlenecks affecting your UDP stream.
Network Configuration and Firewall Considerations
Whether using TCP or UDP, firewall settings on both the Talker and Listener can block traffic. Most marine PCs run Windows or Linux, which have built-in firewalls. You must allow inbound and outbound traffic on the specific port (e.g., 10110) for the relevant protocol.
For Wi-Fi networks, ensure your router supports multicast if you are using UDP multicast. Some consumer routers disable IGMP snooping by default, which breaks multicast streams. Additionally, NAT (Network Address Translation) can complicate TCP connections if the Talker and Listener are on different subnets. In such cases, port forwarding may be necessary. Review
Port Forwarding Works with Wi-Fi: Liberate TCP/UDP Ports for guidance on exposing ports securely.
Troubleshooting Common Issues
If data is not flowing, verify the following:
- Cable Integrity: Use CAT5e or better Ethernet cables. Faulty wiring can cause intermittent drops.
- IP Subnet: Ensure both devices are in the same subnet unless routed correctly.
- Protocol Mismatch: A TCP Talker cannot communicate with a UDP Listener directly. Both must agree on the protocol.
- Data Format: Ensure the Talker is outputting standard NMEA0183 sentences (e.g., $GPXYZ) and not proprietary binary formats.
By carefully selecting TCP for reliability or UDP for simplicity, and correctly configuring network settings, you can ensure robust NMEA0183 communication across your marine network.
Frequently Asked Questions
Can I mix TCP and UDP on the same network?
Yes, TCP and UDP operate independently on different ports. Your network can handle both simultaneously without conflict, provided each device listens on its designated protocol and port.
Why does my UDP stream drop packets?
UDP does not retransmit lost data. Packet loss usually stems from network congestion, faulty cabling, or incorrect MTU settings. Checking your switch logs and cable quality is the first diagnostic step.
Is port 10110 mandatory for NMEA?
No, port 10110 is a common convention but not a strict standard. You can use any available port above 1024, as long as both the Talker and Listener are configured to use the same number.
How do I test if my Talker is sending data?
Use a network packet analyzer like Wireshark on the Listener’s machine. Filter for the specific IP and port to see if raw NMEA strings are arriving, which isolates whether the issue is network or application-related.
Does multicast work over all routers?
Not always. Consumer-grade routers often block multicast traffic by default. You may need to enable IGMP snooping or query your router manual for multicast support configurations.