Nmea3Wifi and ST70i

Discussion and support for the Nmea3Wifi multiplexer - a 2-input Nmea 0183 wifi multiplexer with a full bidirectional SeaTalk1 input/output port.
0ff
Posts: 8
Joined: Fri May 26, 2023 8:43 am

Nmea3Wifi and ST70i

Post by 0ff » Wed May 31, 2023 9:10 pm

First please let me say that the Nmea3Wifi is an amazing project and it works almost perfectly when testing it with a ST70i using a SeaTalk <> SeaTalk NG bridge.

However, there's one thing I have noticed when using them together with a cheap NMEA GPS unit:
Not the full GPS information is received by the ST70i. While the current GPS heading works just fine, no position, date/time or number of satellites is shown on the display.

It seems that the Nmea3Wifi will generate the $STALK datagrams 50 and 51 for LAT and LON, however the ST70i (OR the bridge, I'm not yet 100% sure on that) also (or instead?) require the datagram 58 (Raw unfiltered position). This is as per your documentation, so I'm not saying this is a bug.

Instead I'm just asking if it was possible to have the Nmea3Wifi also send out $STALK 58, as well as 57. If it were doing that, all the alarms on the ST70i would just begin to work (I've tried using the awesome new debug mode). I've also found out that if the datagram 58 is not received for around 7 seconds, then the ST70i will go into "GPS lost" alarm, which would totally be the expected behaviour if the GPS actually stop sending NMEA data.


I would really love to help implementing this instead of just saying "I want this". If there's any chance I can help you (I am quite familiar with developing for the ESP32 and I'd even be totally fine with just a snippet of code that does the current conversion, so I can send you a "patch" that builds the new datagrams).

dagnall
Posts: 458
Joined: Wed Mar 04, 2020 6:36 pm

Re: Nmea3Wifi and ST70i

Post by dagnall » Thu Jun 01, 2023 9:48 am

Luis just pointed me to your comment.
(And I should now be subscribed so I get notified of replies)
Luis is in Greece, but I will have a look at datagram 58 and see if I can see an ‘easy’ way to add (or enable) it.
I have a thought that perhaps an /dev switch option might be a good idea? Like the sow>stw hidden option?
It will take a day or two for me to explore!
Best regards
Dagnall

0ff
Posts: 8
Joined: Fri May 26, 2023 8:43 am

Re: Nmea3Wifi and ST70i

Post by 0ff » Thu Jun 01, 2023 11:00 am

Thank you for your very quick response!

A dev switch might be a good idea, it seems no one else needed those datagrams until now, so maybe I'm a bit of a weird user here.
If you need anything from me, please don't hesitate to ask, I can test any firmware you want and I should be able to also simulate the NMEA input (for a full end-to-end test).

dagnall
Posts: 458
Joined: Wed Mar 04, 2020 6:36 pm

Re: Nmea3Wifi and ST70i

Post by dagnall » Fri Jun 02, 2023 7:44 pm

HI. I may have a possible resolution:
I have coded in a switch on the "ADDITIONAL SETTINGS" for seatalk that allows you to "enable " "Datagram58".
If you have this box checked, then NMEA GPS will send Datagram 58 in place of the Datagram 50/51 pair.
I think (hope?) the coding is correct, but I do not have any devices here that allow me to confirm if the Seatalk construction is fully correct. What I can say is that it matches our interpretation of datagram58 to NMEA. ;)

The code should have the name "Experimental CODE (CAUTION) Ver 2.02 Jun 2 2023 20:32:37"

Please let me know if this works!!

Best regards
Dagnall
Attachments
NMEA3.ino.zip
NMEA3 experimental binary
(668.8 KiB) Downloaded 157 times

0ff
Posts: 8
Joined: Fri May 26, 2023 8:43 am

Re: Nmea3Wifi and ST70i

Post by 0ff » Fri Jun 02, 2023 9:07 pm

This is amazing, it works!
This is what is received over SeaTalk:
Seatalk.jpg

(Come visit me one day if you want ;))

Again, this is amazing - if I disconnect the NMEA3Wifi I almost immediately get the GPS alert (which is expected and what I was looking for).

Just one last wish: If you could also send STALK 57 (Sat information) I believe this would allow me to also get the Time from the NMEA' GPS (even though I already see it sending the time, I believe missing #57 makes the ST70 think this might not be accurate). Would you include that as well with the (same?) setting?

dagnall
Posts: 458
Joined: Wed Mar 04, 2020 6:36 pm

Re: Nmea3Wifi and ST70i

Post by dagnall » Sat Jun 03, 2023 9:09 am

0ff wrote:
Fri Jun 02, 2023 9:07 pm
This is amazing, it works!
Just one last wish: If you could also send STALK 57 (Sat information) I believe this would allow me to also get the Time from the NMEA' GPS (even though I already see it sending the time, I believe missing #57 makes the ST70 think this might not be accurate). Would you include that as well with the (same?) setting?
I am very glad the unit is now displaying your position ---

We do not currently decode NMEA GGA or GSA, so it would need some more modification to add that.
I will look at how complex that might be before answering more.. An option is to add a FAKE ST57 if it is essential?.. I have quickly coded this so you can see if the time magically appears.. I have faked 8 satellites and 'fair' DOP (I think!)
ST57 test.zip
Does this enable the Time display ? (FAKE ST57)
(668.96 KiB) Downloaded 146 times
Can you tell me if your GPS is sending GSA or GGA ? (or both)

:?: Silly question--- Is the position EXACTLY correct :?:
I have seen some issues in the past with float to integer conversions that round down rather than correctly.

0ff
Posts: 8
Joined: Fri May 26, 2023 8:43 am

Re: Nmea3Wifi and ST70i

Post by 0ff » Sun Jun 04, 2023 9:20 am

This is just amazing. And with that, I mean you are just amazing!
With that new version, not only will the display accept the date & time from the NMEA's GPS, also the plotter (e90w) will now acknowledge that there's a GPS on STNG as well (via the ST<->STNG Converter) - this is just awesome!

Also yes, indeed, the position is very exact. Up to the resolution of the GPS I'm using.
Display.jpeg
Plotter.jpg
The is the TCP Output of the NMEA3Wifi so I guess yes, the GPS does send those: (Note I've removed the GPS position from the logs, I guess if someone sees the images above they can figure it out anyways, but I'd rather not have it in text here)

Code: Select all

$GPTXT,01,01,01,ANTENNA OK*35
$GPHDG,208.0,0.0,E,9.0,E*5D
$STALK,84,26,0E,00,00,00,00,00,08*18
$GNGGA,091351.000,XXXX.XXXXX,N,XXXXX.XXXXX,E,1,11,2.1,553.5,M,46.5,M,,*43
$GNGLL,XXXX.XXXXX,N,XXXXX.XXXXX,E,091351.000,A,A*44
$STALK,85,76,3E,08,F0,FF,08,02,F7*12
$GNGSA,A,3,16,18,26,27,28,31,,,,,,,3.1,2.1,2.3,1*36
$STALK,A5,B5,00,01,80,00,04,00*4F
$STALK,99,00,F7*1C
$GNGSA,A,3,12,24,25,34,44,,,,,,,,3.1,2.1,2.3,4*31
$GPGSV,3,1,10,05,20,044,,16,44,304,31,18,78,141,17,23,20,147,23,0*67
$GPGSV,3,2,10,25,06,138,,26,73,256,33,27,19,274,31,28,12,203,24,0*6F
$GPHDG,208.0,0.0,E,9.0,E*5D
$IIRSA,0,A,,V*67
$STALK,9C,21,0E,00*4D
$GPGSV,3,3,10,29,33,078,19,31,31,232,36,0*6E
$BDGSV,2,1,05,12,61,257,35,24,53,223,35,25,34,304,29,34,29,252,32,0*71
$BDGSV,2,2,05,44,84,302,25,0*4B
$GNRMC,091351.000,A,XXXX.XXXXX,N,XXXXX.XXXXX,E,0.00,61.82,040623,,,A,V*37
$GNVTG,61.82,T,,M,0.00,N,0.00,K,A*1E
$GNZDA,091351.000,04,06,2023,00,00*46
$STALK,59,11,14,00*48
$GPTXT,01,01,01,ANTENNA OK*35
$STALK,59,00,02*63
$GPHDG,208.0,0.0,E,9.0,E*5D
$STALK,84,26,0E,00,00,00,00,00,08*18
$GNGGA,091352.000,XXXX.XXXXX,N,XXXXX.XXXXX,E,1,11,2.1,553.5,M,46.5,M,,*41
$GNGLL,XXXX.XXXXX,N,XXXXX.XXXXX,E,091352.000,A,A*46
$STALK,A5,B5,00,01,80,00,04,00*4F
$GNGSA,A,3,16,18,26,27,28,31,,,,,,,3.1,2.1,2.3,1*36
$STALK,99,00,F7*1C
$STALK,85,76,3E,08,F0,FF,08,02,F7*12
$GNGSA,A,3,12,24,25,34,44,,,,,,,,3.1,2.1,2.3,4*31
$GPGSV,3,1,10,05,20,044,,16,44,304,31,18,78,141,17,23,20,147,23,0*67
$GPGSV,3,2,10,25,06,138,,26,73,256,33,27,19,274,31,28,12,203,25,0*6E
$GPHDG,207.5,0.0,E,9.0,E*57
$IIRSA,0,A,,V*67
$STALK,9C,E1,0D,00*3B
$GPGSV,3,3,10,29,33,078,19,31,31,232,36,0*6E
$BDGSV,2,1,05,12,61,257,35,24,53,223,35,25,34,304,29,34,29,252,32,0*71
$BDGSV,2,2,05,44,84,302,25,0*4B
$GNRMC,091352.000,A,XXXX.XXXXX,N,XXXXX.XXXXX,E,0.00,61.82,040623,,,A,V*35
$GNVTG,61.82,T,,M,0.00,N,0.00,K,A*1E
$GNZDA,091352.000,04,06,2023,00,00*45
$GPTXT,01,01,01,ANTENNA OK*35
$GPHDG,208.0,0.0,E,9.0,E*5D
$STALK,84,26,0E,00,00,00,00,00,08*18
$GNGGA,091353.000,XXXX.XXXXX,N,XXXXX.XXXXX,E,1,11,2.1,553.5,M,46.5,M,,*4F
$GNGLL,XXXX.XXXXX,N,XXXXX.XXXXX,E,091353.000,A,A*48
$STALK,85,76,3E,08,F0,FF,08,02,F7*12
$GNGSA,A,3,16,18,26,27,28,31,,,,,,,3.1,2.1,2.3,1*36
$STALK,A5,B5,00,01,80,00,04,00*4F
$STALK,99,00,F7*1C
$GNGSA,A,3,12,24,25,34,44,,,,,,,,3.1,2.1,2.3,4*31
$GPGSV,3,1,10,05,20,044,,16,44,304,31,18,78,141,17,23,20,147,23,0*67
$GPGSV,3,2,10,25,06,138,,26,73,256,33,27,19,274,31,28,12,203,25,0*6E
$GPHDG,208.0,0.0,E,9.0,E*5D
$IIRSA,0,A,,V*67
$STALK,9C,21,0E,00*4D
$GPGSV,3,3,10,29,33,078,19,31,31,232,36,0*6E
$BDGSV,2,1,05,12,61,257,35,24,53,223,35,25,34,304,29,34,29,252,32,0*71
$BDGSV,2,2,05,44,84,302,25,0*4B
$GNRMC,091353.000,A,XXXX.XXXXX,N,XXXXX.XXXXX,E,0.00,61.82,040623,,,A,V*3B
$GNVTG,61.82,T,,M,0.00,N,0.00,K,A*1E
$GNZDA,091353.000,04,06,2023,00,00*44
$GPTXT,01,01,01,ANTENNA OK*35
$GPHDG,208.0,0.0,E,9.0,E*5D
$STALK,84,26,0E,00,00,00,00,00,08*18
$GNGGA,091354.000,XXXX.XXXXX,N,XXXXX.XXXXX,E,1,11,2.1,553.5,M,46.5,M,,*48
$STALK,99,00,F7*1C
$GNGLL,XXXX.XXXXX,N,XXXXX.XXXXX,E,091354.000,A,A*4F
$GNGSA,A,3,16,18,26,27,28,31,,,,,,,3.1,2.1,2.3,1*36
$STALK,A5,B5,00,01,80,00,04,00*4F
$STALK,85,76,3E,08,F0,FF,08,02,F7*12
$GNGSA,A,3,12,24,25,34,44,,,,,,,,3.1,2.1,2.3,4*31
$GPGSV,3,1,10,05,20,044,,16,44,304,31,18,78,141,17,23,20,147,23,0*67
$GPGSV,3,2,10,25,06,138,,26,73,256,33,27,19,274,31,28,12,203,25,0*6E
$GPHDG,207.5,0.0,E,9.0,E*57
$IIRSA,0,A,,V*67
$STALK,9C,E1,0D,00*3B
$GPGSV,3,3,10,29,33,078,19,31,31,232,36,0*6E
$BDGSV,2,1,05,12,61,257,34,24,53,223,35,25,34,304,29,34,29,252,32,0*70
$BDGSV,2,2,05,44,84,302,25,0*4B
$GNRMC,091354.000,A,XXXX.XXXXX,N,XXXXX.XXXXX,E,0.00,61.82,040623,,,A,V*3C
$GNVTG,61.82,T,,M,0.00,N,0.00,K,A*1E
$GNZDA,091354.000,04,06,2023,00,00*43
$GPTXT,01,01,01,ANTENNA OK*35
$GPHDG,208.0,0.0,E,9.0,E*5D
$STALK,84,26,0E,00,00,00,00,00,08*18
$GNGGA,091355.000,XXXX.XXXXX,N,XXXXX.XXXXX,E,1,11,2.1,553.5,M,46.5,M,,*49
$GNGLL,XXXX.XXXXX,N,XXXXX.XXXXX,E,091355.000,A,A*4E
$STALK,85,76,3E,08,F0,FF,08,02,F7*12
$GNGSA,A,3,16,18,26,27,28,31,,,,,,,3.1,2.1,2.3,1*36
$STALK,99,00,F7*1C
$STALK,A5,B5,00,01,80,00,04,00*4F
$GNGSA,A,3,12,24,25,34,44,,,,,,,,3.1,2.1,2.3,4*31
$GPGSV,3,1,10,05,20,044,,16,44,304,30,18,78,141,17,23,20,147,23,0*66
$GPGSV,3,2,10,25,06,138,,26,73,256,33,27,19,274,31,28,12,203,25,0*6E
$GPHDG,208.0,0.0,E,9.0,E*5D
$IIRSA,0,A,,V*67
$STALK,9C,21,0E,00*4D
$GPGSV,3,3,10,29,33,078,19,31,31,232,36,0*6E
$BDGSV,2,1,05,12,61,257,34,24,53,222,35,25,34,304,30,34,29,252,32,0*79
$BDGSV,2,2,05,44,84,302,25,0*4B
$GNRMC,091355.000,A,XXXX.XXXXX,N,XXXXX.XXXXX,E,0.00,61.82,040623,,,A,V*3D
$GNVTG,61.82,T,,M,0.00,N,0.00,K,A*1E
Also one thing I've noticed: Once I have connected to the NMEA3Wifi's TCP port (to get the log), it seems that something is messed up with the GPS Position. After doing that (and then disconnecting from the Wifi) at first it will sound the GPS lost alarm, then display a very wrong position (11°10'.013N, 149°58'.640W). After resetting the NEMA3Wifi everything's back to normal though. Any idea why that would be happening? I'd love to connect to the Wifi in real life of course, because that would be my goto way for getting the data into my Tablet :)

dagnall
Posts: 458
Joined: Wed Mar 04, 2020 6:36 pm

Re: Nmea3Wifi and ST70i

Post by dagnall » Sun Jun 04, 2023 12:11 pm

Hi,
That is good news, and I will have a look at decoding GGA or GSA properly to get the SeaTalk Datagram 57 "properly".
Now bad news.. the 'Bible' of Seatalk datagrams does not tell me how the DOP data is transmitted. Jus that the Second variable (DD) is dop. I had assumed DOP was integer meters, but I think I see from GGA and GSA in your data, that DOP is a floating point, (2.1) in your example? But the display capture (THANKS!) shows HDOP to be 10, and since I sent 10 (integer) - it looks like SeaTalk can only work to the nearest M of DOP :) . - This is enough to for me to start!-

Sending on UDP TCP etc, during "DEBUG".
In the Debug mode, all "out" signals are inhibited. (It should say this in the text at the top of the ****DEBUG MODE **** page? - quote "No data will be output on P3, SeaTalk, UDP or TCP". So your UDP/TCP data will be temporarily stopped while it updates. This is normal.

There is a second debug mode that I am testing that is accessible if you go to the "DEVELOPER PAGE". (but it also interrupts TCP/UDP). For me, the major advantage of this alternate page is that it shows instantly if connection is lost with the NMEA3 (the "Connected - " will stop animating the '-' every second).
Assuming you are using 192.168.4.1, you can go to 192.168.4.1/dev in your browser. The "Debug" display here works slightly differently to the one on the main front page, and shows a conventional scrolling page of data that you can pause and scroll through. Again, the TCP and UDP 'outputs' are inhibited when the debug is running (updating / displaying) , but this debug page has a Paused/Running button that you can click to start and stop it. (It still only runs for a maximum of 20 seconds before pausing).
You might wish try this alternate debug to explore how your system reacts to TCP/UPD pausing momentarily.

- I would also be VERY interested in your reaction to the page in comparison to the standard Debug mode. !

Example of the /dev "developer page DEBUG mode".
Dev Debug example .jpg

dagnall
Posts: 458
Joined: Wed Mar 04, 2020 6:36 pm

Re: Nmea3Wifi and ST70i

Post by dagnall » Sun Jun 04, 2023 1:03 pm

HI.
Adding some code to generate ST57 from GGA turned out to be relatively simple. SO I have attached it here...

PLEASE note that I have not been able to test this with a real GPS.. So I would very much appreciate if you can look at your GPS quality data (GGA) and check that the ST70 is displaying "sensible" data.. - AND THAT NOTHING ELSE has stopped working!!
The code will report its name as being "Candidate CODE Ver 2.05 Jun 4 2023 13:32:21"

(The GGA format can be found here: https://gpsd.gitlab.io/gpsd/NMEA.html#_ ... m_fix_data)
GGA test.zip
GGA builds ST57
(668.87 KiB) Downloaded 163 times
PS I may have misunderstood the TCP issue -- so I will be looking again at that!.

dagnall
Posts: 458
Joined: Wed Mar 04, 2020 6:36 pm

Re: Nmea3Wifi and ST70i

Post by dagnall » Sun Jun 04, 2023 4:26 pm

'off' (sorry - you have never added your name!! )
I have sent you a PM with some extra questions..
Can you test this please to see if the minutes displayed on your ST70 are correct..


Luis FYI:
I am concerned that the NMEA>ST conversion for datagram 58 sends the 16 bit minutes in a method that is not consistent with all the other places where we send 16 bit data. : But the user said the data was correctly displayed on his instrument!! -- I find this very confusing, as when I convert the ST58 'back' to GLL, I then get the minutes data wrong..
-- either our ST58>NMEA conversion has been wrong for a long time-- or the NMEA>ST58 I am working on was wrong yesterday! ---

I have just now set up a simple test, where GPS is received and sent out on UDP from my test NMEA2000 unit.
The NMEA3 under test accepts the UDP and converts to SeaTalk.
A second NMEA3 then receives the Seatalk, and we can compare with the original UDP data

This code (DELETED - was proved "wrong" ) has the minutes sent in Datagram58 in the order that I think is correct!
(and it converts back to GLL for me here!!)
Last edited by dagnall on Sun Jun 04, 2023 9:21 pm, edited 1 time in total.

Post Reply