NMEA2000 icon indicating copy to clipboard operation
NMEA2000 copied to clipboard

can't send ProductInformation

Open nett1s opened this issue 7 months ago • 5 comments

Hi, i making device that needs periodically send ProductInformation. I modified your Wind example, so i can send all another PGNs which i need, except ProductInformation. I use this function as you recommend using in other issues NMEA2000.SendProductInformation(); but nothing i see in Actisense listner. Other PGN's i see, this one no. at the start my code:

const unsigned long TransmitMessages[] PROGMEM = {126996L, 0};

tN2kSyncScheduler ProductInformationScheduler(false, 5000, 1);

void OnN2kOpen() { ProductInformationScheduler.UpdateNextTime(); }

Also I added in setup NMEA2000.SetN2kCANSendFrameBufSize(200); (Tryed with different values). After this function i placing:

NMEA2000.SetProductInformation( //My data...//); NMEA2000.SetDeviceInformation( //My data...//); NMEA2000.SetMode(tNMEA2000::N2km_ListenAndNode,22); NMEA2000.EnableForward(false); NMEA2000.ExtendTransmitMessages(TransmitMessages); NMEA2000.SetOnOpen(OnN2kOpen); NMEA2000.Open(); and in the loop as in wind example: { SendN2kProductInformation(); NMEA2000.ParseMessages(); }

void SendN2kProductInformation() { tN2kMsg N2kMsg; if ( ProductInformationScheduler.IsTime() ) { ProductInformationScheduler.UpdateNextTime(); NMEA2000.SendProductInformation(); } }

P.S: now i using Atmega1284p with 8MHz quartz(is this enouth? maybe put 20MHz?) which have 16kb of SRAM, because i thought that memory not enouth, previously used atmega644pa which have 4kb of SRAM. Tested with arduino mega (just added this code to your temperature example) and it sends Product Info (just Arduino sends to Actisense Listner by USB), but on my controller still not working, maybe you can advise something...

nett1s avatar Jul 16 '24 06:07 nett1s