Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 07-10-2019, 19:53   #16
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: Opencpn not seeing serial AIS/GPS data

Tracy...


re:
"I double checked with Hyperterminal, and as with the NAIS software, I am seeing nmea data."


Let us see some of that data from Hyperterm, or some other source, to evaluate the sentence structure.


Thanks
Dave
bdbcat is offline   Reply With Quote
Old 08-10-2019, 11:43   #17
Registered User

Join Date: Oct 2019
Posts: 18
Re: Opencpn not seeing serial AIS/GPS data

Here is some text from Hyperterminal:

$GPRMC,183745.00,A,1538.97790,N,08859.75121,W,0.04 1,,081019,,,D*6C
$GPVTG,,T,,M,0.041,N,0.076,K,D*22
$GPGGA,183745.00,1538.97790,N,08859.75121,W,2,10,0 .88,12.5,M,-6.2,M,,0000*6C
$GPGSA,M,3,21,20,29,46,51,24,32,10,13,15,,,1.74,0. 88,1.50*04
$GPGSV,3,1,10,10,18,288,42,13,13,035,35,15,46,027, 49,20,31,314,45*7F
$GPGSV,3,2,10,21,44,339,47,24,41,126,38,29,54,200, 48,32,15,223,36*7A
$GPGSV,3,3,10,46,41,252,47,51,62,230,44*78
$GPGLL,1538.97790,N,08859.75121,W,183745.00,A,D*71
!AIVDO,1,1,,,B5NWQH0006J9gt2?Ae?Q3wpUkP06,0*6F
$GPRMC,183746.00,A,1538.97788,N,08859.75120,W,0.03 4,,081019,,,D*65
$GPVTG,,T,,M,0.034,N,0.062,K,D*25
$GPGGA,183746.00,1538.97788,N,08859.75120,W,2,10,0 .88,12.5,M,-6.2,M,,0000*67
$GPGSA,M,3,21,20,29,46,51,24,32,10,13,15,,,1.74,0. 88,1.50*04
$GPGSV,3,1,10,10,18,288,41,13,13,035,33,15,46,027, 49,20,31,314,45*7A
$GPGSV,3,2,10,21,44,339,47,24,41,126,38,29,54,200, 48,32,15,223,35*79
$GPGSV,3,3,10,46,41,252,47,51,62,230,44*78
$GPGLL,1538.97788,N,08859.75120,W,183746.00,A,D*7A
!AIVDO,1,1,,,B5NWQH0006J9gt2?Ae;Q3wq5kP06,0*0A
$GPRMC,183747.00,A,1538.97787,N,08859.75120,W,0.02 6,,081019,,,D*68
Tracy Andacht is offline   Reply With Quote
Old 08-10-2019, 11:46   #18
Registered User

Join Date: Oct 2019
Posts: 18
Re: Opencpn not seeing serial AIS/GPS data

And here is some text from the NAIS software:

$GPGSV,3,3,10,46,41,252,45,51,62,230,43*7D
$GPGLL,1538.97719,N,08859.75216,W,183440.00,A,A*74
!AIVDO,1,1,,A,H5NWQH0hDTh4pV2222222222220,2*59
$PAMC,R,TXT,000,TX_PWR,Lv=0,2011,1.620*11
$GPRMC,183441.00,A,1538.97720,N,08859.75212,W,0.03 2,,081019,,,A*62
$GPVTG,,T,,M,0.032,N,0.059,K,A*2E
$GPGGA,183441.00,1538.97720,N,08859.75212,W,1,08,1 .10,9.5,M,-6.2,M,,*53
$GPGSA,M,3,21,20,29,24,32,10,13,15,,,,,2.39,1.10,2 .13*0C
$GPGSV,3,1,10,10,17,287,38,13,14,035,33,15,48,027, 44,20,31,312,42*71
$GPGSV,3,2,10,21,43,338,47,24,41,127,37,29,55,201, 47,32,15,223,32*79
$GPGSV,3,3,10,46,41,252,44,51,62,230,43*7C
!AIVDO,1,1,,,B5NWQH0006J9goR?Adh03wm5kP06,0*5E
$GPGLL,1538.97720,N,08859.75212,W,183441.00,A,A*7B
$GPRMC,183442.00,A,1538.97721,N,08859.75208,W,0.04 0,,081019,,,A*6E
$GPVTG,,T,,M,0.040,N,0.074,K,A*24
$GPGGA,183442.00,1538.97721,N,08859.75208,W,1,08,1 .10,9.5,M,-6.2,M,,*5A
$GPGSA,M,3,21,20,29,24,32,10,13,15,,,,,2.39,1.10,2 .13*0C
$GPGSV,3,1,10,10,17,287,39,13,14,035,33,15,48,027, 45,20,31,312,43*70
$GPGSV,3,2,10,21,43,338,49,24,41,127,37,29,55,201, 48,32,15,223,31*7B
!AIVDO,1,1,,,B5NWQH0006J9gp2?Adh03wmUkP06,0*41
$GPGSV,3,3,10,46,41,252,45,51,62,230,44*7A
$GPGLL,1538.97721,N,08859.75208,W,183442.00,A,A*72
$GPRMC,183443.00,A,1538.97723,N,08859.75204,W,0.01 9,,081019,,,A*6D
$GPVTG,,T,,M,0.019,N,0.035,K,A*2D
$GPGGA,183443.00,1538.97723,N,08859.75204,W,1,08,1 .10,9.5,M,-6.2,M,,*55
$GPGSA,M,3,21,20,29,24,32,10,13,15,,,,,2.39,1.10,2 .13*0C
$GPGSV,3,1,10,10,17,287,40,13,14,035,32,15,48,027, 44,20,31,312,43*7E
$GPGSV,3,2,10,21,43,338,49,24,41,127,37,29,55,201, 47,32,15,223,31*74
$GPGSV,3,3,10,46,41,252,45,51,62,230,44*7A
!AIVDO,1,1,,,B5NWQH0006J9gp2?Adh03wn5kP06,0*22
$GPGLL,1538.97723,N,08859.75204,W,183443.00,A,A*7D
$GPRMC,183444.00,A,1538.97724,N,08859.75202,W,0.04 5,,081019,,,A*62
$GPVTG,,T,,M,0.045,N,0.083,K,A*29
$GPGGA,183444.00,1538.97724,N,08859.75202,W,1,08,1 .10,9.6,M,-6.2,M,,*50
$GPGSA,M,3,21,20,29,24,32,10,13,15,,,,,2.39,1.10,2 .13*0C
$GPGSV,3,1,10,10,17,287,40,13,14,035,31,15,48,027, 44,20,31,312,43*7D
$GPGSV,3,2,10,21,43,338,48,24,41,127,37,29,55,201, 47,32,15,223,30*74
$GPGSV,3,3,10,46,41,252,45,51,62,230,44*7A
Tracy Andacht is offline   Reply With Quote
Old 08-10-2019, 13:20   #19
Registered User
 
Dsanduril's Avatar

Join Date: Aug 2011
Location: Petersburg, AK
Boat: Outremer 50S
Posts: 4,229
Re: Opencpn not seeing serial AIS/GPS data

I didn't check everything, but:

$GPRMC,183745.00,A,1538.97790,N,08859.75121,W,0.04 1,,081019,,,D*6C
$GPVTG,,T,,M,0.041,N,0.076,K,D*22
$GPGGA,183745.00,1538.97790,N,08859.75121,W,2,10,0 .88,12.5,M,-6.2,M,,0000*6C

Two of the first three checksums are incorrect. The checksums are correct if you remove the spaces (shown in orange) from these sentences. That indicates a problem with the NAIS software/firmware that would have to be addressed by the manufacturer.

You'd think that unchecking the "control checksum" box in OpenCPN would allow them through, and there are other sentences that are correct,but...

Not sure where to go from here, I'll see if I can play around with the output you sent and figure out what's happening, but that may take a little time.

BTW, wish I was where you are (from the coordinates in the sentences). Seems like a nice place to be.

[Edit] Checked a few more of the sentences, any sentence with a space has a checksum error. They're the same sentences in both HyperTerm and NAIS so I suspect the spaces are really there. Not sure how OpenCPN is dealing with this, that's the next step to investigate.
Dsanduril is offline   Reply With Quote
Old 08-10-2019, 16:52   #20
Moo
Registered User

Join Date: Mar 2017
Posts: 804
Re: Opencpn not seeing serial AIS/GPS data

Quote:
Originally Posted by Dsanduril View Post
I didn't check everything, but:

$GPRMC,183745.00,A,1538.97790,N,08859.75121,W,0.04 1,,081019,,,D*6C
$GPVTG,,T,,M,0.041,N,0.076,K,D*22
$GPGGA,183745.00,1538.97790,N,08859.75121,W,2,10,0 .88,12.5,M,-6.2,M,,0000*6C

Two of the first three checksums are incorrect. The checksums are correct if you remove the spaces (shown in orange) from these sentences. That indicates a problem with the NAIS software/firmware that would have to be addressed by the manufacturer.

You'd think that unchecking the "control checksum" box in OpenCPN would allow them through, and there are other sentences that are correct,but...

Not sure where to go from here, I'll see if I can play around with the output you sent and figure out what's happening, but that may take a little time.

BTW, wish I was where you are (from the coordinates in the sentences). Seems like a nice place to be.

[Edit] Checked a few more of the sentences, any sentence with a space has a checksum error. They're the same sentences in both HyperTerm and NAIS so I suspect the spaces are really there. Not sure how OpenCPN is dealing with this, that's the next step to investigate.
Given the above.. Tracy have are you using the NMEA debug window? Are you seeing rejected data there?
Moo is offline   Reply With Quote
Old 08-10-2019, 17:10   #21
Registered User

Join Date: Oct 2019
Posts: 18
Re: Opencpn not seeing serial AIS/GPS data

Thank you. I'll contact the manufacturer (B and G, I believe). As for the nmea debug window in Opencpn, I am not seeing any text at all.
Tracy Andacht is offline   Reply With Quote
Old 08-10-2019, 17:55   #22
Registered User
 
Dsanduril's Avatar

Join Date: Aug 2011
Location: Petersburg, AK
Boat: Outremer 50S
Posts: 4,229
Re: Opencpn not seeing serial AIS/GPS data

I set up a simulated serial port and played back both sets of data into OpenCPN. Both worked OK, even with checksum checking. Below is a screenshot from OpenCPN, so not sure where to suggest you look from here, as what I simulate seems to work.

Click image for larger version

Name:	Capture.jpg
Views:	82
Size:	408.4 KB
ID:	201221

[Edit] - I realized I am testing on 4.8.4, will install 5 and test on that.

Also, took a look at the sentences, the extra space is only in sentences > 50 characters, and appears at position 51 in each case, so clearly a programming bug in the NAIS, you can let them know if you talk with them.

Sorry for using 4.8.4, will get 5 up and see what that does - [More edit] same result.

Click image for larger version

Name:	Capture2.JPG
Views:	73
Size:	333.7 KB
ID:	201223
Dsanduril is offline   Reply With Quote
Old 08-10-2019, 19:42   #23
Registered User
 
Dsanduril's Avatar

Join Date: Aug 2011
Location: Petersburg, AK
Boat: Outremer 50S
Posts: 4,229
Re: Opencpn not seeing serial AIS/GPS data

Well, probably should have started here:

Close OpenCPN

Delete\rename opencpn.log (Should be in \ProgramData\opencpn)

Restart OpenCPN

Open OpenCPN.log in Notepad

If it was able to find and open the serial port you should see something like:

Quote:
6:45:21 Opening NMEA Datastream Serial:COM7
But if it can't open the serial port then you should see:

Quote:
6:48:54 Opening NMEA Datastream Serial:COM7
6:48:54 PM: NMEA input device open failed: COM7
That should tell us if it is actually able to open the NAIS virtual com port. Could be something with the USB driver that doesn't open/create the port fast enough. Not sure what solution could be to that problem.

If the port does open, then shut down OpenCPN again.

Edit (with Notepad) OpenCPN.ini (should be in \ProgramFiles(x86)\OpenCPN)

Add a line at the top of the [Settings] section that says:

DebugNMEA=100

Save the file. This will tell OpenCPN to log NMEA messages (the first 100).

Delete/rename OpenCPN.log again (just so it is empty, easy to search).

Restart OpenCPN.

Check the log file. You should find some messages like these:

Quote:
6:34:26 PM: MEH.NMEA Sentence received...!AIVDO,1,1,,A,H5NWQH0hDTh4pV22222222222 20,2*59

6:34:26 PM: Changing NMEA Datasource for AIVDO to Serial:COM7 (Priority: 1)
6:34:26 PM: Invalid AIVDO Sentence...!AIVDO,1,1,,A,H5NWQH0hDTh4pV22222222222 20,2*59

6:34:26 PM: MEH.NMEA Sentence received...$PAMC,R,TXT,000,TX_PWR,Lv=0,2011,1.620* 11

6:34:26 PM: Changing NMEA Datasource for PAMC, to Serial:COM7 (Priority: 1)
6:34:26 PM: MEH.NMEA Sentence received...$GPRMC,183441.00,A,1538.97720,N,08859.7 5212,W,0.03 2,,081019,,,A*62

6:34:26 PM: >>>>>>NMEA Sentence Checksum Bad...$GPRMC,183441.00,A,1538.97720,N,08859.75212, W,0.03 2,,081019,,,A*62

6:34:26 PM: MEH.NMEA Sentence received...$GPVTG,,T,,M,0.032,N,0.059,K,A*2E

6:34:26 PM: Changing NMEA Datasource for GPVTG to Serial:COM7 (Priority: 1)
6:34:26 PM: MEH.NMEA Sentence received...$GPGGA,183441.00,1538.97720,N,08859.752 12,W,1,08,1 .10,9.5,M,-6.2,M,,*53

6:34:26 PM: >>>>>>NMEA Sentence Checksum Bad...$GPGGA,183441.00,1538.97720,N,08859.75212,W, 1,08,1 .10,9.5,M,-6.2,M,,*53

6:34:26 PM: MEH.NMEA Sentence received...$GPGSA,M,3,21,20,29,24,32,10,13,15,,,,, 2.39,1.10,2 .13*0C
Go back to OpenCPN.ini and delete the DebugNMEA=100 from the file, no reason to leave it on and clogging the log file.

Report back here on the results.

Hope that gets you somewhere.
Dsanduril is offline   Reply With Quote
Old 08-10-2019, 22:01   #24
Registered User

Join Date: Jun 2013
Location: canada
Posts: 4,662
Re: Opencpn not seeing serial AIS/GPS data

Does the ais send out ais data via USB? Normally you’d run the nmea 183 output to a serial port or s serial to USB converter.
smac999 is offline   Reply With Quote
Old 08-10-2019, 22:21   #25
Registered User
 
Reefmagnet's Avatar

Join Date: May 2008
Location: puɐןsuǝǝnb 'ʎɐʞɔɐɯ
Boat: Nantucket Island 33
Posts: 4,864
Re: Opencpn not seeing serial AIS/GPS data

Quote:
Originally Posted by smac999 View Post
Does the ais send out ais data via USB? Normally you’d run the nmea 183 output to a serial port or s serial to USB converter.

It should do. Drivers are used to make the USB connection appear as a regular COM Port set to 38400 baud and this is what OpenCPN gets configured to connect to.
Reefmagnet is offline   Reply With Quote
Old 09-10-2019, 15:09   #26
Registered User

Join Date: Oct 2019
Posts: 18
Re: Opencpn not seeing serial AIS/GPS data

Just a couple of replies to the latest posts. Yes, the NAIS data is sent out through a USB port (mini USB).

I had partial success in seeing the nmea data in the OpenCPN debug window. I played around with the connection settings, clicking each one on and off, saving the profile, deleting the profile, creating new profiles, in a rather random way. On several occasions, after playing around for 15-20 min, data started streaming in the debug window. As long as I didn't turn off the AIS, the connection remained, and the information messages went away (eg. closing and reopening Opencpn was not an issue with maintaining the connection as well as disabling and enabling the connection). If I closed Opencpn, and shut off the AIS, turned the AIS on again, and opened Opencpn, the saved connection no longer showed data coming into Opencpn. If I kept clicking around the connection settings, on occasion I would 'tickle' the connection and would see data streaming into the debug window. I have no idea what I did, and cannot repeat it reproducibly. Probably not very helpful for troubleshooting, but it does indicate that Opencpn can see the data.

I will play around with the log and ini files next. Thanks for all your help.
Tracy Andacht is offline   Reply With Quote
Old 09-10-2019, 15:36   #27
Registered User

Join Date: Oct 2019
Posts: 18
Re: Opencpn not seeing serial AIS/GPS data

I checked the log file, and Opencpn was able to find and open the serial port. However, when I added the DebugNMEA=100 to the Setting section of the ini file, the log file did not show any additional messages. I searched for 'NMEA' in the log file, and only found the line that Opencpn was able to find and open the serial port. I doublechecked the ini file, and the DebugNMEA=100 was there at the top of the file.
Tracy Andacht is offline   Reply With Quote
Old 09-10-2019, 15:50   #28
Registered User
 
Dsanduril's Avatar

Join Date: Aug 2011
Location: Petersburg, AK
Boat: Outremer 50S
Posts: 4,229
Re: Opencpn not seeing serial AIS/GPS data

Interesting stuff. I think the debug window and the log should show pretty much the same stuff, so the messages won't show up in the log until the port is 'tickled' just right.

Putting on the thinking cap, since OpenCPN shows the port as open but the NAIS only sends sometimes. Should just stream continuously. Makes me wonder if the NAIS is looking for a CTS signal on the serial port. I'm not in front of a computer at the moment, will look later to see if there is a way to force CTS on a virtual port. And let the hat work on other possible options.

(Edit) there's a set of very old programs on Sourceforge I've been using for the simulation. com0com and hub4com. These create virtual serial port pairs and it is possible to link them to real or other virtual ports. It would be a real kludge to have the NAIS hooked up through there but might be an option. If we can't get anywhere and you would be interested then let me know and I can try to work out a configuration.
Dsanduril is offline   Reply With Quote
Old 09-10-2019, 17:33   #29
Moo
Registered User

Join Date: Mar 2017
Posts: 804
Re: Opencpn not seeing serial AIS/GPS data

Quote:
Originally Posted by Dsanduril View Post
Interesting stuff. I think the debug window and the log should show pretty much the same stuff, so the messages won't show up in the log until the port is 'tickled' just right.

Putting on the thinking cap, since OpenCPN shows the port as open but the NAIS only sends sometimes. Should just stream continuously. Makes me wonder if the NAIS is looking for a CTS signal on the serial port. I'm not in front of a computer at the moment, will look later to see if there is a way to force CTS on a virtual port. And let the hat work on other possible options.

(Edit) there's a set of very old programs on Sourceforge I've been using for the simulation. com0com and hub4com. These create virtual serial port pairs and it is possible to link them to real or other virtual ports. It would be a real kludge to have the NAIS hooked up through there but might be an option. If we can't get anywhere and you would be interested then let me know and I can try to work out a configuration.
Tracy -

You could install GPSGate Splitter https://gpsgate.com/download/gpsgate_client and use it to serve all of your apps simultaneously. It is very stable and reliable app and I use it all the time for lots of windows serial and UDP/TCP connections.

I suspect that the problem is a driver issue. Have you checked to see if you have the latest drivers installed for that chipset (the tools in Device Manager - if you are not familiar with it you can get to it easily via Windows key + X then M of select from the menu that pops up).

Also in device manager you can turn flow control on and off - this link should show you Configuring Windows USB Virtual COM Ports

Chris
Moo is offline   Reply With Quote
Old 09-10-2019, 19:09   #30
Registered User

Join Date: Nov 2015
Boat: Fountaine Pajot Marquises 56
Posts: 66
Re: Opencpn not seeing serial AIS/GPS data

How about trying out one the serial port sniffers?

I've used Eltima's Serial Port Monitor, and I've heard excellent things about AGG Software's product as well.

AGG also has a USB sniffer. Might be a little overwhelming at first, but all kinds of interesting information may be gathered from using these types of tools.
Frode is offline   Reply With Quote
Reply

Tags
ais, enc, gps, opencpn, serial


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Seeing my own AIS transmission on Raymarine plotter masonc Marine Electronics 21 18-06-2019 12:00
OpenCPN not seeing dAISy output Lomax OpenCPN 45 14-12-2016 22:23
opencpn not getting gps/ais data kcj OpenCPN 25 11-12-2016 11:31
AIS to OpenCPN serial pin #s svjoyeux OpenCPN 1 22-09-2012 17:16

Advertise Here


All times are GMT -7. The time now is 23:32.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.