Kvaser CANlib SDK

The CANlib Software Development Kit is your transparent Application Programming Interface for working with all Kvaser hardware platforms.

This software development kit includes a virtual hardware that can do just about everything our real hardware can. Download the kit and begin developing for any Kvaser hardware right away. Once you get a Kvaser interface you can seamlessly transition from the virtual driver.

Note: Virtual drivers must be installed after downloading the CANlib SDK. See instructions here.

General SDK Contents:

  • Getting-started and reference documentation
  • Example programs
  • Debug your own CAN tools using CanKing (free of charge bus monitor)
  • Supports virtual (non-hardware) CAN channels which you can use for test or demo purposes. Install the virtual drivers today and try everything out.
  • Support libraries for SAE J2534, RP1210A, RP1210B
  • LINlib: Support libraries for LIN
  • J1708/J1587 (special Kvaser hardware required)
  • Limited 16-bit (DOS, Windows 3.x) support for the PCcan family of boards available as a separate download
  • Support libraries for porting legacy code from a selection of other vendor’s APIs
  • See more information on libraries below.

Software written using CANlib provides compatibility with present and future hardware from Kvaser. An application using CANlib can be used on another platform without modifications.

Download CANlib

Get the SDK package with API and examples.

Download

CANlib SDK Libraries

CANlib – The first library is CANlib, and this is used to interact with Kvaser CAN devices connected to your computer and the CAN bus. At its core you have functions to set bus parameters (e.g. bit rate), go bus on/off and read/write CAN messages. You can also use CANlib to download and start t programs on supported devices. If you can see your device listed in the Kvaser Device Guide tool, it is connected and you can communicate with it through CANlib.

LINlib – The LINlib library is used to interact with the LIN bus. Similar to CANlib, it holds functions to set bus parameters, go bus on/off and read/write LIN messages.

kvaDbLib – The database library kvaDbLib is used for creating, reading, writing and modifying CAN databases that holds descriptions of packages that are received or sent on the CAN network.

kvlclib – The converter library kvlclib is used for converting Kvaser Memorator log files. It can be used to convert between a number of formats, e.g. from Kvaser binary format KME 5.0 (.kme50) to CAN frames in MDF 4.1 (.mf4).

kvmlib – The Memorator library kvmlib is used to interact with Kvaser Memorator devices that can record CAN messages, e.g. Kvaser Memorator Professional 5xHS. You can download configuration data (e.g. triggers, filters, scripts) allowing you to disconnect the device from your computer, connect the device to a (powered) CAN bus and let it record the traffic autonomously. When done, you can reconnect the device with your computer and use kvmlib to read the recorded data.

kvaMemoLibXML – The kvaMemoLibXML is used to convert XML formatted logger settings into a binary format used by Kvaser Memorator devices. The binary settings file can then be downloaded to a Kvaser Memorator device using the kvmlib mentioned above. With the help of kvaMemoLibXML and kvmlib, you can create your own tool for configuring Kvaser Memorator devices.

kvrlib -Some Kvaser devices, known as remote devices, can be connected via Ethernet or WiFi, e.g. Kvaser Ethercan Light HS and Kvaser BlackBird v2, and you need to configure those devices before they are connected to your computer. This is where kvrlib comes into play with functions to discover and connect to a Kvaser Device on the network, making it accessible for the CANlib functions. The kvrlib has functions to configure how the remote device connects to the network (e.g. dynamic/static IP). It also contains extra functions for wireless setup, such as scanning and getting connection status.

Supported Compilers:

The Kvaser CANlib SDK is free and supports the following compilers:

  • Microsoft Visual C/C++
  • Borland/CodeGear/Embarcadero C++ Builder
  • gcc, MinGW
  • Borland/CodeGear/Embarcadero Delphi (all versions)
  • Microsoft Visual Basic and VB.NET
  • Microsoft C#
  • Also various examples for managed C++ code, Python, etc.

Linux Support

Support for Linux is available as a separate download, see our Linux Driver and SDK page for more.

More Information

Recent CANlib SDK Updates:

Kvaser SDK: One development framework; many possibilities

Kvaser SDK: One development framework; many possibilities

24/01/2024| News

A universal development environment for all Kvaser devices Kvaser SDK is a free-of-charge development framework for all Kvaser interfaces. Backwards… Read More

Read More
Kvaser’s June 2021 Software Release

Kvaser’s June 2021 Software Release

08/06/2021| Software Releases

Kvaser’s latest software release adds updates and fixes for J1939 within the Python wrapper for Kvaser CANlib. Our Python implementation… Read More

Read More
Kvaser’s February 2021 Software Release

Kvaser’s February 2021 Software Release

26/02/2021| News

Kvaser's latest software release extends support for CAN FD, such as virtual CAN FD and ISO-TP FD channels within J2534. A new autobaud programming feature enables sampling at high frequencies. Read More

Read More

Recent Developer Blogs:

kvrdevbloglogofinalblack

Using CANlib Visual Studio 2017 C#.NET (canlibCLSNET)

09/03/2021 |

In this document I will show you how to enable CANlib in Visual Studio 2017 when creating a C# .NET… Read More

Read More
kvrdevbloglogofinalblack

Using CANlib Visual Studio 2017 VB canlibCLSNET

08/03/2021 |

In this document I will show you how to enable CANlib in Visual Studio 2017 when creating a Visual Basic… Read More

Read More
Kvaser Developer Blog logo

Using CANlib Visual Studio 2019 C# .NET STANDARD 2.0

19/03/2020 |

The Kvaser C# wrapper for CANlib has been ported to .NET Standard. In this document, I will show you how… Read More

Read More