CAN Log Viewer
CAN Log Viewer
Software version
1.70
2023
© 2023 Yacht Devices Ltd. Document YDCANLOG-013. October 6, 2023.
Web: http://www.yachtd.com/
—2—
Contents
1. Introduction ........................................................................................................................................ 4
2. Program installation ....................................................................................................................... 6
3. Getting started ................................................................................................................................... 7
4. List of NMEA 2000 devices ........................................................................................................ 14
5. Program’s command line ............................................................................................................ 17
6. Data export and conversion ....................................................................................................... 18
7. Example of protocol analysis ..................................................................................................... 19
8. Description of .CAN file format ................................................................................................ 23
APPENDIX A. Support of .CAN format ...................................................................................... 24
APPENDIX B. Firmware updates support ................................................................................ 25
—3—
1. Introduction
This Manual contains information on how to install, configure and operate the CAN Log
Viewer software application (hereinafter Viewer or program).
CAN Log Viewer software is a viewer, player and converter of CAN (Controller Area
Network) logs and viewer of Raymarine SeaTalk NG logs. It can play your CAN
recordings on a PC screen in real time and highlight changing data. It can also show and
record to a file RAW protocol data from a TCP port or UDP port of Yacht Devices NMEA
2000 Wi-Fi Gateway YDWG-02, NMEA 2000 Wi-Fi Router YDNR-02, NMEA 2000
Etherner Gateway YDEN-02 and from a serial (COM) port of Yacht Devices NMEA
2000 USB Gateway YDNU-02 (here and after the YD gateways).
The program includes viewers for NMEA 2000 and J1939 data, allowing network data
to be visualised in a readable form. The viewers also allow you to see what data is and is
not available on the network.
The program can list NMEA 2000 devices and display their properties (product and
configuration information). If the program is connected to the CAN network via YD
gateways, it can also enumerate NMEA 2000 devices, change their network addresses,
device and system instances, configuration information (some manufacturers use it to
change device settings) and update firmware of supported devices (see Chapter 4 for
details).
This product will help you to:
- view live and recorded network data in binary and readable form (using built-in
viewers available for the major J1939 and NMEA 2000 data types);
- list, configure and update NMEA 2000 devices (see Chapter 4);
- set up and troubleshoot NMEA 2000 and J1939 devices (more than 2000 J1939
DTC descriptions in the database);
- analyze unknown CAN protocols (see Chapter 7 for a real example);
- download and upload CZone configuration files to network devices;
- convert log files to spreadsheet and text formats for further processing;
- convert data prepared in a spreadsheet or text file for playback on a physical CAN
network by Voyage Recorder;
- convert CAN logs containing NMEA 2000 data to the format of the YDVR
Converter software (.DAT file);
- send CAN messages to the network.
CAN logs contain network level data and are compatible with any high level protocol,
including J1939 and NMEA 2000. This product has been designed as a support tool for
various of our hardware products, but all data formats are open and data conversion to
and from CSV (Comma Separated Values) is supported, so you can use it with your own
log files or add .CAN support to your own products.
—4—
Please see Appendix A for the list of products supporting the .CAN file format.
This tool is freeware and you may distribute it in unmodified form without any special
permission.
—5—
2. Program installation
CAN Log Viewer is supplied free of charge and runs on Microsoft Windows (x86 and
x64 versions of operating system), Linux (x64 only) and Mac OS X (OS X 10.7 or later,
Intel x64 only).
The program does not require any formal installation. It can be copied from the archive
to the computer’s hard disk or to a removable USB flash drive. The program archive
contains appropriate subfolders with an executable application corresponding to
Windows, Linux, and OS X.
The program’s archive contains a “Test” folder with examples of log files. You may use
them to learn how to use the program.
Special notes:
After copying the “CANView” file in Linux, you will need to set the
executable file attribute.
—6—
3. Getting started
The program is supplied with a sample file, VolvoXC90.can, with a recording of Volvo’s
popular crossover. You may load this file using “Open..” in a “File” menu. To load
Raymarine SeaTalk NG log file, switch the type of extension to “Raymarine (*.log)” in
the dialog.
—7—
Modified bytes are highlighted in red. The message length (DLC column) is also
highlighted when changed. If the message length is less than 8 bytes, the cells of the
remaining bytes will be empty or will contain a highlighted "__" if the value of that cell
was not previously empty.
You may select one or multiple cells with data and get conversion of the hexadecimal
cell’s values to decimal in the status line. “Copy Selection” in the “Edit” menu copies
your current selection to the clipboard.
With the “Stop” and “Play” in the “File” menu, you may pause and resume file playing.
To clear the program’s table, click “Clear Table and Viewers” in the “Edit” menu.
When the file playing is finished or stopped, you may open another file or open the same
file again to run from the beginning.
—8—
You can also record port data to a .CAN file. The recording ends when you pressing
“Close All” or opening another port or a new .CAN file from the disk.
—9—
The program also allows displaying the state and control digital switching devices
(NMEA 2000 Switch Banks, using standard PGN 127501 “Binary Status Report” and
PGN 127502 “Switch Bank Control”).
—10—
Figure 6. History windows
—11—
The program allows to send CAN frames with 29-bit identifier and from 1 to 8 data bytes
to the CAN network (see Figure 7). The corresponding window is accessible from “Tools”
menu when program is connected to CAN network with one from YD gateways.
The “Send” button displays message box if entered text contains misprints or errors.
Otherwise, it sends messages without any confirmation message box, it allows to press
the button multiple times quickly to send entered messages multiple times.
When messages are successfully transmitted by the gateway to the CAN network, the
CAN Log Viewer displays messages in the list with “TX 0” in the “CAN” column of main
window (see lines 3 and 11 at Figure 7).
Please note, that lowest byte of 29-bit message identifier will be replaced by gateway’s
CAN address according NMEA 2000 Standard, that’s why the message with identifier
15FD0600 in the “Send CAN Message” window is displayed as 15FD0647 in the main
window on the Figure 7.
—12—
Figure 9. Commissioning of YD Autopilot
The Viewer also provides tools for commissioning and troubleshooting the YD
Autopilot, which can also be accessed via the "More..." button in the "Device Properties".
And viewers for autopilot mode, course and other data with the “NMEA 2000
Autopilots” window, accessible from the View menu. Please, see “Installation and
Commissioning Manual” of YD Autopilot for more details.
—13—
4. List of NMEA 2000 devices
—14—
The “Firmware Update” button is enabled when the program is connected to the
gateway and the selected device is supported (see the list in the Appendix B). You will
need to choose the update binary file (with .BIN extension) on the disk and wait while
firmware is uploading (Figure 11).
—15—
modifying of the field, since that can cause (depending on the operating system) the
action of another button on the window; press the button using a mouse or activate it
with the “Tab” button first.
To modify the device address, the program use the “ISO Commanded Address” message
(PGN 65240, enveloped to PGNs 60160 and 60416), which must be supported by
modern NMEA 2000 certified devices. To modify other fields the “NMEA Group
Function” (PGN 126208) is used.
Configuration information is intended to contain a description of installation (the
location of device, etc.). But many manufacturers use these fields to enter commands to
devices, for example see the chapter “VI. Programming with Installation Description
String” of Yacht Devices Humidity Sensor manual (www.yachtd.com).
The “Heartbeat” section of the properties window displays the device’s state. According
the standard, modern NMEA 2000 devices must report their presence once per minute.
Green indicating that device is healthy, yellow that is has an errors, and red indicates
critical error. A non-colored indicator means that device does not set the value for the
indicator.
—16—
5. Program’s command line
Run program with /? key in the command line to see available command line options.
Command line effect on file’s playing and conversion both.
Key Description Example
/F:filename Load specified file on program’s start /F:C:/files/my.dat
or open TCP, UDP or serial port /F:tcp:10.1.1.1:1456
/E:id1[;...] List of message identifiers specified by /E:1A2;1A4;18EA2001
hexadecimal numbers and separated
by semicolon to exclude from playing
and conversion
/M:filter1;mask1[;...] List of permissive hexadecimal filter / /M:18EA2000;1FFFF
mask pairs. Filter specifies bits for F00;0DF10200;1FFFF
comparison and mask specify which F00
bit comparison result is significant. If
this key is specified, the program will
show/convert only messages with
matched identifiers.
/C:number Show/convert messages from specified /C:0
CAN interface (0 or 1) only.
/D:direction Show/convert messages with specified /D:TX
direction (TX or RX) only.
The following command line causes filtering of messages as it shown at Figure 13 below:
CANView.exe /F:VolvoXC90.can /M:1E;FF;20;FF /E:1000020;62401E /C:0 /D:RX
—17—
6. Data export and conversion
Data export and conversion commands are available in the “Edit” menu. When the
command’s menu item is clicked, you will be prompted to select a source file and after
that you will be prompted to select an output file.
—18—
7. Example of protocol analysis
In this example, we will show a practical example of the CAN protocol analysis. Car
protocols usually are not documented, including the protocol of the popular Volvo XC90
crossover.
The program is supplied with a sample file named VolvoXC90.can. In this recording,
(started at 00:36), a driver turns on the ignition and runs the engine (initially, engine
revolutions are between 1400-1600 to warm up the engine), waits until the engine
revolutions decrease to normal values (about 950 rpm) and then turns off the engine.
After about 10 more seconds, the recording was finished (at 01:14).
Our goal is to find data with engine revolutions. We know that it is a two-byte value at
least and it should be zero (or about zero) at the beginning and at the end of recording.
We don’t know how the value is encoded (1 bit/rpm or 4 bits/rpm like in J1939
protocol), but we know that the car’s tachometer has a scale of 0 – 8000 rpm, so the
recorded value is in the first half of the range.
We also know that this value changes very often, because when engine’s controller is
trying to set 1300 rpm, revolutions float between 1250 and 1350 rpm.
—19—
At first, play the file in the program. We’ll find that we have messages with 29 different
identifiers on the bus. We’ll also find that messages with ID 0xD00022, 0xF00006 and
0x1400006 have static data (see Figure 15). Such messages cannot contains RPM value,
so we can create a list of messages to exclude from future analysis and add these
messages to this list.
We can also find that data bytes in some messages (e.g. with ID 0xC0402A) change only
rarely. We can add such messages to the exclusion list too. Play the file a few times, and
half of messages will be in your exclusion list just after a quick look at how the data in
these messages changes.
Restart the program with the exclusion list, and you will see only a dynamic data in the
program’s table (these should be typed in a single line):
CANView.exe /E:224024;C0402A;D00022;E24026;F00006;1000020;1400006;
1600012;10004002;1020000A;10800006;11000022;11100024;11420006;11800002;
11A00020;11C00002
Now we have only 12 messages on the screen (see Figure 16). But what values start from
zero and end with zero?
—20—
To verify our theory, let’s run the program with /M:80401E;FFFFFF as the key (to leave
only this message in the output files), then convert the file to CSV and open it in
Microsoft Excel.
And to see all our digits together, let’s add a simple chart (see Figure 19 at next page).
This chart shows that we have found the RPM value and that the task is solved.
CAN analysis is not hard but requires some practice and patience; knowledge of data
encoding in J1939 and J1979 also be useful.
—21—
Figure 18. Strange value (line 950)
—22—
8. Description of .CAN file format
The file format is very simple and allows CAN messages from two CAN interfaces to be
stored. It also allows you to store messages received and sent by the recorder.
The CAN file contains a set of records 16 bytes long. All records have the following
format:
Position from Length Description
the start of (in bytes)
the record
0 2 Bit 16: 0 – record has a 29-bit message identifier or it is a
service record; 1 – record has an 11-bit identifier.
Bit 15: 0 – message was received by recording device; 1 –
message was transmitted by recording device, or it is a
service record.
Bits 12–14: message’s data length, values 0—7 correspond
to 1..8 data length (messages without data are not
allowed).
Bit 11: 0 - first CAN interface, 1 – second CAN interface.
Bits 1–10: time of record in minutes (0..1023).
2 2 Time of record in milliseconds (0..60000)
4 4 Message identifier or 0xFFFFFFFF for service records.
Unused bits of message identifier must be zero.
8 8 CAN message’s data or service record data. If the data
length is smaller than 8 bytes, recommended to set
unused bytes to 0xFF.
The file always starts with a service record containing the string "YDVR v05" in the data
field.
A service record starting with 'Y' and 'I' in the first two data bytes contains the CAN bus
speed in the third byte. The four lowest bits are the speed of the CAN #0 interface and
the four highest bits contain the speed of the CAN #1 interface: 1 - 50 kbps, 2 - 125 kbps,
3 - 250 kbps, 4 - 500 kbps, 5 - 1000 kbps, 15 - interface not available. Other values are
reserved, other bytes in the message are reserved and set to 255 (0xFF).
Time of record is the internal time of the recording device and can start from any value
in the file. Note that the time of record is reset to zero every 1024 hours.
3rd party applications can add their own service records to the file. Yacht Devices
reserves all service records with 'Y' in the first data byte for future file format extensions.
—23—
APPENDIX A. Support of .CAN format
The following hardware and software products support .CAN format. Please, contact us (
http://www.yachtd.com/support/ ) to add your own products to this table.
Product Version Description
Yacht Devices CAN Log 1.00 Viewer, player and converter for CAN files.
Viewer Allows converting .CAN files to/from .CSV
format and export to text and Voyage
Recorder’s .DAT files.
Yacht Devices YDVR 1.20 This program exports Voyage Recorder’s
Converter .DAT with NMEA 2000 data to GPX tracks,
spreadsheets and other formats, including
.CAN format.
Yacht Devices NMEA 2000 1.01 Allows recording to .CAN files from two CAN
Bridge interfaces (supported speed is 250 only).
Yacht Devices Voyage 1.20 This product saves data from NMEA 2000
Recorder YDVR-03 networks to .DAT files and can “play” .CAN
files content to the physical CAN network.
Yacht Devices Voyage 1.04 All features of YDVR-03, support of recording
Recorder YDVR-04 to .CAN format and support of 50, 125, 250,
5000 and 1000 kbps CAN networks.
Yacht Devices Engine 1.03 Allows recording to .CAN files on 250 and
Gateway YDEG-04 500 kbps speed.
Yacht Devices 1.00 The CAN Log Viewer allows viewing and
NMEA 2000 USB recording of data to a .CAN file from serial
Gateway port of the device (must be configured to
RAW or AUTO protocols).
Yacht Devices 1.00 The CAN Log Viewer allows viewing and
NMEA 2000 Wi-Fi recording of data to a .CAN file from a TCP or
Gateway YDWG-02 UDP port of the device (must be configured to
RAW protocol).
Yacht Devices 1.00 The CAN Log Viewer allows viewing and
NMEA 2000 Wi-Fi recording of data to a .CAN file from a TCP or
Router YDNR-02 UDP port of the device (must be configured to
RAW protocol).
Yacht Devices 1.00 The CAN Log Viewer allows viewing and
NMEA 2000 Ethernet recording of data to a .CAN file from a TCP or
Gateway YDEN-02 UDP port of the device (must be configured to
RAW protocol).
Yacht Devices NMEA 0183 1.00 Allows recording to .CAN files on 250 kbps
Gateway YDNG-03 speed.
—24—
APPENDIX B. Firmware updates support
The following hardware can be updated using CAN Log Viewer (see Chapter 4). Please,
contact us ( http://www.yachtd.com/support/ ) to add your own products to this table.
Product Date or version
Yacht Devices Digital Thermometer YDTC-13 Firmware 1.40 (Q2/2018)
Yacht Devices Humidity Sensor YDHS-01 Firmware 1.40 (Q2/2018)
Yacht Devices Digital Barometer YDBC-05 Firmware 1.40 (Q2/2018)
Yacht Devices Exhaust Gas Sensor YDGS-01 Any firmware, Q3/2018
Yacht Devices Circuit Control YDCC-04 Any firmware, Q4/2018
Yacht Devices Switch Control YDSC-04 Any firmware, Q4/2018
Yacht Devices Alarm Button YDAB-01 Any firmware
Yacht Devices NMEA 2000 Run Indicator YDRI-04 Any firmware
Yacht Devices Tank Adapter YDTA-04 Any firmware
Yacht Devices Outboard Gateway YDOG-01 Any firmware
Yacht Devices Autopilot YDAP-04 Any firmware (Q3/2023)
—25—