CAN bus on Raspberry Pi with Stretch
I needed to install a CAN interface board, available e.g.
CAN Board
on my Raspberry after some time not using it.
Because most of the copy/paste stuff is for the older distribution(s), here how to install
with Stretch (in my case 2017-11-29-raspbian-stretch.img
).
- Add to
/boot/config.txt
dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25
- Add file
/etc/network/interfaces.d/can0
Reboot and you should see the can interface with ifconfig. Even faster you could use my
rpi-can role for Ansible.