![]() |
CETONI SDK
20220623
The software libraries for integration of all CETONI devices.
|
The CETONI SDK for Raspberry Pi archive extracts a number of files into the final SDK folder. The following overview shows which files are available in which directories:
The CETONI SDK depends on the Qt5 libraries Qt5Core and Qt5SerialPort. You need to ensure that both libraries are properly installed on your Raspberry Pi. Using the apt
package manager installing the qtbase5-dev
and libqt5serialport5-dev
packages will give you these libraries.
Further you will need the following system libraries for the SDK to work properly:
You can easily install them by running the following command on your Raspi:
To use the Raspberry Pi for controlling all of CETONI's devices, you need to connect directly to the CAN bus. There are two possibilities how you can do this: using a CAN bus board or connecting via USB using the SYS TEC SocketCAN driver. Both options are described below.
Connect the USB-A interface of your Raspi to the USB-B interface of your CETONI Base Module and power the Raspi via your Raspberry Pi USB power supply.
dkms
to install the driver as it's easier and has the advantage that the driver will automatically be rebuilt when you switch to a new kernel. dkms
is installed on your system. If not you can install it with Download the source files for the SYS TEC SocketCAN driver from their website. The version V1.0.3 has been successfully tested to work on a Raspberry Pi 4B.
Next, extract the contents of the archive you just downloaded. Then change into the extracted directory:
Now you can build and install the driver simply with
After you've successfully installed the driver and connected your CETONI Base Module via USB to your Raspberry Pi you should see a new CAN interface (usually called can0
) show up:
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
You can easily test if the connection is working by using the candump
tool (from the can-utils
package), for example. Just start the tool and power on your CETONI Base Module. Then you should see the CAN messages on the bus:
Since the Raspi does not have any CAN interfaces, you need to use a CAN bus board to connect to the bus either via DB9 or 3 way screw terminal. The following hardware components are required:
Mount the PiCAN board on your Raspberry Pi. Refer to the User Guides for PiCAN 2 or PiCAN 3 for more information and detailed instructions on the hardware installation of the board.
Connect the CETONI CAN-Power-Cable to the PiCAN board connectors like shown below. The PiCAN board has a 3A switching mode power supply (SMPS) with reverse polarity protection and 6V to 24V input range. This makes it possible to power the Raspberry Pi directly via the 24V of the CETONI devices. You just need to connect the ground and the 24V wires of the CETONI CAN-Power-Cable to the GND and 12V input pins of the 4 way screw terminal on your PiCAN board:
Plug in the male CETONI plug of the CAN-Power-Cable into the socket of the last module of your system where you would normally plug in the bus termination plug. The following picture shows the connection to a Nemesys M pump that is powered by a Base 120 module:
Further information on how to use the SDK and getting started with development can be found in the CETONI SDK Linux Documentation.
If you would like to use the Raspberry Pi as a SiLA 2 server to control your CETONI devices via SiLA 2, continue with the CETONI SDK SiLA Documentation.