can-utils icon indicating copy to clipboard operation
can-utils copied to clipboard

How to resolve the following error? scan0: ERROR while getting interface flags: No such device

Open Prriyamvradha opened this issue 6 years ago • 5 comments

I used the following commands in SocketCAN and I used the CANtact toolkit as a serial bus interface.ALL the commands work fine except the last command it throws the following error 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

Prriyamvradha avatar Feb 13 '19 15:02 Prriyamvradha

Hm slcan0 is the standard name and you are renaming this to slcan0. Can you test, if you get the same error when using can0 instead of slcan0 in the last two lines?

hartkopp avatar Feb 13 '19 16:02 hartkopp

Hm slcan0 is the standard name and you are renaming this to slcan0. Can you test, if you get the same error when using can0 instead of slcan0 in the last two lines?

Yes, I get the same error.

Prriyamvradha avatar Feb 13 '19 16:02 Prriyamvradha

I tried it on my own. You need to be root to run slcand.

Please try sudo slcand -o -s6 -t hw -S 3000000 /dev/ttyACM0 slcan0 and sudo ifconfig slcan0 up

hartkopp avatar Feb 13 '19 16:02 hartkopp

@Prriyamvradha: Is ithis solved? Can we close this issue?

josemic avatar Jun 30 '20 17:06 josemic

I get the same problem on Ubuntu 18.04 with Dongle usb to can Canable Pro:

sudo slcand -o -c -s1 /dev/ttyACM0 can2 sudo ifconfig can2 up

can2: ERROR while getting interface flags: No such device

miimoza avatar Mar 11 '21 08:03 miimoza