Published: 30.10.2018 Copyright by Joy-IT 7
CAN Module
To install the necessary extensions and to be able to use the CAN module with a Raspberry Pi, please
update the package lists rst and install the extension can-uls:
Next, use the following command to get the kernel version of your Raspberry pis. This is necessary for the
further conguraon of the system.
You will be shown the current kernel version (e.g. "4.4.41-v7").
Next, open and edit the cong.txt le with the following command:
If your kernel version is 4.4.x or newer, please add the following lines to the end of the le:
However, if your Raspberry Pi runs with an older kernel version, please add the following lines to the end
of the le instead:
Save the le with the key combinaon CTRL+O, conrm the saving process with Enter, and exit the editor
with the combinaon CTRL+X.
Restart your Raspberry Pi with the following command:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install can-utils
uname -a
sudo nano /boot/config.txt
dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25
dtoverlay=sp1-1cs
dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25
dtoverlay=sp1-bcm2835-overlay
sudo reboot