I have a Raspberry Pi 0 W which I am setting up to share a USB device, I want to add the following somewhere so they are executed on boot:
sudo ip link set dev can0 type can bitrate 500000
sudo ip link set dev can0 up
I have already put into /etc/network/interfaces
############### CAN BUS CONFIG ###########################
auto can0
iface can0 inet manual
pre-up ip link set $IFACE type can bitrate 500000 listen-only off
up /sbin/ifconfig $IFACE up
down /sbin/ifconfig $IFACE down
I'm not really sure what the above enables or its benefits, can anyone explain?
The OS on the Raspberry Pi 0 W is:
Raspbian GNU/Linux 11 (bullseye)