Skip to content

How to set up CAN HAT

Teri Lenard edited this page Mar 13, 2022 · 1 revision

Introduction

The current install script for CAN HAT is not running properly. This guide describes a quick fix to help you install and configure the CAN HAT. The steps bellow were tested on a Raspberry Pi 3 Model B, running RasperryPi OS with kernel 5.10.92+.

Requirements

Steps

  1. Clone the repository containing the drivers:

git clone https://github.com/Seeed-Studio/seeed-linux-dtoverlays.git

  1. Install the latest version of your kernel headers:

sudo apt-get -y --force-yes install raspberrypi-kernel-headers raspberrypi-kernel

  1. Create symlinks between your actual kernel and the newest headers installed:

ln -s /usr/src/linux-headers-5.10.103+ /lib/modules/5.10.92+/build

ln -s /usr/src/linux-headers-5.10.103-v7+ /lib/modules/5.10.92-v7+/build

ln -s /usr/src/linux-headers-5.10.103-v7l+ /lib/modules/5.10.92-v7l+/build

  1. Install drivers:

sudo ./seed-linux-dtoverlays/modules/CAN-HAT/install.sh

  1. Edit /boot/config :
  • Add: dtoverlay=seeed-can-fd-hat-v2
  • Commented: dtoverlay=2xMCP2518FD-spi0
  1. Reboot

  2. Make the interface available at boot:``

Clone this wiki locally