Contents
CanGateway plugin
Goal
The CanGateway plugin is in charge of interfacing a CAN bus and it manages the CAN card.
Driver installation
Linux driver
The supported driver are:
- socketCAN
- kvaser card (USB, PCI, PCIe,...)
First of all, follow the README in source:pacpussensors/trunk/CanGateway/driver/kvaser/linuxcan.tar.gz in order to install the kvaser driver.
Note that this procedure blacklist the SocketCAN driver.
To check if the KVASER driver is properly installed, type in a terminal lsmod | grep kv
.
You must see a kvaser driver running:
$ lsmod | grep kv kvm 452088 0 kvpcican 43541 0
If the automatic loading of the driver doesn't work at startup, you can add the file kvaser.conf
containing this text:
# kvaser module load kvpcican
in the /etc/modules-load.d
folder.
Windows driver
TODO
Compilation
First, make sure the CMakeList.txt at the root of the directory is well configured (into trunk/). In order to install the CanGateway plugin, modify the file and verify you have the following line :
add_subdirectory(CanGateway)
Also, the environment variable $PACPUS_ROOT must point to the pacpus installation directory (you normally already set it when you installed PACPUS).
Then we need to configure the installation :
$ export PACPUS_ROOT=/opt/pacpus/0.2.3 # Pacpus Framework path $ cd trunk/build/ # first go into the build folder $ cmake ..
Now we can compile and install :
$ sudo make install
Make sure the executable files you just created are copied into $PACPUS_ROOT/lib/.
Execution
In order to work with the plugins we want, PACPUS needs an XML file.
XML configuration
Put an example xml file.
Fields:
- source ...
- speed ...
Running the plugin
Please verify that you have a working pacpus installation on your system: refer to the GettingStarted page.
Testing under Linux
Run the plugin with this command:
cd $PACPUS_ROOT ./PacpusSensor can.xml
Testing under Windows
TODO