0

I have one machine (192.168.11.100) that acts as an NMEA0183 "talker" via port 10110/TCP and I have another machine (let's say 192.168.11.110) that can only receive the NMEA strings it needs through port 8091/UDP.

I've tried using socat as follows: socat TCP4:192.168.11.100:10110 UPD4-DATAGRAM:192.168.11.255:8091 but I get a "permission denied" message. I've also tried swapping the IP addresses on the command above, but I get the same error.

I can netcat the 192.168.11.100:10110 and see the NMEA strings flowing and the same happens with socat using socat - 192.168.11.100:10110.

What am I doing wrong? Is there another way to solve this problem?

4
  • 1
    After briefly reading up on NMEA0183, it sounds like your solution is going to have to involve something that parses NMEA0183 text, because apparently each UDP datagram needs to be exactly one, complete, NMEA0183 "sentence". So you'll need to pull in the NMEA0183 text via TCP, keep reading from the TCP stream until you have one single complete sentence, and then copy that single complete sentence into a UDP datagram and send it to the destination device.
    – Spiff
    Commented Jun 21 at 20:48
  • Ditto. The underlying general "issue" is: a TCP connection is a continuous stream (well, two streams; it's two-way), while UDP sends independent datagrams. This means that in general one cannot freely "translate" from TCP to UDP nor the other way around. Commented Jun 21 at 21:48
  • "Permission denied" might be caused by iptables/nftables. Apply options -d -d -d -d to socat to get more info where the error happens. Commented Jun 23 at 15:12
  • I'll try first adding the -d -d -d options to socat. To see if it helps. Thanks a lot for the hints... Commented Jun 23 at 15:47

0

You must log in to answer this question.

Browse other questions tagged .