CANedge MF4 converters overview

The CANedge CAN/LIN data loggers store data in *.MF4 format (ASAM MDF version 4). The MDF file format is the de facto standard for storing bus frames (CAN, LIN, ethernet, etc). However, some tools do not support the MDF format directly. To widen support, we offer a range of tools for converting MDF into other commonly used formats. All converters support both regular (.MF4), encrypted (.MFE), compressed (.MFC), and encrypted and compressed (.MFM) files.

CSV Converter (Generic)

The CSV Converter converts raw MF4 files to CSV files which can be loaded into text editors, spreadsheets, etc.

MDF Converter (Finalize)

The MDF Converter finalizes and sorts raw MF4 files.

ASC Converter (Vector)

The ASC Converter converts raw MF4 files to ASC files supported by various tools, such as CANalyzer and CANape.

TRC Converter (Peak)

The TRC Converter converts raw MF4 files to TRC (version 1.1 or 2.1) files supported by PEAK PCAN Explorer and other PEAK tools.

Command line interface

All converters are designed as command-line-interface (CLI) tools. Each converter can output a list of supported arguments by supplying the --help argument. Below is an example of a help text.

--help                                   display this help and exit
-v, --version                            display tool version and exit
--verbosity=<n>                          verbosity of logging messages
--non-interactive                        does not print any progress output
-d, --delete-converted                   deletes files after conversion if specified
-X, --no-append-root                     do not add "_out" when converting folders
-b, --buffer=<n>                         buffer size in bytes. 0 disables and -1 takes entire file
-p, --password-file=<file>               where to find device passwords for encrypted files, defaults to "passwords.json"
-O, --output-directory=<string>          where to place the converted files
-i, --input-files=<file(s)/folder(s)>    list of input files/folders, must have common root

See the Tips & tricks Section for common use cases.

Encrypted files

The CANedge supports encryption of MF4 files. The encryption keys are provided to the converters using a password file. The password file is formatted in JSON. The file may contain a default key, labeled default, and device specific keys (taking precedence), with the ID of the corresponding CANedge as the key. Below follows an example with both a default and a device-specific key:

  "default": "thedefaultpasswordforall",
  "AABBCCDD": "devicespecificpasswordex"

The path of the password file is provided with the input argument -p. By default, the converter will look for a file named “passwords.json” in the current working directory.

Tips & tricks

Below follows a collection of tips and tricks on how to use the converters. The examples use the Windows version of the TRC Converter and assume that MF4 files are stored in the directory AABBCCDD.

Drag-and-drop (Windows only)

When dropping files/folders on an executable on Windows, the executable is executed with the full paths of the dropped elements appended as the final input arguments. The converters take the input files (-i / --input-files) as the final argument(s). Organizing the input arguments this way enables support for drag-and-drop conversion of single file/folder or multiple files/folders using the default converter settings.

Dragging and dropping the input directory AABBCCDD onto the executable effectively executes the converter with:

mdf2peak.exe [FULL-PATH]/AABBCCDD


A mix of multiple files and folders can be dropped on the executables

It is possible to use drag-and-drop with custom arguments. This can be done by creating a Windows shortcut to the executable and adding the custom arguments to the shortcut “target”. E.g. a shortcut can be created to always output files to a specific directory and to not append the _out prefix with:

"C:\converter\mdf2peak.exe" -X -O "C:\converter\static_output_dir"

Output in input directory tree

As default, the converters create an output directory with an _out prefix. To store the output files in the same directory tree as the input files, use the -X argument:

mdf2peak.exe -X AABBCCDD

Replace input files

As default, the converts leave the input files unchanged. To replace the input files with the output files, use arguments -d and -X

mdf2csv.exe -X -d AABBCCDD


It is recommended to keep backups of the original MF4 log files