Quad CAN BUS is an open hardware to connect a couple of canberry boards to Raspberry Pi. In this way it is possible to have 4 CAN interfaces: can0, can1, can2 and can3. The adapter is very very simple, it is a PCB with three 40 ways connectors, see the following scheme.
The Canberry 1 uses the standard pins (SPI 0) and it is identified as can0 and can1 with standard overlay files present in /boot/overlays, instead the Canberry 2 is remapped on the SPI1. In order to enable the intercaces can2 and can3 we must copy the can2 and can3 overlay in /boot/overlays as super user (If you want edit and ricompile the overlay files dtbo download can2 and can3 dts files).
After that edit /boot/config.txt modify the following row
#In this way the SPI 1 is enabled with one chip select pin only for a canberry one channel
#In this way the SPI 1 is enabled with two chip select pins
For the Canberry 1 the interface can0 is located in SPI0.1(X2 connector) and can1 in SPI0.0(X1 connector), instead for the Canberry 2 the interface can2 is located in SPI1.1(X2 connector) and can3 in SPI1.0(X1 connector).
Run sudo reboot
after your raspberry has been booted, go to home directory:
add these lines to the script
ip link set can0 up type can bitrate 1000000
ip link set can1 up type can bitrate 1000000
ip link set can2 up type can bitrate 1000000
ip link set can3 up type can bitrate 1000000
Run the script:
sudo sh can-start.sh
now you can see the 4 can interfaces
So the system is ready, then you can use standard canbus command to use the peripheral:
candump can0 -> to monitoring can bus traffic
cansend can0 7DF#0201050000000000 -> to send canbus commands
candump can1 -> to monitoring can bus traffic
cansend can1 7DF#0201050000000000 -> to send canbus commands
To use both interface simultaneously open 2 different telnet sessions.
The QUAD CAN ADAPTER is available on our shop at a price of 15€