I recently got CAN communications working on a Pi4 with the following DT Overlay in Balena and the Waveshare FD CAN Hat:
"spi1-3cs","mcp251xfd,spi0-0,interrupt=25","mcp251xfd,spi1-0,interrupt=24"
DT params:
"audio=on","i2c_arm=on","spi=on","audio=on"
socketcan
seems to work pretty good.
For my next trick I’m going to try and implement CANOpen over this CAN network.