Overview
The CETONI SDK for Linux is available as tar archive (i.e. QmixSDK_Linux_v20200506.tar.gz
) or as a debian package (i.e. qmix-sdk_2020.7.1-x86_64_ubuntu18.04.deb
). The recommended installation method is the debian package because it will ship less libraries (uses system libraries) and it properly installs the required CAN interface drivers. Depending on the installation package you choose, continue reading with the documentation section for your package:
CETONI SDK - Debian Package
Debian Package Installation
Install the debian package from the command line with the following command:
Installed Components
The debian package installs the following components:
- /etc/ls.so.conf.d - contains the file
qmix-sdk.conf
for adding the path of the CETONI SDK libraries to the library search path - /lib/udev/rules.d - contains the udev rules for executing the script
/usr/bin/configure_qmix_device.sh
to start drivers if a device is plugged in - /usr/bin - contains script file
configure_qmix_device.sh
for starting the required drivers if a USB-CAN interface is plugged in - /usr/include/qmix-sdk - contains the library C/C++ header files
- /usr/lib/qmix-sdk - contains the shared library files (*.so files) of the CETONI SDK
- /usr/share/qmix-sdk - contains the tests and the python integration of the SDK
- /usr/share/doc/qmix-sdk - here you will find the HTML reference documentation
- /usr/src - contains the sources for the supported device drivers
Use the SDK's shared libraries
To link against the SDK's shared libraries and to use the SDK's shared libraries you just need to add the library path /usr/lib/qmix-sdk
to your linker search path. Here is the command line for compilation of a small test.cpp
app that uses the labbCAN_Bus_API
:
Running the unit tests
With the test cases you can check, if the SDK runs properly on your Linux system. To run a test case, you should open a terminal and change into the /usr/share/qmix-sdk
directory. Now you can execute the test cases
- Note
- All tests run with a device configuration with simulated devices. That means, if you have real devices connected, then nothing will move.
If you would like to run all tests that do not require user interaction, then you can simply run the script run_all_tests.sh
:
Testing the Python integration
You can test the Python integration by running the test cases in /usr/share/qmix-sdk
. If you run the test cases, then use the script run_pytest.sh
to start a test case. This script ensures, that the device configuration path is set properly.
CETONI SDK - Tar Archive
Installation Directory Content
The CETONI SDK tar archive extracts a number of files into the final SDK folder. The following overview shows which files are available in which directories:
- Root SDK Folder - contains all unit test cases.
- config - provides the configuration files for running the provided tests (the configuration use simulated devices only)
- device_driver Contains the SocketCAN device drivers for the USB-CAN interfaces from IXXAT and SysTec that have been tested with the SDK.
- doc - contains this HTML documentation
- examples - here you find a number of C examples that show how to use the different labbCAN libraries
- include - contains the C include files for each single labbCAN library
- lib - Contains all shared Linux libraries of the SDK. The SDK does not use the system libraries but ships its own libraries to prevent incompatibilities. The SDK has been compiled on an Ubuntu 19.10 VM.
- plugins - contains the LED array plugin and may be used for later addition of custom plugins
- python - Contains the complete Python integration for the CETONI SDK
- sila - The Python based SiLA library for CETONI devices
Requirements and Dependencies
The CETONI SDK depends on the following libraries:
- Qt5Core
- Qt5SerialPort
- libusb
You need to ensure that these libraries are properly installed on your Linux system.
Use the SDK's shared libraries
To link against the SDK's shared libraries and to use the SDK's shared libraries you need to ensure, that the lib folder of the SDK is the first folder in the library search paths. You can do this by prepending the lib folder to the LD_LIBRARY_PATH
environment variable.
Running the unit tests
With the test cases you can check, if the SDK runs properly on your Linux system. To run a test case, you should open a terminal and change into the root SDK directory. Now you can execute the test cases
- Note
- All tests run with a device configuration with simulated devices. That means, if you have real devices connected, then nothing will move.
Linux SocketCAN Drivers
The CETONI SDK for Linux supports the Linux SocketCAN driver. That means, all CAN devices that support the SocketCAN layer are supported by the SDK. The SDK folder device_driver contains the SocketCAN drivers for the following devices:
Follow the instructions in the device driver archives to build and install the device driver for your USB-CAN hardware.
- Note
- We recommend using the SysTec SocketCAN driver as it works more reliably and is easier to compile.
After disconnecting and plugging in the USB cable or after each restart/hibernation the correct CAN bitrate must be set and the CAN interface needs to get started. This can be done with:
If necessary, the interface can also be restarted:
For more information please use the included Readme files from SysTec or IXXAT (e.g. to use candump).