|
【Linux】
AIO-3399pro CAN 通讯测试
发表于 2020-10-9 18:11:43
浏览:7412
|
回复:8
打印
只看该作者
[复制链接]
楼主
下载的固件:AIO-RK3399PROC-UBUNTU18.04-GPT-20200525-1016.img.7z
ubuntu 系统装完之后下载了utils,执行如下指令:操作命令: ip link set can0 type can bitrate 250000 //在收发端设置比特率为 250Kbps ip link set can0 up //在收发端打开can0设备 ip -details link show can0在终端显示输出:can0: <NOARP,UP,LOWER_UP,ECHO>mtu 16qdisc pfifo_fast state UP mode DEFAULTgroup default qlen 10 link/can promiscuity 0 can state ERROR-ACTIVE restart-ms 0 bitrate 250000 sample-point 0.875 tq 250 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1 mcp251x:tseg1 3..16 tseg2 2..8 sjw 1..4 brp 1..64 brp-inc 1 clock 4000000numtxqueues 1 numrxqueues 1
接着输入命令 cansend can0 123#1122334455667788发现接收端无数据接收然后输入命令 ip-details link show can0 后查看结果:提示BUS-OFF ,也就是已发数据就can节点状态就掉线。
在终端上显示输出:can0: <NO-CARRIER,NOARP,UP.ECHO> mtu 16qdisc pfifo_fast state UP mode DEFAULTgroupe default qlen 10 link/can promiscuity 0 can state BUS-OFF restart -ms 0 bitrate 250000 sample-point 0.875 tq 250 prop -seg 6 phase-seg1 7 phase-seg2 2 sjw 1 mcp251x: tseg1 3..16 tseg2 2..8 sjw 1..4 brp 1..64 brp-inc 1 clock 4000000numtxqueues 1 numrxqueues 1
|
|