Cruisers Forum
 


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 16-06-2023, 13:52   #1
Registered User

Join Date: Apr 2023
Posts: 36
NMEA 2000 support in OpenCPN

The v5.8.2 release notes say there's now "Integrated NMEA 2000 network capability". I'm working on getting a Yacht Devices YDTA-04 NMEA 2000 fluid level interface to send data to Engine Dashboard in OpenCPN. The Engine Dashboard page says you can either use the TwoCan plugin version 1.6 and later or you can use the built-in NMEA2000® support that is available in OpenCPN version 5.8 and later.

I'm challenged to get TwoCan working--there is no 5.8 ready version. If the fluid gauges in Engine Dashboard aren't displaying the fluid level data that I'm seeing in the NMEA debug window, does that mean the NMEA 2000 support in OpenCPN just doesn't yet support fluid data, or does it mean I need to configure something to get OpenCPN to properly translate the NMEA 2000 data?
Bella Donna is offline   Reply With Quote
Old 17-06-2023, 00:40   #2
Registered User

Join Date: Mar 2011
Posts: 718
Re: NMEA 2000 support in OpenCPN

The latest version of the Engine Dashboard; 1.5 supports 3 data protocols:

1. NMEA 0183 V 4.11 using standard RPM and XDR sentence prefixes.

2. NMEA 2000 using standard Parameter Group Numbers (PGN) 127488 & 127489 for engine related data and 127505 for fluid levels.

3. SignlaK using the appropriate delta updates.

All of these are received by the Engine Dashboard from OpenCPN's messaging services.

In the case of NMEA 2000, you can either use the TwoCan plugin with any of its supported CAN Bus interfaces and it converts the NMEA 2000 messages into NMEA 183 sentences which in turn are decoded by the Engine Dashboard, or you can use OpenCPN with any of its supported CAN Bus interfaces in which case the Engine Dashboard decodes the raw NMEA 2000 data.

When using OpenCPN's built-in NMEA 2000 support, it does not perform any decoding of Engine or Fluid Level data, it merely forwards the messages to the Engine Dashboard where the NMEA 2000 messages are decoded.
stevead is offline   Reply With Quote
Old 17-06-2023, 09:42   #3
Registered User

Join Date: Apr 2023
Posts: 36
Re: NMEA 2000 support in OpenCPN

<<2. NMEA 2000 using standard Parameter Group Numbers (PGN) 127488 & 127489 for engine related data and 127505 for fluid levels.

That being the case, my question is, why aren't the fluid levels being displayed?

Attached is a screenshot of what I'm getting from the YDTA-04 N2K fluid level interface in the NMEA debug window. Both the PGN and DIN sentences have the HEX string 0x01F211 which translates to 127505, the PGN for fluid levels, so it seems like my issue is that the HEX isn't being converted to decimal.

Also in the screenshot is a simultaneous capture of the decoded tank levels displayed by CANView. I've tried to make sense of the rest of the HEX I'm seeing in the debug window, but have been unsuccessful.
Attached Thumbnails
Click image for larger version

Name:	image (5).jpg
Views:	135
Size:	335.3 KB
ID:	276850  
Bella Donna is offline   Reply With Quote
Old 17-06-2023, 12:39   #4
Registered User

Join Date: Mar 2011
Posts: 718
Re: NMEA 2000 support in OpenCPN

I have a sneaking suspicion that you have connected the YDTA-04 tank adapter via a USB cable to your PC.

The data that is displayed in the NMEA Debug Window appears to be a Yacht Devices encoding of NMEA 2000 messages in a NMEA 183 proprietary sentence format, neither of which is supported by TwoCan or OpenCPN's built-in NMEA 2000 support.

When using OpenCPN's built-in NMEA 2000 support, NMEA 2000 data looks like this in the NMEA Debug Window:
Code:
<GREEN>21:36:05 (N2000) PGN: 127505 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Fluid level. Not used by OCPN, maybe by Plugins

<GREEN>21:36:05 (N2000) PGN: 127488 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Engine rapid param. Not used by OCPN, maybe by Plugins

<GREEN>21:36:05 (N2000) PGN: 127508 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Battery Status. Not used by OCPN, maybe by Plugins

<GREEN>21:36:05 (N2000) ...Repeated 1 times

<GREEN>21:36:05 (N2000) PGN: 130310 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: DBoard: Envorinment data

<GREEN>21:36:05 (N2000) PGN: 127489 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Engine parameters dynamic. Not used by OCPN, maybe by Plugins

<GREEN>21:36:05 (N2000) PGN: 127505 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Fluid level. Not used by OCPN, maybe by Plugins

<GREEN>21:36:05 (N2000) PGN: 127488 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Engine rapid param. Not used by OCPN, maybe by Plugins

<GREEN>21:36:05 (N2000) PGN: 127508 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Battery Status. Not used by OCPN, maybe by Plugins

<GREEN>21:36:05 (N2000) ...Repeated 1 times

<GREEN>21:36:05 (N2000) PGN: 130310 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: DBoard: Envorinment data

<GREEN>21:36:05 (N2000) PGN: 127489 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Engine parameters dynamic. Not used by OCPN, maybe by Plugins

<GREEN>21:36:05 (N2000) PGN: 127505 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Fluid level. Not used by OCPN, maybe by Plugins

<GREEN>21:36:05 (N2000) PGN: 127488 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Engine rapid param. Not used by OCPN, maybe by Plugins

<GREEN>21:36:05 (N2000) PGN: 127508 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Battery Status. Not used by OCPN, maybe by Plugins

<GREEN>21:36:05 (N2000) ...Repeated 1 times

<GREEN>21:36:05 (N2000) PGN: 130310 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: DBoard: Envorinment data

<GREEN>21:36:05 (N2000) PGN: 127489 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Engine parameters dynamic. Not used by OCPN, maybe by Plugins

<GREEN>21:36:05 (N2000) PGN: 127505 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Fluid level. Not used by OCPN, maybe by Plugins

<GREEN>21:36:05 (N2000) PGN: 127488 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Engine rapid param. Not used by OCPN, maybe by Plugins

<GREEN>21:36:05 (N2000) PGN: 127508 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Battery Status. Not used by OCPN, maybe by Plugins

<GREEN>21:36:05 (N2000) ...Repeated 1 times

<GREEN>21:36:05 (N2000) PGN: 130310 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: DBoard: Envorinment data

<GREEN>21:36:05 (N2000) PGN: 127489 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Engine parameters dynamic. Not used by OCPN, maybe by Plugins

<GREEN>21:36:05 (N2000) PGN: 127505 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Fluid level. Not used by OCPN, maybe by Plugins

<GREEN>21:36:05 (N2000) PGN: 127488 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Engine rapid param. Not used by OCPN, maybe by Plugins

<GREEN>21:36:05 (N2000) PGN: 127508 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Battery Status. Not used by OCPN, maybe by Plugins

<GREEN>21:36:05 (N2000) ...Repeated 1 times

<GREEN>21:36:05 (N2000) PGN: 130310 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: DBoard: Envorinment data

<GREEN>21:36:05 (N2000) PGN: 127489 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Engine parameters dynamic. Not used by OCPN, maybe by Plugins

<GREEN>21:36:05 (N2000) PGN: 127505 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Fluid level. Not used by OCPN, maybe by Plugins

<GREEN>21:36:05 (N2000) PGN: 127488 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Engine rapid param. Not used by OCPN, maybe by Plugins

<GREEN>21:36:05 (N2000) PGN: 127508 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Battery Status. Not used by OCPN, maybe by Plugins

Both TwoCan or OpenCPN's built-in NMEA 2000 support require a connection to a NMEA 2000 network using any of the respective supported adapters.
stevead is offline   Reply With Quote
Old 17-06-2023, 13:10   #5
Registered User

Join Date: Apr 2023
Posts: 36
Re: NMEA 2000 support in OpenCPN

Thanks stevead--My connection isn't by USB. Right now, on my test bench, in an effort to figure this out, I have the a minimal N2K network consisting of the YDTA-04 tank adapter, a Yacht Devices YDNR-02 N2K to WiFi router, and a power connection. I'm connecting my Mac over WiFi. This is basically how the N2K network is on the boat, except that I'm using a Yacht Devices ethernet router. All devices connected are N2K devices-- satellite compass, depth sounder, AIS, etc, and those have worked nicely with OpenCPN.

I'm pretty sure that the router functionality of the ethernet and WiFi versions are the same.

The YDNR-02 server that works for getting data to show up in the debug window is set to UDP, NMEA 0183, port 1457, and Transmit only. If I set it to RAW, my only other data protocol choice, data stops flowing to the debug window.

Given what you understand about what I'm trying to do, and what my setup is, are you surmising that I either need to get TwoCan working, or get another N2K adapter?
Bella Donna is offline   Reply With Quote
Old 17-06-2023, 17:08   #6
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,463
Re: NMEA 2000 support in OpenCPN

BellaDonna...


OpeCPN 5.8.x supports NMEA2000 by hard wire connection only.
NMEA2000 by ethernet (WiFi or hardline) is not supported.
Why?
Because there is no generally accepted standard for such transmission. The hardware solutions available follow vendor specific protocols, which are difficult to implement and test.


We have tested and recommend the YDNU-02 hardwire NMEA2000 adapter.


Good Luck
Dave
bdbcat is online now   Reply With Quote
Old 17-06-2023, 20:07   #7
Registered User

Join Date: Mar 2016
Location: San Francisco
Boat: Morgan 382
Posts: 3,124
Re: NMEA 2000 support in OpenCPN

Quote:
Originally Posted by bdbcat View Post
BellaDonna...


OpeCPN 5.8.x supports NMEA2000 by hard wire connection only.
NMEA2000 by ethernet (WiFi or hardline) is not supported.
Why?
Because there is no generally accepted standard for such transmission. The hardware solutions available follow vendor specific protocols, which are difficult to implement and test.


We have tested and recommend the YDNU-02 hardwire NMEA2000 adapter.


Good Luck
Dave
You have said this before, and i question it. There is no new standard because it just uses the existing n2k standard. Both Yacht Devices and Actisense support a raw mode, that seems to be n2k exactly as on the can bus except over tcp or udp. It should work with the same code you already use, just with a tcp stream instead of a udp stream.

They each have a proprietary version too, which i think is more human readable and adds a timestamp. But the raw mode is there for apps that don't want to support the proprietary.

If you PM me, i will buy you or another developer a yacht devices ydwg-02 for testing.
wholybee is offline   Reply With Quote
Old 17-06-2023, 20:18   #8
Registered User

Join Date: Apr 2023
Posts: 36
Re: NMEA 2000 support in OpenCPN

Would there be a difference between how data is converted and/or sent to OpenCPN if I use the YDWG-02 vs the YDNR-02 vs the YDEN-02? I'm really hoping to not have to use a USB connection to my Mac.
Bella Donna is offline   Reply With Quote
Old 17-06-2023, 20:36   #9
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,463
Re: NMEA 2000 support in OpenCPN

wholybee...


Not to be too pedantic, but...
"...because it just uses the existing n2k standard"


The N2K standard applies (so far) only to canBus (or canBus-like) hardware interfaces. It is reasonable to imagine sending the identical raw stream over UDP or TCP. But it is by no means a standard, yet.


For example, is something like YDNR-02 bidirectional in data flow? Is there any concept of N2K address negotiation, or is this all handled by the gateway? Is it possible to poll all N2K devices on the other side of the gateway to get their capabilities? Could we write PGNs to, say, an autopilot with this interface? Etc... All undefined, AFAICT. But there may be public documentation on this stuff. Just a little opaque at the moment.


I myself like the general idea of less wire and delicate connectors. But N2K over ethernet was a bridge to far (excuse the pun) for O5.8.x


Thanks
Dave
bdbcat is online now   Reply With Quote
Old 17-06-2023, 21:07   #10
Registered User

Join Date: Mar 2016
Location: San Francisco
Boat: Morgan 382
Posts: 3,124
Re: NMEA 2000 support in OpenCPN

That is a disappointing position. I'm not going to guess what percentage of opencpn users connect via a wireless gateway, but i imagine its quite large and growing, with wired connections shrinking. The n2k support built into OCPN is useless to us. And anyone using a phone or tablet. I don't think there is anything secret about what yacht devices is doing. Has anyone asked them or actisense for information? Both companies want their products to work with a wide product range.
__________________
-Warren
wholybee is offline   Reply With Quote
Old 17-06-2023, 21:11   #11
Registered User

Join Date: Mar 2016
Location: San Francisco
Boat: Morgan 382
Posts: 3,124
Re: NMEA 2000 support in OpenCPN

"We are working on it and it will be there in a future version" is perfectly acceptable, fwiw. It just disappointing that a core feature would be so limited and incompatible with wifi/Ethernet.
__________________
-Warren
wholybee is offline   Reply With Quote
Old 18-06-2023, 01:36   #12
Registered User

Join Date: Mar 2011
Posts: 718
Re: NMEA 2000 support in OpenCPN

The simple solution to the original question is to simply use the NMEA 2000 <--> NMEA 183 conversion feature on the Yacht Devices gateway..

The Yacht Devices gateway will convert PGN 127505 to the respective NMEA 183 XDR sentence.

No need to consider TwoCan or OpenCPN"s built-in NMEA 2000 support.

Dave's reply to NMEA 2000 over TCP/IP is far more eloquent and diplomatic than what I would've expressed.
stevead is offline   Reply With Quote
Old 19-06-2023, 16:04   #13
Registered User

Join Date: Apr 2023
Posts: 36
Re: NMEA 2000 support in OpenCPN

Quote:
Originally Posted by stevead View Post

When using OpenCPN's built-in NMEA 2000 support, NMEA 2000 data looks like this in the NMEA Debug Window:
Code:
<GREEN>21:36:05 (N2000) PGN: 127505 Source: nmea2000 socketCAN-vcan0 ID: 22  Desc: Fluid level. Not used by OCPN, maybe by Plugins
What I don't understand (among many other things...) is where is the data carried, in this case for fluid level? Is there a way to see that in the debug window, or somewhere else?
Bella Donna is offline   Reply With Quote
Old 19-06-2023, 20:41   #14
Registered User

Join Date: Apr 2023
Posts: 36
Re: NMEA 2000 support in OpenCPN

Is there a programming/syntax guide for NMEAConverter?
Bella Donna is offline   Reply With Quote
Old 19-06-2023, 21:09   #15
Registered User

Join Date: Aug 2020
Posts: 936
Re: NMEA 2000 support in OpenCPN

https://opencpn.org/wiki/dokuwiki/do...nmea_converter


It works beautifully
markxengineerin is offline   Reply With Quote
Reply

Tags
enc, nmea, nmea 2000, opencpn


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
NMEA 2000 support mgrouch OpenCPN 6 08-11-2021 08:01
Raymarine NMEA 2000 -> NMEA 2000 cable GreenHeaven Marine Electronics 5 24-08-2021 03:52
Adding a NMEA 2000 Chart Plotter to a NMEA 0183 Network SailingPNW Marine Electronics 28 26-04-2021 07:00
NMEA 2000 to NMEA 0183 Davidhoy Marine Electronics 26 13-12-2019 18:39
Troubleshooting NMEA 2000 and the troubles with NMEA 200 Suijin Marine Electronics 43 28-07-2018 06:45

Advertise Here


All times are GMT -7. The time now is 20:57.


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.