would you please help me in answering on couple of questions?
We are using the following product https://www.peak-system.com/PCAN-USB.199.0.html?&L=1 attached to the Linux based system with standard Linux kernel - 4.14.68
Generally available peak_usb driver and SocketCAN are enough in part of interface/device management and sending/receiving CAN messages in our application.
What we need is to retrieve an information about errors might happen in the line and/or detected by CAN Controller. Here I am talking about errors as they are defined in the Linux kernel header
https://github.com/torvalds/linux/blob/ ... an/error.h
At the moment we are using the following tools to retrieve state and statistics for this device
$ ifconfig can0
and
$ ip -details link show can0
and noticed that RX-errors and TX-errors never changed even we are trying to simulate erroneous cases in the line, for example
- Shorting CAN_Low to GND for around 10 seconds
- Shorting CAN_High to GND for around 10 seconds
It seems such tests have influence, since error-warn, error-pass, bus-off - increased. However error counters not.
Please refer to the output of the commands:
Code: Select all
root@intel-corei7-64:~# ip -details -statistics link show can0
4: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 10
link/can promiscuity 0
can state ERROR-ACTIVE restart-ms 100
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
pcan_usb: tseg1 1..16 tseg2 1..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 6 6 0 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
RX: bytes packets errors dropped overrun mcast
665847 83247 0 0 0 0
TX: bytes packets errors dropped carrier collsns
529725 66703 0 0 0 0
root@intel-corei7-64:~#
root@intel-corei7-64:~# ip -details -statistics link show can0
4: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc fq_codel state UP mode DEFAULT group default qlen 10
link/can promiscuity 0
can state ERROR-ACTIVE restart-ms 100
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
pcan_usb: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
12 0 0 10 12 12 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
RX: bytes packets errors dropped overrun mcast
711407 88968 0 0 0 0
TX: bytes packets errors dropped carrier collsns
1560828 196540 0 100 0 0
root@intel-corei7-64:~#
- Does PCAN-USB device (Linux kernel driver) supports reporting of RX/TX errors?
- Is there any difference in this part (RX/TX errors detection and report) between PCAN-USB device and PCAN-USB Pro FD (https://www.peak-system.com/PCAN-USB-Pr ... .html?&L=1)?
- We noticed that Error Frames might be passed to the user space in case if CAN_RAW_ERR_FILTER socket option set. Does PCAN-USB device (Linux kernel driver) support transfer of this Error Frames to user space application?
Thank you!