How to bring up the CAN bus when bootup?

How to bring up the CAN bus when bootup without manually input of the following?

  1. sudo modprobe mttcan
  2. sudo ip link set can0 type can bitrate 1000000
  3. sudo ifconfig can0 up

@tao.wang

Please see this post: https://devtalk.nvidia.com/default/topic/1011148/jetson-tx2/enable-can-bus-on-jetson-tx2/post/5225038/#5225038

Just modify with your bitrate in the /etc/network/interfaces file

Ltro

Thanks Ltro,

It works as putting the commands in rc.local. I also find this link is helpful: http://developer.ridgerun.com/wiki/index.php/How_to_configure_and_use_CAN_bus