sw_setup

Installing Raspian and enabling CAN bus

  • Insert the micro SD card to the Raspberry Pi and power it on. Use an ethernet cable to connect.
  • Access ssh on the Raspberry. Default username is pi, password is raspberry, and hostname is raspberrypi.
  • Run sudo raspi-config and change password and timezone. Perhaps also run an update.
  • Run sudo raspi-config and enable SPI
  • Add these lines to the end of /boot/config.txt:
dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25
dtoverlay=spi-bcm2835-overlay
  • Add these lines to the end of /etc/network/interfaces for CAN to automatically start at boot with bitrate 125kbps(used by Torqeedo Interface Card):
auto can0
iface can0 inet manual
pre-up /sbin/ip link set can0 type can bitrate 125000
up /sbin/ifconfig can0 up
down /sbin/ifconfig can0 down
  • Reboot
  • Add user to dialout group

sudo usermod -a -G dialout $USER

  • May also need to add user to tty group.

sudo usermod -a -G tty $USER

  • sw_setup.txt
  • Last modified: 2022/09/19 11:34
  • by 127.0.0.1