1

Fairly new to this, any help/guidance would be greatly appreciated. Trying to run a virtual CAN network using can-utils, but I keep getting Network down message when I try to do a candump or cangen.

Here is some of the general process...

$: lsmod shows I have these....

Module                  Size  Used by
can_raw                20480  0
slcan                  16384  0
vcan                   16384  0
can                    45056  1 can_raw

Followed by these commands:

$ sudo ip link add name vcan0 type vcan

$ ifconfig vcan

vcan0     Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-
00-00-00-00  
      NOARP  MTU:16  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1 
      RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

$ cangen vcan0

gives me

write:Network is down. 

Does this have something to do with setting chmod?

Ryan Anderson
  • 121
  • 2
  • 11

2 Answers2

2

Better with ip:

ip link set vcan0 up
Fusho
  • 1,469
  • 1
  • 10
  • 22
0

I got it to work. I needed to enter this

sudo ifconfig vcan0 up

I was entering that, minus the 'up'.

Ryan Anderson
  • 121
  • 2
  • 11