NMEA 2000 Shield

OK, Timo, that is hard stuff for specialists lke you. :slight_smile:
At least, i can see the adresses of all units in my Axiom Display and I can filter then the message with N2kMsg.Source.

But - is there no message to tell a device, it should not send a message?
I think, there is, maybe proprietary, because, if there 5 Displays in the net, only one should send rapid position.
If I choose in my Axiom Display the AIS unit as Source for position, it stops sending position data by itself.
And absolutly grazy, my HDS is configured also to use AIS unit as position source, and is still sending this data as rapid position into the net. So I have rapid Position from AIS unit doubled in the net. I can not understand this stupidity.

There is Request group function 126208, which can be used to command interval to 0, which means to stop transmission. But this is optional and devices does not need to follow command. I tested it with some device and it changed interval, but I did not test does it stop sending.

Hey Timo,
please one more your help:
I want to

  • send a waypoint
  • receive a waypoint
    Sending I do as following: (It works on my Plotter, hope it is correct)
   if (bSend == true)  {    
      bSend = false;
      tN2kMsg N2kMsg;
      char Name [] = "Anker";

      SetN2kPGN130074(N2kMsg, 1, 1, 1);
      AppendN2kPGN130074(N2kMsg,  1, Name, Latitude_Anker_d,  Longitude_Anker_d);
      NMEA2000.SendMsg(N2kMsg);
   }

But reading a Waypoint, I dont know what to do.
I tried as following: (error binding 'const tN2kMsg' to reference of type 'tN2kMsg&' discards qualifiers)

void WaypointList(const tN2kMsg &N2kMsg) {
 
   uint16_t Start;               // The ID of the first waypoint
   uint16_t NumWaypoints;        // Number of valid WPs in the WP-List
   uint16_t Database;            // Database ID

   uint16_t ID;                  // The ID of the current waypoint
   char* Name;                   // The name of the current waypoint
   double Latitude;              // The latitude of the current waypoint  
   double Longitude;             // The longitude of the current waypoint  

   if (AppendN2kPGN130074(N2kMsg,ID[],Name[],Latitude[],Longitude[])) {
      Serial.println (Name);
      Serial.println (Latitude);
   }
}

and this: (error 'ParseN2kPGN130074' was not declared in this scope)

void WaypointList(const tN2kMsg &N2kMsg) {
 
   uint16_t Start;               // The ID of the first waypoint
   uint16_t NumWaypoints;        // Number of valid WPs in the WP-List
   uint16_t Database;            // Database ID

   uint16_t ID;                  // The ID of the current waypoint
   char* Name;                   // The name of the current waypoint
   double Latitude;              // The latitude of the current waypoint  
   double Longitude;             // The longitude of the current waypoint  



   if (ParseN2kPGN130074(N2kMsg,ID,Name,Latitude,Longitude)) {
      Serial.println (Name);
      Serial.println (Latitude);
   }
}

Your basics are wrong.

if (AppendN2kPGN130074(N2kMsg,ID[],Name[],Latitude[],Longitude[])) {

E.g. ID[] does not mean anything. It is like a vector, but can be used in definition, where give initial value. E.g.

const uint8_t IDs[]={1,2,4,7,9};

If you want to give vector as parameter, you then just point IDs or specific value on vector IDs[2].

The next problem is that there is no parser for 130074 published.

Yes, I understand. But not your last sentence. Without parser I cannot receive Waypoints?

No. Someone has to write parser function.

I understand. I would like to help, but it is beyond my possibilities, unfortunatly.

Hi!

Any chance to get PGN 127750 Converter Status impemented in the library.

Canboat has it implemented.

I tried to do it myself but Iam no developer and only cut and paste with poor results.

Regards,
Urban

No. But if you like to donate me on Kave Oy with >60€, I can do it.

Maybe slightly off topic, but i'll ask anyway. I have been given an Raymarine ST290 graphical display. It is meant to be used with SeaTalk2 which seem to be "almost" NMEA2000. It can display some data coming from standard messages lite wind, depth and speed, but for everything else it wants some proprietary Raymarine Seatalk2 messages. Since it's a display it does not send much more than identification messages so that does not help.

My question is if anybody has seen a list of these messages? They are normally sent from a ST290 DPU to the Seatalk 2 network. It would be nice to use the NMEA2000 library to convert standard NMEA200 messages so i can use my display for more info.

Seatalk NG is exactly the same as NMEA2000, only other conectors.
As far as I know, Seatalk 2 is also the same network, only special conectors.
You can buy an Adapter from Seatalk 2 to NMEA2000, see here:
https://www.defender.com/product.jsp?id=332685

Yes, hardware and protocol is the same, but the messages sent from the central unit in the Seatalk2 network are not standard NMEA2000 messages. They use their own set of messages except for a few basic ones. So what I'm asking for is if somebody has seen a list of Raymarine Seatalk2 messages? They are sent from the ST290 series of instruments.

Hi,
I'm using

SetN2kFluidLevel(N2kMsg,1,N2kft_Fuel, Level, Capacity);

and my Garmin plotter (7408) displays this just fine as "Fuel Level" as a percentage value.

What I'm after though, is updating the value displayed as "Fuel Remaining", since this is shown in litres remaining, which is more useful for me. "Fuel Remaining" on the plotter is currently updated using fuel rate data that I'm sending using Timo's library (and calculated by the plotter), but I would rather show it based on data from a fuel level sensor. I know this has more to do with what the plotter does than the library, but I was wondering if anyone else has had this problem and would know what to change to be able to display remaining fuel volume instead of remaining %.

Thanks!

And thank you Timo for putting in all the effort to write the lib - great work!

It depends of the plotter. NMEA2000 handles tank level as % and Capacity as separated field as you have. Some MFD:s shows remaining in volume units like litres. Some can only show %. Some has setting to select how to show remaining and unit.
Take care that you provide right Capacity to the library. If your tank is 150 l, just pass that.

Gotcha. Thanks. My Garmin MFD only supports tank level %, it seems.

Hi Timo really enjoy your n2k development, already completed several projects with Arduino and ESP boards. Recently acquired a RM A78 mfd which only supports seatalkNG/N2k interfaces and my dAISy AIS only outputs Nmea0183 messages. I understand that new nmea0183handlers in the nmea0183handlers.cpp file need to be developed for the various AIS message types 1,2,3,5,18,19,24...etc. I see that your N2k library already supports these AIS equivalent N2k messages. Since I need to developer a AIS nmea0183 to N2k converter before I start creating new message handlers, I was wondering if anyone else might have already created these handlers and is willing to share.

After doing some preliminary research I see that the VDM and VDO messages have already been incorporated into the NMEA0183 library for parsing which is great. However the 6-bit encoded field I do not understand how it is treated, in the past I have used the KimBP library to decode this field with great success. Does anyone know how this AIS encoded field is treated in this NMEA0183 library ?

Hi,

How does one filter same messages sent by several or two devices? Reason why I ask is I bought a wind instrument with Garmin GND 10 NMEA 2000 interface. That device seems to be sending all kinds of messages and is disturbing my DIY autopilot and depth alarm.

Hi Timo, all your work on N2K is fantastic. I am new to Arduino and my kindergarten programming was many years ago but I have succeeded in combining an MCP2515_CAN board with a Uno to 'sniff' my N2K network.
I want to extract Depth data from N2K and eventually use it for a project. I can read PGN 128267 and display the data in hex on the Uno serial monitor. I also have an Actisense NGT-1 which I have previously used for diagnostic work and it confirms the data I see on the Uno. But, the hex value for the depth data does not convert directly to metres with the known depth being read by the sender and seen on Simrad/B&G N2K instruments and also shown in the 'Details' tab of the NGT-1. All descriptions I can find suggest the 2nd byte of data is depth in metres x 10-2.
e.g. When the first 3 bytes of the data are 00 AE 01 which the B&G and NGT-1 say is 4.3m, byte 2, the transducer depth hex value of AE converts to 174 decimal.
Do you have further information as to how to convert the hex data to usable decimal depth reading.
Thanks for all your work. Hopefully I will use more of your libraries as I progress with my project.

Water depth has an offset. If you count that in do things add up?