Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 01-07-2018, 07:32   #1
Registered User

Join Date: Jul 2018
Posts: 11
NMEA sentences sent to GPS repeater lack CR LF at end of phrase?

I think the opencpn does not add the CRLF at the NMEA sentences to be sent or output to an autopilot or GPS repeater.


I have installed opencpn version 4.8.4 Build 2018-04-21 and do run it on a windows 10 tablet. Use oesens charts, a NMEA multiplexer on COM4 (4800), a Garmin GPS receiver and a Nasa clipper GPS repeater. To say it upfront, the connection between the GPS and ist repeater works perfect, until opencpn comes into the play.


My aim was to supply an existing GPS repeater (NASA clipper) in the cockpit with bearing, tracking, SOG, distance to waypoint. The old GPS shall be replaced, because it’s to slow and oftens shuts down during sailing. So i was eager to test opencpn out. It works nearly perfect, got all the inputs from AIS, GPS mouse, GPS from Garmin, wind instrument running. Only the sending of NMEA sentences to my GPS repeater does not work properly.


The repeater receives the NMEA signals. The first signals sent with the repeater in the settings Position shows correct position received from the external GPS (Garmin GPS 158i) – then the disaster starts. The display shows in the following a crumble of letters and switches on and off all signs. First i thought it was caused by a wrong baudrate and tried out several ones ranging from 1200 to 9600 - with no difference.


I plugged the repeater (NMEA in @ 4800) diectly into the GPS and the world was fine again. Everything displayed correctly.
Then again through opencpn and now I analysed the data stream between the GPS through opencpn to the repeater by watching the NMEA debugger
The sentences received nearly comply with the sentence sent– with only one however important exception:
- the sentences received (black from COM4: NMEA Multiplexer) finish with CRLF <0x0D><0x0A>
- The sentences sent (blue to COM4 lack that CRLF <0x0D><0x0A>. I can’t see them in the debugger and the lack would explain the odd behaviour of the GPS repeater. For the GPS repeater the sentence is NOT finished, so it displays also the following letters. In the example in the picture 1 (please see attachment) it starts wit $GPRMB and it does not stop with the checksum but continues then with the next line $GPGGA and then GPGSA.


Also in the documentation all screenshots with NMEA sentences been sent for example to an autopilot, they lack the CRLF at the end. Although i have read in the documentation that opencpn would process the CRLF, i suspect that exactly not happening.



One thread in the forum mentioned the GSA command, what opencpn itself does not provide. But in my case that GSA was provided by the Garmin GPS and then sent to the output, as shown in the pic 1 in the 3rd blue line.



For me all the observations make only sense, if the CRLF are not added to the NMEA sentence sent from opencpn.


I have checked the opencpn documentation and found in none of the screenshos for NMEA sentences sent (connection to Autopilot) the CRLF at the end of the sentence. (example in picture 2 in the ttachment here chapter „connections“: black – received with CRLF, blue without

Maybe the AP understand the sentences better than the GPS repeater, but the lack of the CRLF explains the odd behavior of the display of the GPS repeater.


I checked also the ini file an found nothing about CRLF at the NMEA sentences. Or is there anywhere a flag which says if o if not a CRLF <0x0D><0x0A> shall be added ?


Or is there a bug forgetting the CRLF at the sentences sent ?
Attached Thumbnails
Click image for larger version

Name:	pic1.png
Views:	46
Size:	33.3 KB
ID:	172828   Click image for larger version

Name:	pic2.png
Views:	47
Size:	248.8 KB
ID:	172829  

__________________

kumado77 is offline   Reply With Quote
Old 01-07-2018, 07:45   #2
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 5,228
Re: NMEA sentences sent to GPS repeater lack CR LF at end of phrase?

Looking at https://github.com/OpenCPN/OpenCPN/b...tream.cpp#L758 it seems impossible a sentence without <CR><LF> leaves OpenCPN - Even if whatever producer did not append it itself, we do add it before we send it out.
I'm afraid you will have to look further. If your ports are not hardware but some USB-serial converters, I would probably try to switch for another one as especially the ones for a dollar from ebay are not always exactly a reliable piece of equipment.

Pavel
__________________

nohal is offline   Reply With Quote
Old 01-07-2018, 08:12   #3
Registered User

Join Date: Jul 2018
Posts: 11
Re: NMEA sentences sent to GPS repeater lack CR LF at end of phrase?

Hallo,

it was also my suspect, the nmea multiplexer eats up the crlf, however why does the Nmea debugger shows the crlf for the phrases received, but nothing for the phrases sent?

The lack of them in the debugger makes me suspicious. When added, i thought, they should appear there too?

I use a "shipmodul" multiplexer (from holland), not just really an "ebay" product.
kumado77 is offline   Reply With Quote
Old 01-07-2018, 09:44   #4
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 13,936
Re: NMEA sentences sent to GPS repeater lack CR LF at end of phrase?

What next? - conundrum.
rgleason is offline   Reply With Quote
Old 01-07-2018, 10:00   #5
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 5,956
Re: NMEA sentences sent to GPS repeater lack CR LF at end of phrase?

Kumado77

Code check shows that we only log ending CR/LF on input sentences. We should not see logging of CR/LF for output sentences, although as Nohal states, we always add it if needed.

Probably some other users are using the NASA Clipper, and could comment.

Thanks
Dave
bdbcat is offline   Reply With Quote
Old 01-07-2018, 12:40   #6
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 5,228
Re: NMEA sentences sent to GPS repeater lack CR LF at end of phrase?

Quote:
Originally Posted by kumado77 View Post
Hallo,

it was also my suspect, the nmea multiplexer eats up the crlf, however why does the Nmea debugger shows the crlf for the phrases received, but nothing for the phrases sent?

The lack of them in the debugger makes me suspicious. When added, i thought, they should appear there too?

I use a "shipmodul" multiplexer (from holland), not just really an "ebay" product.
You can check how the sentences look at the shipmodul miniplex multiplexer using their MPX-Config tool. Also make sure you have up to date firmware on it.
Maybe I missed it, but it is still not completely clear to me what your topology actually is and what is connected to what, but in any case you have to make sure you set the correct port speeds for every single one of those connections - not just the one from OpenCPN to he multiplexer, but also for the miniplex port to which the Clipper is connected (if that is how you have it connected) etc.
I have met numerous boats with both the Shipmodul Miniplex and the NASA Clipper instruments working fine with OpenCPN, so my bet is it is something particular to your config.
nohal is offline   Reply With Quote
Old 02-07-2018, 06:32   #7
Registered User

Join Date: May 2014
Posts: 502
Re: NMEA sentences sent to GPS repeater lack CR LF at end of phrase?

You might like to check this thread I had a similar problem with Route / Waypoints into Garmin GPS

http://www.cruisersforum.com/forums/...in-128119.html

It works fine for WP's only upto 20.

Peter
Tupaia is offline   Reply With Quote
Old 03-07-2018, 00:19   #8
Registered User

Join Date: Jul 2018
Posts: 11
Re: NMEA sentences sent to GPS repeater lack CR LF at end of phrase?

Thanks for the many inputs.
I will chck the sipmodul miniplex lite with the tool.

I meanwhile also have the virtual comport in mind. I used that which came along with the Kendau GPS mouse.
Which ones are you using ?
__________________

kumado77 is offline   Reply With Quote
Reply

Tags
enc, gps, nmea

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Which NMEA Sentences Does an Autopilot Use ? svpresent Marine Electronics 8 02-05-2020 16:42
NMEA-0183 Sentences DSC, DSE continuouswave Marine Electronics 3 14-02-2017 09:48
OpenCPN 3.3.xxxx and plugins : NMEA sentences list ? Gilletarom OpenCPN 17 01-05-2014 06:02
Bug? OpenCPN ignoring lots of NMEA sentences - help! chris14679 OpenCPN 9 29-04-2014 18:37
OpenCPN not sending NMEA autopilot sentences. Islander OpenCPN 6 16-04-2014 07:02

Advertise Here


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


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.