如何解决以下错误?获取接口标志时的scan0:ERROR:没有这样的设备

问题描述 投票:1回答:1

我在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

This the output i get when i give ifconfig

python embedded can-bus
1个回答
1
投票

您需要root权限才能执行您在帖子中编写的最后两个命令:

sudo slcand -o -s6 -t hw -S 3000000 /dev/ttyACM0 slcan0

sudo ifconfig slcan0 up

然后它工作。

© www.soinside.com 2019 - 2024. All rights reserved.