linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* how to check if can0 is up
@ 2015-05-04 19:10 vklein
  2015-05-06 15:28 ` Oliver Hartkopp
  0 siblings, 1 reply; 4+ messages in thread
From: vklein @ 2015-05-04 19:10 UTC (permalink / raw)
  To: linux-can

Hi
I want to test the status of can0 on a BeagleBoneBlack with serial-can 
cape from Logic Supply.

The interface is initialized with
ip link set can0 type can bitrate 250000
ifconfig can0 up


I have tried
cat /sys/class/net/can0/operstate
but this does not work correctly

if can0 is down,  I get "down"

if can0 is up , I get "unknown"
ifconfig says:
can0      Link encap:UNSPEC  HWaddr 
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
           UP RUNNING 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:10
           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
           Interrupt:55


help appreciated

Victor

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-07 11:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-04 19:10 how to check if can0 is up vklein
2015-05-06 15:28 ` Oliver Hartkopp
2015-05-07  7:59   ` Kurt Van Dijck
2015-05-07 11:44     ` vklein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).