Connecting to router in STN mode breaks NMEA out on p5

Discussion and support for the Nmea4Wifi multiplexer - a 4-input Nmea 0183 wifi multiplexer.
Athertop
Posts: 10
Joined: Sat Feb 10, 2024 11:17 pm

Connecting to router in STN mode breaks NMEA out on p5

Post by Athertop » Mon Feb 12, 2024 11:19 pm

This is my setup:
IMG_20240210_230943.jpg
If I configure the nmea4wifi in AP mode only, the position data is sent perfectly out the P5 connection to my AIS650 where its multiplexer sends received data from P5 to my e80 chart plotter, so I get fix info on the e80 from both the AIS (GPS) and the nmea0183 GPS. If I then configure the nmea4wifi to connect to my wifi hotspot/router (I believe it then reboots, but after restarting), it immediately stops sending the position data through the P5 out and remains that way (I only then see position data from the AIS, and that is not recommended by raymarine as primary position source - its also sketchy). The other functions of the nmea4wifi work just fine in this configuration such as data routed over the wifi. I have the v6.1 installed as shipped.

Thanks in advance, Paul

Luis Sa
Site Admin
Posts: 848
Joined: Thu May 04, 2017 4:12 am

Re: Connecting to router in STN mode breaks NMEA out on p5

Post by Luis Sa » Tue Feb 13, 2024 3:07 am

Hello Athertop,

My feedback here is just based on your drawing. I am not familiar with the instruments and I would need to read the manuals in order to be more assertive.

I assume that you AIS and you E80 have no internal GPS and location data is only available from the shown GPS. As per your description it looks like the AIS is capable of mixing its own AIS data with GPS that it receives, so that on its output 38400 baud stream there will be AIS+GPS. Then output from the VHF radio goes to P3, P3 goes to P5, that data goes to the AIS and the AIS ((it looks like the AIS is the multiplexer) also adds that VHF data to be sent to the the E80.

If I was you (note that I did not read the manuals) I would connect P5 to the E80 input. The GPS could go to the VHF and the AIS (one talker can drive 2 listeners). Actually there are many possible configurations.

But I think your problem is that the system works in AP only and not when you set the multiplexer to connect as a client to your router. You need to be more specific, Screenshots of the settings webpage would be useful. It should work fine in both configurations.

Regards, Luis

Athertop
Posts: 10
Joined: Sat Feb 10, 2024 11:17 pm

Re: Connecting to router in STN mode breaks NMEA out on p5

Post by Athertop » Tue Feb 13, 2024 7:43 am

Luis

Sorry if I was unclear. To try to be more specific, data is sent perfectly on p5 when nmea4wifi is configured with "AP only" mode, but as soon as I choose the 'also connect to external" mode (where it connects to my WiFi hot-spot perfectly), the feed on p5 stops being sent. I get "fix lost" errors on my e80 at that moment.
Eventually the e80 gets a fix from the ais GPS, but it never sees any GPS fix again from the p5 connection.

You are correct that the Raymarine Ais650 contains internal Bi-directional multiplexer. I have no choice but to connect the p5 output to the ais secondary input, as the e80 only has one nmea input. I therefore allow the ais multiplexer to blend data from both the ais itself with data coming from p5 so the e80 receives both.

I am not at the boat presently so can't capture the config until the weekend.

Thanks, Paul

Luis Sa
Site Admin
Posts: 848
Joined: Thu May 04, 2017 4:12 am

Re: Connecting to router in STN mode breaks NMEA out on p5

Post by Luis Sa » Tue Feb 13, 2024 9:26 pm

Hello Paul,

So you say that when you connect also to your router, everything works except that data out from P5 starts to fail. You should note the following:

- P5 baud rate should be able to cope with data that arrives to the multiplexer and that is routed to P5 (is that 38.400 or 4800?)

- when the multiplexer is in "Also Connect to External Network" the Wi-Fi tasks are harder. If you are sending out WiFi data (using UDP or TCP) the multiplexer sends that data in both networks.

- TCP transmissions take much more time than UDP as there are retransmissions, error detections etc.

- you should disable some routes to see what is the cause of the loss of data sent out by P5.

- if you discover the cause, you can try filtering or skipping in order to alleviate the multiplexer

- in my last post I pointed out that you were using the multiplexer to pass GPS data to the AIS and that could be done externally without going through the multiplexer.

These are just ideas that come to my mind. Good luck.

Regards, Luis

Athertop
Posts: 10
Joined: Sat Feb 10, 2024 11:17 pm

Re: Connecting to router in STN mode breaks NMEA out on p5

Post by Athertop » Thu Feb 15, 2024 11:15 pm

Luis,

My settings look like this:
Screenshot 2024-02-13 at 17.17.22.png
So P5 is set to 4800. I can certainly set it to 38400 and set my AIS input to the same and try that. My AIS is away at Raymarine right now being repaired - faulty rf mosfet, so will need to wait until I get it back so could be a few weeks.

Wifi is using UDP for both STN and AP (I don't have TCP configured at all).

Regarding using the multiplexer to pass GPS data to the AIS, and your suggestion that it could be done externally without going through the multiplexer - sorry that's not possible. The GPS data sentences are multiplexed by the nmea4wifi together with the VHF output sentences and these combined are fed out of P5 to the AIS where the AIS data is further multiplexed into the data stream so the sentences of all 3 devices finally reach the e80 chart plotter, which only has a single nmea0183 input. So I need to take advantage of both multiplexers to get the data I need into the chart plotter. The VHF data out allows DSC position reports to be displayed on the chart plotter (was actually the reason I bought the nmea4wifi). The GPS out is needed by both the VHF for DSC and also needed by the chart plotter, and the AIS data is required on the chart plotter also of course.

I can certainly test the output of the P5 with a friend's oscilloscope (which has nmea0183 decoding plugin), to see what is being lost specifically. I have no idea if it's just GPS data being lost or if all data (GPS and VHF out) is being lost - I suspect the latter though. The wifi output is fine though This P5 loss only happens when the multiplexer is in "Also Connect to External Network" as I previously mentioned. If I set it in 'AP only' mode, the P5 outputs perfectly. Like I said, I will try the 38400 baud option when I get the AIS back (or a replacement). Thanks, Paul

The install:
IMG-20240210-WA0009.jpg
Probably not in the best location as I find the LEDs on the nmea4wifi are picked up as noise by the VHF speaker

Luis Sa
Site Admin
Posts: 848
Joined: Thu May 04, 2017 4:12 am

Re: Connecting to router in STN mode breaks NMEA out on p5

Post by Luis Sa » Fri Feb 16, 2024 3:51 am

Hello Paul,

Thank you for the extra information. 3 small notes:

- do you get the IP the router gives to the multiplexer? With the shown settings, after you press SET, the IP should appear under the logo.

- did you try your smartphone as a router (I mean as a hot spot)?

- P5 working at 4800 could not be sufficient to route data out. Try 38400 as the AIS is capable of receiving at that rate (I assume so).

- just uncheck the UDP output from the inputs that route to UDP, one a time to see if we find what causes the problem.

Regards, Luis

Athertop
Posts: 10
Joined: Sat Feb 10, 2024 11:17 pm

Re: Connecting to router in STN mode breaks NMEA out on p5

Post by Athertop » Tue Feb 20, 2024 7:53 pm

Luis,

I do get the IP shown when I connect the device to my phone hot-spot (that's all I have as a router at the moment). That answers the second question too 😁
I will try 38400 on P5 to see if that helps. I need to wait to get my ais unit back from Raymarine before I can do further testing. Yes, the ais input #2 can be switched to 38400.

If you refer to my original post, the sketch I provided shows that 2 inputs route to udp (WiFi), they are my chart potter's seatalk 1 feed from P4 (for instrument data) and my ais output (for multiplexed ais and gps position data).

That sketch should hopefully be legible enough to understand my config and physical connections. I also mention baud rates on each connection.

Thanks, Paul

Luis Sa
Site Admin
Posts: 848
Joined: Thu May 04, 2017 4:12 am

Re: Connecting to router in STN mode breaks NMEA out on p5

Post by Luis Sa » Wed Feb 21, 2024 7:07 am

Hello Paul,

I understand completely your set up. I think there are 2 possibilities:

a) there is some bug neither detected when the multiplexer works with your setup or

b) there is too much data that leads to traffic congestion of the P5 output buffer.

I am only betting on 5% for a) and 95% for b) or any other extra cause. In order to exclude a) I would need to mimic your setup which is very difficult or impossible if I would need to use your sources of data.

The reason why P5 works well in AP only could be the little extra work for the multiplexer to send UDP data on the 2 networks (the multiplexer network and the router/phone network). That extra work could be the cause of the problem but I do not believe it. Another reason could be a defective router. You may think that the multiplexer gets a connection but that connection is, say, intermittent. In that case the multiplexer could be occupied to assure reconnections and have not time to feed the P5 output buffer. So just try a different router/phone to exclude this hypothesis.

There are things that I would do. First increase baud5 to 38400. Then put a filter on the input from the VHF to accept only DSC sentences (are you sure that the VHF does not repeat the GPS data that it receives?). Then uncheck the routing boxes to UDP just to concentrate on P5.

I wait for good news when you receive the AIS.

Regards, Luis

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

Re: Connecting to router in STN mode breaks NMEA out on p5

Post by dagnall » Wed Feb 21, 2024 11:28 am

Paul,
Luis asked if I could also look at your problem.
I am not "fully up to speed", but I note that you have GPS sent to the VHF, and then VHF (4800) to P3 and combine this with GPS (P2 4800) out to the AIS.(also 4800).
I understand the VHF>AIS connection (P3>P5) is to get (occasional!*) VHF DSC combined with AIS from the AIS650 and then see this on the E80. (*Occasional, as too much DSC data could easily congest a 4800 baud link. See also ** below)

I would normally agree with Luis that with this much data you should use 38400 for P5.
But looking at the AIS650 manual, the "data connection matrix" seems to suggest that it will not output AIS if you send GPS in at 38400 - which is very strange!
With 38400 GPS input , it only sends GPS at 4800 and AIS on SeatalkNG!!. This is why I think an alternate approach is needed, and you need to keep the 4800 GPS input to the AIS650. (which will give you 38400 output with GPS and AIS combined. -- and SeatalkNG AIS).
Screenshot 2024-02-21 104517.png
This leads me to a suggestion that Luis has not mentioned:
This is to directly wire the GPS 4800 data to the AIS650's 4800 input port. (avoiding the NMEA4).
You can usually wire more than one "NMEA0183 receiver" to a "NMEA0183 sender". This is not recommended practice, but usually works. In your case, this would mean that you could wire the GPS (4800) to the separate AIS 4800 inputs and in parallel with the connection to the (4800) VHF input. - Avoiding the NMEA4 P2>P5 link entirely.

The ASI650's 38400 input port would then be wired to Multiplexer P5 to (hopefully!!) get the VHF DSC data. (**)
The VHF output is still wired to P3 and then (baud converted by the NMEA4) (P3>P5). Ideally I would change the VHF OUTPUT baud to 38400, but I do not know if it is possible to do this independently of the VHF's NMEA input which will need to remain at 4800 for the GPS.

Having seen the beautiful wiring you have done I can understand that you may be reluctant to try this rewire!!

When you next get the chance to do testing, could you perhaps capture the "DEBUG" data just in case it gives us any extra insights? - Perhaps it may show what input data changes are visible when you use AP and EXT modes to help us track down this issue if it is related to the WIFI.

** I am a bit concerned about this "DSC" data, as the Raymarine manual says "The AIS unit features a type of multiplexer NMEA 0183 bus which enables you to feed GPS data into the unit via NMEA 0183 and then feed both GPS and AIS data out of the unit via the NMEA 0183" My past experience with such wording suggests that if they ave not explicitly said that the AIS650 internal multiplexer WILL multiplex DSC data, then they will NOT actually accept and pass that data. - Only the GPS nmea messages.

I would be fascinated to hear more about the expected VHF DSC.. but perhaps in a PM?

Best regards,

Dagnall

Athertop
Posts: 10
Joined: Sat Feb 10, 2024 11:17 pm

Re: Connecting to router in STN mode breaks NMEA out on p5

Post by Athertop » Wed Feb 21, 2024 11:31 pm

Dagnall, Many thanks for spending so much time to look at my issue. I too have consulted the AIS manual and have read the same details, so I am familiar with that table for instance. I have a few points which I think go against your suggestions sadly - not wanting to diminish your very detailed responses which I am very grateful for:

First point though before going into those details, is that I just wanted to reiterate that the data flows all work perfectly if I do not enable the option to have the wifi connect to my router (UDP STN mode). Its only when I enable that second radio button do I see data loss on P5. OK, back to addressing your points:

My GPS only outputs at 4800 (it won't work at 38400)
I have no choice other than to feed the GPS output through the multiplexer of nmea4wifi - as it is the only way I can get both GPS and DSC data (from the VHF) into the 2nd (4800) input of the AIS. DSC data from the VHF does get multiplexed by the AIS reliably as I tested a position request previously where the reply received by DSC alerted perfectly on my chart plotter. I only tested this with the nmea4wifi configured in the AP only mode though, and not in the STN mode (where I am seeing the P5 issues). If I connected the GPS directly into the AIS 4800 input, there would be no way to get my VHF DSC data output into my chart plotter.

As for future testing, I have access to a friends oscilloscope which has a nice nmea0183 decoding module. Its one of these: https://www.picotech.com/oscilloscope/2 ... 0-overview - very nice bit of kit! Using this I can test the P5 output to see if any messages are being sent.

My AIS650 is away with Raymarine at the moment and I have no idea when I might get it back, so tricky to test without all the kit installed. Raymarine not very good with their progress feedback unfortunately. I suspect they will send me a part-ex unit in return - I think the output stage blown in mine as would not tx any distance, whilst receive was perfect.

Thanks, Paul

Post Reply