本文主要是介绍【Linux】CAN相关命令:ip、ifconfig、can-utils,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1、配置CAN波特率
ip link set can0 type can bitrate 50000
2、启动CAN设备
ip link set can0 up
或者
ifconfig can0 up
3、显示CAN设备信息
ip -d -s link show can0
ip -d -s link show can0
2: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 10link/can promiscuity 0can state ERROR-ACTIVE restart-ms 0bitrate 10000
这篇关于【Linux】CAN相关命令:ip、ifconfig、can-utils的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!