Setting PN to obtain SLR350Ni AIS data over WiFi
Setting PN to obtain SLR350Ni AIS data over WiFi
November 08, 2018 12:25PM
For a number of months I've been trying to set up Polar Navy (PolarView NS) to accept the AIS data received by a SLR350Ni AIS receiver (provided by MarineTraffic.com) over WiFi at my home location. I have followed the directions used for OpenCPN software, and OpenCPN accepts the data and displays AIS info as you'd expect. Using the same settings with PN doesn't work! Both OpenCPN and PN are installed on my desktop computer running Windows 10 (current update) with plenty of processor power, memory and storage.

I have set up PN via WiFi on our trawler using VesperMarine's Xb-8000 AIS transceiver and it works perfectly, so I'm not inexperienced in this type of setup.

I'm using the latest version of PN at home and the previous version (still 3.0. something) on our trawler (just because I haven't downloaded the newest version yet).

Why does OpenCPN work and the same settings with PN does not work? What changes do I need to make to get PN to work successfully?

Thanks for any suggestions!
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 08, 2018 10:31PM
- What are the specific network and connection settings used by this receiver?
- What configuration options have you set up in PolarView?

--
Polar Navy Support
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 09, 2018 12:34PM
Not quite sure what you're looking for. As I said, using the same configuration that works for OpenCPN doesn't work for PN.

The SLR350Ni network address is 192.168.1.170. It's sending data to port 10110 (in addition to automatically sending data to MarineTraffic.com). I have it set to send local broadcasts to Hosts: 192.168.001.242 (my desktop) at port 10110 and 10120, and to host 127.0.0.1 at port 10120. I've been using port 10110 with both OpenCPN and PN (alternatively) as a test, since OpenCPN works correctly with that port (10110).

Here's the config that works with OpenCPN:
Set up at a network (not serial) connection
Protocol: UDP
Address: 192.168.1.170 (that's the network address of the SLR350Ni AIS receiver)
DataPort: 10110
Control checksum checked
Receive input on this port checked (no output on this port)
Accept only sentences checked

Here's the config that IS NOT working with PN:
Network Server and Network Client (separate setups in Port Manager)
IP address: port 192.18.1.170:10110
Input checked
Protocol: UDP (I've also tried TCP and that doesn't work, either)
Activation: Manual (I cannot get it to run, no matter what the setting and using Live ship mode
When I use a server configuration with 192.168.1.170:110 the port will not "run"
The Network Client setup using either UDP or TCP indicates "waiting" and occasionally "connecting" but never "runs" and no data is displayed in the NMEA console

With PN, when I change the IP address to 0.0.0.0:10110 and protocol TCP, it shows that it is "running" but no AIS data is displayed.

I've tried using host 127.0.0.1:10120 with PN, without success.

Nothing shows up in the NMEA console in PN under any combination.
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 10, 2018 12:39AM
It sounds like your AIS device is sending directed UDP frames ( not "broadcast" ) to a target IP address and port specified on that device (although it would be nice to be sure of that).

If that is the case, in PolarView you want to set up a UDP network server (server means "listener", client means "sender" in UDP context), with the following settings:

- IP address: 0.0.0.0 (the IP address in server configuration means local IP address on which to listen to incoming data. 0.0.0.0 is a wildcard IP that means - listen on all IP addresses that are configured on your PolarView system)
- Port: 10110 (or whatever target port you set up on the AIS device)

Once it is set up this way, you should be able to launch the port in the port manager.

Do not configure a UDP network client or any other network ports in PolarView.

Your AIS device should be set up to send traffic to the IP address of your PolarView computer (192.168.1.242 if that's where it is running), and to the same port you set up in the network server (i.e. 10110).

As an aside, there is no need to send data to 127.0.0.1 - this attempts to send UDP packets back to the AIS device (and they are likely getting discarded).

--
Polar Navy Support



Edited 3 time(s). Last edit at 11/10/2018 12:41AM by Polar Navy Support.
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 10, 2018 10:39AM
I've set up PN the way you suggested. Data is coming in as indicated in the screen shot of the NMEA Terminal and Port Manager which is attached, HOWEVER, nothing is showing in PN despite the fact that there are ships at Port Canaveral (shown in PN) that are showing when I switch to OpenCPN and in the interface for the SLR350Ni AIS receiver.

We're getting closer to a solution.
Attachments:
open | download - 2018-11-10 AIS config PolarViewNS as UDP Capture.JPG (180.3 KB)
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 10, 2018 11:39AM
Please check that menu option Ship->Show AIS Ships is selected.
You can also view a list of current AIS targets by opening File->AIS Ship List

Also note that it may take some time for targets to appear, as only some AIS messages carry vessel information.

--
Polar Navy Support



Edited 1 time(s). Last edit at 11/10/2018 11:42AM by Polar Navy Support.
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 10, 2018 12:11PM
Show AIS Ships is selected; nothing shows in the AIS Ship List. It's been operating for over an hour. PN is also set to show stationary ships, but there are a number of ships moving in and out of Port Canaveral which show on OpenCPN and the SLR350Ni graphical interface. The fact that ship positions show on the receiver' graphical interface indicates that those signals are actually being received by the AIS receiver and retransmitted to the designated computer port.
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 10, 2018 06:37PM
To debug this further, we would need a sample of the AIS data.

The simplest way to obtain this sample is to copy several screens worth of text from the NMEA Terminal, paste it into a text editor, save as a plain text file and attach here. You may need to compress the file into a zip archive first.

--
Polar Navy Support
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 10, 2018 09:28PM
I've attached two files containing NMEA data: (1) a txt file from the PN NMEA console, and (2) a screen capture of NMEA data from OpenCPN debug window.

It looks like the data for PN is different than the data from OpenCPN. There must be something in the way PN handles the incoming data that makes it different.
Attachments:
open | download - PN NMEA Console Text.txt (2.7 KB)
open | download - OpenCPN NMEA debug window Capture.JPG (267 KB)
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 10, 2018 10:19PM
Looks like we'll need to get that data a different way.

You will need to create a File Output port in PolarView. In port configuration check "mux out" checkbox and select an output file name. Do not change any other settings. Launch this port, and run it along with the network port. This should save AIS data directly to the selected file.

Make sure to stop the file output port before copying the file.

--
Polar Navy Support
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 10, 2018 10:30PM
I see the issue here.
PolarView AIS display supports only messages sent by other vessels (1,2,3 - vessel position report, 5 - vessel information, 18 and 19 - class B position report).

In the sample you provided there are two types of messages:
Type 4 - base station report
Type 21 - aid to navigation report
Neither message type is supported by PolarView.

--
Polar Navy Support
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 11, 2018 12:04AM
I don't understand why the same data sent by the same receiver from the same vessels to the receiver displays in OpenCPN and not in PN. I'm sorry, but your explanation doesn't comport with the reality of the identical NMEA data received by both applications.
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 11, 2018 10:35AM
To put it simply - PolarView can only display AIS ships, not other AIS targets (like navaids). The short sample you provided included only navaids, and no ships. So, there is nothing PolarView can display based on the data in that sample.

AIS targets transmit at fairly long intervals (minutes), so it is possible that ship targets would be included if we get a longer data sample. If you'd like to debug further - please follow instructions above to create a "File Output" port. Run it for 5-10 minutes to collect more data.

--
Polar Navy Support
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 11, 2018 10:36AM
Here is the Mix Out file as you suggested. I limited it to 1,000 lines. If you need more for a good analysis, let me know and I'll run it again.

Thanks for your help with this. It's not critical, but I certainly would like to get it working.
Attachments:
open | download - PN Mux Output.txt (45.5 KB)
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 11, 2018 12:40PM
I am able to see quite a few AIS vessels from the new data capture. Most are stationary, but a few are moving.

Just to make sure:
1. You have turned on "Ship->Live Ship Mode"
2. Option "Ship->Show AIS Ships" is checked

--
Polar Navy Support
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 11, 2018 01:40PM
Yes, both are checked/turned on.
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 11, 2018 03:34PM
Unusual. Let's try this:
1. Create "File Input" port in port manager
2. As an input select the same file you just created as an output in the previous message
3. Set messages per second rate of 10 or 20 (not too low), and make sure "loop over data" checkbox is checked.
4. Launch the new port

Let me know if you see any AIS targets

--
Polar Navy Support
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 11, 2018 06:51PM
YES! Running that file shows the AIS targets!
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 11, 2018 06:53PM
Should have added to my last: the resulting display shows the vessel name, speed, etc, just like it would were the data coming directly from the AIS receiver.
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 11, 2018 10:26PM
Interesting. I suspect that something is off about the way the device sends network data (if I had to guess - individual sentences are split across several UDP frames).

To debug this further we would need to get a network packet capture. Doing so does require some familiarity with network capture tools (Wireshark) and would entail installing and running it on the same system where PolarView is installed.

--
Polar Navy Support
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 12, 2018 12:16AM
If you're curious, I'm willing to give it a try if you can point me in the right direction.
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 12, 2018 12:53AM
Here is how to capture network data with Wireshark.

1. Download and install Wireshark from here: [www.wireshark.org] Note that it will probably require administrative permissions to run, in order to access network capture.

2. Launch Wireshark. From the top program menu select Capture->Options

3. In the options window in the text box for "Capture filter for selected interfaces" enter exactly the following text:
udp port 10110
This sets up a capture of all udp packets sent to the port that you previously configured in PolarView. If you changed the port number, make sure to use the same number here as well.
Do not modify any other options in that window, accept all defaults.

4. Click start button on the bottom right. If AIS device is sending data, you should see an incrementing list of lines corresponding to incoming packets. Let it run for some time.

5. To stop, select menu item Capture->Stop

6. To save the file go to File->Save, enter file name and save.

--
Polar Navy Support



Edited 3 time(s). Last edit at 11/12/2018 12:54AM by Polar Navy Support.
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 12, 2018 11:09AM
I captured data from Wireshark but I cannot send it as an attachment as a pcapng file isn't allowed, and the file export options in Wireshark don't seem to permit any of the valid attachment files.

I changed the file extension from pcapng to png so you may need to change it back in order to view it.
Attachments:
open | download - Wireshank port 10120 data.png (94.6 KB)
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 12, 2018 12:10PM
Thank you, will check.

The easiest method to attach files of any type is to compress them into a zip archive.

--
Polar Navy Support
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 12, 2018 01:05PM
The issue appears to be with the way the AIS device formats output UDP data. While there does not exist an actual NMEA over UDP standard, the common approach has been to send NMEA messages as-is, one per UDP packet.

Normally NMEA messages are text lines terminated by a line break byte combination.
In this case, the AIS device prepends the same byte combination to each NMEA message. I can not speculate as to what might be the reason for that choice of formatting.

In any case, processing such messages would require modification to PolarView NMEA over UDP handling. I'll put this on the TODO list for the next update.

--
Polar Navy Support
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 12, 2018 02:47PM
And there is no way that I can modify the receiver's output formatting.

I really appreciate the time you've spent working through this issue. Thanks for your help and for putting the issue on the TODO list for the next update.
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 13, 2018 01:03AM
Given that there are several bug fixes in the pipeline, the next bug fix release would hopefully be available sometime within a month.

--
Polar Navy Support
Re: Setting PN to obtain SLR350Ni AIS data over WiFi
November 28, 2018 01:55AM
PolarView 3.0.7 is now available and includes support for these types of messages.

--
Polar Navy Support
Please log in to post in this forum.

Click here to login