Canberry with Labview

To use canberry with LabView to receceive data from any can device, it is possible copy the server program canberry_server in a directory in you raspberry.


When you transfer via ftp the canberry_server file on raspberry check that the ftp transfer is set in binary mode.
After the finish to transfer the file on raspberry run the command:
pi@raspberrypi ~/yourdir$ chmod a+x canberry_server

The program has been tested with kernel 4.1.7+, it is possible to download the the iso to kernel_4.1.7+.

Edit can-start.h with the command:

pi@raspberrypi ~$ nano

ip link set can0 up type can bitrate 1000000

Set the can bitrate in the relevant line of the file
Run the script with command:
pi@raspberrypi ~ $ sudo sh

Check the option of the server program canberry_server running the following command:

pi@raspberrypi ~ $ ./canberry_server


Usage: canberry_server [options] <CAN interface>+ (use CTRL-C to terminate canberry_server)
Options: -m <mask> (ID filter mask. Default 0x00000000) *
-v <value> (ID filter value. Default 0x00000000) *
-i <0|1> (invert the specified ID filter) *
-e <emask> (mask for error frames)
-p <port> (listen on port <port>. Default: 28700)

* The CAN ID filter matches, when …<received_can_id> & mask == value & mask
When using more than one CAN interface the options
m/v/i/e have comma separated values e.g. ‘-m 0,7FF,0’
Use interface name ‘any’ to receive from all CAN interfaces.
The basic command line to run the server is:

pi@raspberrypi ~ $ ./canberry_server can0


The default listen port is 28700

It is possible to download the demo program for LabView at this link



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.