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 first and install the extension
can
-
utils:
Next, use the following command to get the kernel version of your Raspberry pis. This is necessary for the
further configuration of the system.
You will be shown the current kernel version (e.g. "4.4.41
-
v7").
Next, open and edit the
config.txt
file with the following command:
If your kernel version is 4.4.x or newer, please add the following lines to the end of the file:
However, if your Raspberry Pi runs with an older kernel version, please add the following lines to the end
of the file instead:
Save the file with the key combination
CTRL+O
, confirm the saving process with
Enter
, and exit the editor
with the combination
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