The Kvaser CANlib SDK is a software development kit providing everything you need to develop software for the Kvaser CAN and LIN interfaces on Windows. For the realization of multi-vendor CAN applications UV Software provides a CAN API V3 compatible wrapper library build upon Kvaser´s CANlib DLL.
CAN API V3 Wrapper
CAN API V3 is a wrapper specification by UV Software to have a uniform CAN Interface API for various CAN interfaces from different vendors running under multiple operating systems. The KvaserCAN wrapper library provides a CAN API V3 compatible API for Kvaser´s CANlib DLL on Windows.
The GitHub repository contains the source code for the KvaserCAN wrapper library and several alternatives to build dynamic link libraries, either as a C++ class library (uvKvaserCAN.dll), or as a CAN API V3 wrapper library (u3cankvl.dll), as well as some example programs and my beloved CAN utilities
Note: UV Software also provides a CAN API V3 compatible Wrapper Library for macOS.
|CAN 2.0||Classical CAN|
|CAN FD||Flexible Data-rate CAN|
|Bit-rate, CAN 2.0||high speed: up to 1 Mbps|
|Bit-rate, CAN FD||nominal: up to 1 Mbps
data phase: up to 8 Mbps
|11-bit identifier (STD)||CAN 2.0 and CAN FD|
|29-bit identifier (XTD)||CAN 2.0 and CAN FD|
|Remote frames (RTR)||CAN 2.0 only|
|Error frames (ERR)||CAN 2.0 and CAN FD|
|Error indicator (ESI)||CAN FD only|
|Bit-rate switching (BRS)||CAN FD only|
|Silent operation (MON)||CAN 2.0 and CAN FD|
|Identifier filtering||CAN 2.0 and CAN FD|
|- Monitor mode enable/disable (MON)||disabled by default|
|- Error frames enable/disable (ERR)||disabled by default|
|- Remote frames disable/enable (NRTR)||enabled by default|
|- Extended frames disable/enable (NXTD)||enabled by default|
|- Shared access enable/disable (SHRD)||disabled by default|
|- Non-ISO CAN FD enable/disable (NISO)||disabled by default|
|- Bit-rate switching enable/disable (BRSE)||disabled by default|
|- CAN FD operation enable/disable (FDOE)||disabled by default|
|- Pre-defined bit-timing indexes||acc. CiA CANopen specification|
|- BTR register values||register fields:
|- Message queue (FIFO)||queue size depends on the hardware|
|- Polling||return immediately|
|- Timed out||wait up to 65’534 milliseconds|
|- Blocking read||wait infinitely|
|- Acknowledged write||wait up to 65’534 milliseconds|
|- Buffered write||buffer size depends on the hardware|
|Software Development Kit:|
|- CAN API V3||C API and C++ API by UV Software|
|- Dynamic link library||
|- Static library||
|- 32-bit version (x86)||supported|
|- 64-bit version (x64)||supported|
|- Source code||BDS-2-Clause or GPL-3.0-or-later|
|- Python wrapper||Python 3.7|
|- macOS wrapper||macOS Driver and SDK|
|- Utilities||CLI utilities
|- Examples||C, C++, Python|
- Migrated to Visual Studio 2019 and adapted the MSC build environments
- Switched to a dual-license: BSD-2-Clause OR GPL-3.0-or-later
- Updated to Kvaser´s CANlib SDK version 5.35
- Realized class
CKvaserCAN: public CCANAPI(
- Implemented operation mode
- Added a check for operation mode bit
- Added a check for valid identifier range in
- Added a check for operation capability in
- Fixed a mistake with channel name displayed instead of device name
- Fixed an out-of-bound violation in companion module
- Fixed a bug with wrong return values from
- Fixed an unnecessary decl-specifier on
- Added my beloved CAN utilities
- Added two simple C++ examples
- Added a Doxygen configuration
- Last sources from subversion repo to build version 1.1 (old versioning scheme)
For a list of supported device see Kvaser´s website.
Known Bugs and Caveats
For a list of known bugs and caveats see tab Issues in the GitHub repo.
This work is dual-licensed under the terms of the BSD 2-Clause “Simplified” License and under the terms of the GNU General Public License v3.0 (or any later version). You can choose between one of them if you use this work in whole or in part.
Windows is a registered trademark of Microsoft Corporation in the United States and/or other countries.
Mac and macOS are trademarks of Apple Inc., registered in the U.S. and other countries.
All other company, product and service names mentioned herein are trademarks, registered trademarks or service marks of their respective owners.
If you connect your CAN device to a real CAN network when using this library, you might damage your application.