How can I add the pican-m drivers to Hass OS

Hi, I would like to add the SignalK addon (hassio-addons/signalk at master · alexbelgium/hassio-addons · GitHub) to my Home Assistant running RPi4 8GB RAM in my powerboat. I would like to use the Pican-M hat (PICAN-M - NMEA 0183 & NMEA 2000 HAT For Raspberry Pi) to enable NMEA2000 communication to the SignalK addon.

The problem is that I have a hard time loading all the Pican-M dependencies into Hass OS. This is the install guide for the Raspbian RPi image. https://copperhilltech.com/content/pican-m_UGB_10.pdf

Enabling the Pican-M hat involves adding some stuff to the boot/config.txt

dtparam=i2c_arm=on
dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25 
dtoverlay=spi-bcm2835-overlay

Installing can utils
sudo apt-get install can-utils

Bring up the can interface
sudo /sbin/ip link set can0 up type can bitrate 250000

Try to dump the can messages
candump can0

Somehow automatically bring up can0 at boot

Any ideas on how I can get the Pican-M hat to function with Hass OS?

HAOS is not meant to allow access to install other things in the OS. If you do want OS control on the device running HA, you will need to use another installation method, such as container. That will mean you cannot use addons but need to do everything in containers.

The other option would mean running HAOS in a VM, but I don’t think you can do that on a rpi4.

Could it be those tools you need are already installed in the addon? They might not need to be installed on the bare os.

Thanks for the reply. I run HA in containers in some other installations, but I would like use Hass OS in the powerboat setup, just for simplicity. I more and more start to enjoy the pure simplicity and stability of Hass OS.

If I add the necessary binaries and tools to the container, will the container be able to enable/reach the can0 device? I mean, the hat is physically attached to the RPi and I guess the RPi needs to recognize the device to even present it to the addon container, right?

Anything you succeed in installing will probably be removed with next HAOS update.

Yeah, I currently run SignalK on a separate RPi, and I will probably continue to do so. But I still wonder if the can tools in a container potentially/in theory could reach the Pican-M hat if attached to a Hass OS RPi.