SPI aktivieren /boot/config.txt/ öffnen SPI0 und SPI1 aktivieren mit dtoverlay=spi0-2cs dtoverlay=spi1-3cs MCP2515 aktivieren mit # CAN bus config waveshare RS485 CAN HAT dtoverlay=mcp2515-can0,oscillator=12000000,interrupt=25,spimaxfrequency=2000000 auf Kommandozeile Socket für CAN konfigurieren sudo /sbin/ip link set can0 up type can bitrate 500000 mit ifconfig erfolgreiche Konfiguration prüfen can0: flags=193 mtu 16 unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 10 (UNSPEC) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 Beispielcode in C für CAN socket unter https://www.beyondlogic.org/example-c-socketcan-code/ mit can-utils CAN bus testen cansend 'CAN Bus' 'CAN ID'#'8 Datenbytes in hex' cansend can0 123#00.11.22.33.44.55.66.77.88.aa.bb.cc.dd.ee.ff