kairos icon indicating copy to clipboard operation
kairos copied to clipboard

Help getting a Raspberry Pi CANBUS hat going

Open jimmykarily opened this issue 1 year ago • 2 comments

Discussed in https://github.com/kairos-io/kairos/discussions/2517

Originally posted by NGTOne April 26, 2024 I'm trying to get a PiCAN2 Duo going on a RasPi 4B with Ubuntu 22.04+Kairos, but nothing I do seems to make it work - it never detects the two CAN ports the board exposes. I've built an image with the settings from the PiCAN2 documentation in both /boot/config.txt and /boot/firmware/config.txt, and neither seems to have any effect.

$ cat /boot/config.txt 
# https://www.raspberrypi.com/documentation/computers/config_txt.html
# https://emteria.com/kb/connect-uart-rpi
# https://www.raspberrypi.com/documentation/computers/config_txt.html
enable_uart=1
uart_2ndstage=1

# Disabling bluetooth might change the serial device:
# https://raspberrypi.stackexchange.com/a/69721
# On rpi4, if bluetooth is not disabled (like here), the device is /dev/ttyS0
#dtoverlay=disable-bt
dtparam=i2c_arm=on
# dtparam=i2c_arm_baudrate=400000
dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25
dtoverlay=mcp2515-can1,oscillator=16000000,interrupt=24
dtoverlay=spi-bcm2835-overlay
$ sudo /sbin/ip link set can0 up type can bitrate 500000
Cannot find device "can0"

I've verified it works on a clean Raspbian, so I know it's something in the Kairos/Ubuntu configuration.

jimmykarily avatar Nov 25 '24 09:11 jimmykarily

It would be fixed by this: https://github.com/kairos-io/kairos/issues/1392

jimmykarily avatar Dec 02 '24 09:12 jimmykarily

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar May 31 '25 02:05 github-actions[bot]