#****************************************************************************** # P R O G R A M G E N E R A L I N F O R M A T I O N # # Advanced NMEA 2000 filter # # Customer: # Luis Soltero # # Program Version: 1.01 @ 31.07.2020 # # (C) Yacht Devices LTD, 2020 # Author: Korolev Alexey # #****************************************************************************** # # Version control section # # 1.01 @ 31.07.2020 # cleanup comments # # 1.00 @ 31.07.2020 # initial tests passed # # 1.00b @ 28.07.2020 # initial release # #****************************************************************************** #****************************************************************************** # P R O G R A M D E S C R I P T I O N # # Bridges CAN1 (J1939, RVC, N2K) <---> CAN2 (pure N2K) # # need to have the addresses on CAN1 be viewable on CAN2. # # CAN1 -> CAN2 PGNs to be forwarded: # # 127488, 127501, 127506, 127507, 127508, 127510, 127513, 127750, 127751 # # CAN2 -> CAN1 PGNs to be forwarded: # # ISO 059904, 127488, 127506, 127508 # # everything else needs to be blocked. # #****************************************************************************** #****************************************************************************** # L I C E N S E I N F O R M A T I O N # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # #****************************************************************************** #****************************************************************************** # H A R D W A R E I N F O # #------------------------------------------------------------------------------ # Y D N B - 0 7 # # Target hardware: Yacht Devices YDNB-07 NMEA 2000 bridge # YDNB-07 hardware revision: any # YDNB-07 firmware: any # # CAN1 speed 250 kbps # CAN1 connected to NMEA 2000 network segment with J1939, RVC, N2K PGNs # CAN2 connected to NMEA 2000 network segment with N2K PGNs only # #****************************************************************************** #=================== P R O G R A M S T A R T ============================ # D E B U G S E T T I N G S S E C T I O N # # uncomment the line below to get an MCU assembly code in YDNBSAVE.CFG file #DECOMPILER=1 # uncomment the line below to record a diagnostics file YDNBLOG.TXT #DIAGNOSTICS=30 # uncomment the line below to record a diagnostics file in binary format (CAN file) #LOG_FORMAT=BINARY # B R I D G E H A R D W A R E S E T T I N G S S E C T I O N # # Disable forwarding on both interfaces FW_CAN1_TO_CAN2=OFF FW_CAN2_TO_CAN1=OFF # I N I T I A L I Z A T I O N # #placeholder for init() init() { # --- user-configurable options ----------------------------------------------- # --- user-configurable options ends ------------------------------------------ } # CAN1 -> CAN2 # 127488 match(CAN1, 0x1F20000, 0x01FFFF00) { send() } # 127501 match(CAN1, 0x1F20D00, 0x01FFFF00) { send() } # 127506 match(CAN1, 0x1F21200, 0x01FFFF00) { send() } # 127507 match(CAN1, 0x1F21300, 0x01FFFF00) { send() } # 127508 match(CAN1, 0x1F21400, 0x01FFFF00) { send() } # 127510 match(CAN1, 0x1F21600, 0x01FFFF00) { send() } # 127513 match(CAN1, 0x1F21900, 0x01FFFF00) { send() } # 127750 match(CAN1, 0x1F30600, 0x01FFFF00) { send() } # 127751 match(CAN1, 0x1F30700, 0x01FFFF00) { send() } # CAN2 -> CAN1 PGNs to be forwarded: # 127488 match(CAN2, 0x1F20000, 0x01FFFF00) { send() } # 127506 match(CAN2, 0x1F21200, 0x01FFFF00) { send() } # 127508 match(CAN2, 0x1F21400, 0x01FFFF00) { send() } # ISO 059904 match (CAN2, 0xEA0000,0xFF0000) { send() } #==================== P R O G R A M E N D S ============================= # EOF