panaaj / nmeasimulator

NMEA Sentence Generator
127 stars 13 forks source link

UDP broadcast not working on Mac? #44

Closed llang629 closed 1 year ago

llang629 commented 2 years ago

Installed on MacOS Monterey 12.6. Used app settings to broadcast on UDP port 2000, but Navionics saw nothing on the network.

Used tcpdump to observe what was going on: $ sudo tcpdump -i any udp port 2000 tcpdump: data link type PKTAP tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on any, link-type PKTAP (Apple DLT_PKTAP), capture size 262144 bytes 11:11:35.569978 IP localhost.callbook > localhost.callbook: UDP, length 938 11:11:35.569994 IP localhost.callbook > localhost.callbook: UDP, length 938 11:11:36.472742 IP localhost.callbook > localhost.callbook: UDP, length 938 11:11:36.472758 IP localhost.callbook > localhost.callbook: UDP, length 938

Sending to localhost seemed wrong. As a workaround, used app settings to send to UDP client 255.255.255.255 on port 2000. Now tcpdump looked correct: $ sudo tcpdump -i any udp port 2000 tcpdump: data link type PKTAP tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on any, link-type PKTAP (Apple DLT_PKTAP), capture size 262144 bytes 11:14:28.983455 IP larrys-mbp.callbook > broadcasthost.callbook: UDP, length 938 11:14:28.983463 IP larrys-mbp.callbook > broadcasthost.callbook: UDP, length 938 11:14:28.983469 IP larrys-mbp.callbook > broadcasthost.callbook: UDP, length 938 11:14:29.976614 IP larrys-mbp.callbook > broadcasthost.callbook: UDP, length 938

And sure enough, Navionics showing paired and receiving data.

llang629 commented 2 years ago

As an aside, Navionics on an iPad seems to be picking up some of the NMEA data (e.g. Depth), but not the GPS position. Not sure what applications you've tested with.

Thanks!

panaaj commented 2 years ago

With regard the broadcast not being seen.... have identified the issue and a fix will be in th next release. Workaround is to use addess of 255.255.255.255 in UDP (client) setting. Use nc -ulk <port_number> to see transmitted data from console.

panaaj commented 2 years ago

As an aside, Navionics on an iPad seems to be picking up some of the NMEA data (e.g. Depth), but not the GPS position. Not sure what applications you've tested with.

I have not tested with Navionics but given that standard NMEA0183 sentences with position are output ($GPGLL, etc) I'm not sure why Navionics wouldn't see the position.

llang629 commented 2 years ago

Both iNavX and iRegatta 2 seem to pick up the GPS from the simulated NMEA stream, so probably an issue with Navionics.

Thanks!

panaaj commented 1 year ago

Fixed in v1.4.1