linux - 如何在 linux(YOCTO) 中使用经典 CAN
问题描述
我有一些问题。当我尝试在 Yocto linux 中使用 CAN 时,会出现这样的错误。
root@condor:~/Maro# ip link set up can0 type can bitrate 500000
RTNETLINK answers: Invalid argument
但是,当我尝试打开 CAN FD 时,这是可能的。
root@condor:~/Maro# ip link set can0 type can bitrate 500000 dbitrate 2000000 fd on
如果我使用 fd off 选项,它也有错误。
root@condor:~/Maro# ip link set up can0 type can bitrate 500000 dbitrate 2000000 fd off
RTNETLINK answers: Operation not supported
enter code here
为什么?有什么不同?我检查了 ip 链接设置选项。有 fd off 选项。
ip link set can0 type can help
Usage: ip link set DEVICE type can
[ bitrate BITRATE [ sample-point SAMPLE-POINT] ] |
[ tq TQ prop-seg PROP_SEG phase-seg1 PHASE-SEG1
phase-seg2 PHASE-SEG2 [ sjw SJW ] ]
[ dbitrate BITRATE [ dsample-point SAMPLE-POINT] ] |
[ dtq TQ dprop-seg PROP_SEG dphase-seg1 PHASE-SEG1
dphase-seg2 PHASE-SEG2 [ dsjw SJW ] ]
[ loopback { on | off } ]
[ listen-only { on | off } ]
[ triple-sampling { on | off } ]
[ one-shot { on | off } ]
[ berr-reporting { on | off } ]
[ fd { on | off } ]
[ fd-non-iso { on | off } ]
[ presume-ack { on | off } ]
[ restart-ms TIME-MS ]
[ restart ]