我在SocketCAN中使用了以下命令,并使用CANtact工具包作为串行总线接口。除最后一个命令外,所有命令都能正常工作。它会引发以下错误:
scan0: ERROR while getting interface flags: No such device.
OS-Ubuntu 18.04.1
sudo modprobe can
sudo modprobe can_raw
sudo modprobe slcan
slcand -o -s6 -t hw -S 3000000 /dev/ttyACM0 slcan0
ifconfig slcan0 up
您需要root权限才能执行您在帖子中编写的最后两个命令:
sudo slcand -o -s6 -t hw -S 3000000 /dev/ttyACM0 slcan0
sudo ifconfig slcan0 up
然后它工作。