Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Raspberry pi SocketCAN-设备状态“;“停止”;_Raspberry Pi_Can Bus_Socketcan - Fatal编程技术网

Raspberry pi SocketCAN-设备状态“;“停止”;

Raspberry pi SocketCAN-设备状态“;“停止”;,raspberry-pi,can-bus,socketcan,Raspberry Pi,Can Bus,Socketcan,我将树莓Pi与使用MCP2515 CAN控制器的PiCAN板一起使用。 我使用SocketCAN通过我编写的应用程序读写CAN消息。 在运行数周后,控制器现在处于“停止”状态。 停止状态和停止状态之间有什么区别? 如果CAN总线上发生太多错误,设备是否进入总线关闭状态?如果您将设备设置为关闭(ip链路设置为关闭canX),设备是否进入停止状态? 是否有其他方式使设备进入停止状态?我无法找到我的应用程序如何设置设备的方法 ip -details -statistics link show can0

我将树莓Pi与使用MCP2515 CAN控制器的PiCAN板一起使用。
我使用SocketCAN通过我编写的应用程序读写CAN消息。
在运行数周后,控制器现在处于“停止”状态。 停止状态和停止状态之间有什么区别?
如果CAN总线上发生太多错误,设备是否进入总线关闭状态?如果您将设备设置为关闭(ip链路设置为关闭canX),设备是否进入停止状态?
是否有其他方式使设备进入停止状态?我无法找到我的应用程序如何设置设备的方法

ip -details -statistics link show can0
3: can0: <NOARP,ECHO> mtu 16 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 10
   link/can  promiscuity 0
   can state STOPPED restart-ms 100
      bitrate 250000 sample-point 0.875
      tq 250 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
      mcp251x: tseg1 3..16 tseg2 2..8 sjw 1..4 brp 1..64 brp-inc 1
      clock 8000000
      re-started bus-errors arbit-lost error-warn error-pass bus-off
      0          0          0          146        139        0         numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
   RX: bytes  packets  errors  dropped overrun mcast
   787700920  151606570 24      0       24      0
   TX: bytes  packets  errors  dropped carrier collsns
   6002905    5895301  0       0       0       0 
ip-详细信息-统计链接显示can0
3:can0:mtu 16 qdisc pfifo_快速状态关闭模式默认组默认qlen 10
链接/can滥交0
can状态停止重新启动ms 100
比特率250000采样点0.875
tq 250道具seg 6相位-seg1 7相位-seg2 2 sjw 1
mcp251x:tseg1 3..16 tseg2..8 sjw 1..4 brp 1..64 brp inc 1
时钟8000000
重新启动总线错误arbit丢失错误警告错误传递总线关闭
0 0 0 146 139 0 numtxqueues 1 numrxqueues 1 gso_max_尺寸65536 gso_max_segs 65535
RX:丢弃的字节数据包错误溢出mcast
787700920  151606570 24      0       24      0
TX:bytes数据包错误丢弃载波collsns
6002905    5895301  0       0       0       0 

您需要熟悉CAN总线设备的错误主动、错误被动和总线关闭错误状态,以及何时需要手动重新启动CAN通信

可在以下链接之一找到所有相关信息: