I have some code that allows me to read data off multiple CAN buses (I have 4 PCAN-USB Pro FD devices); however, sometimes I would be unable to read from some of the CAN buses and I would have to unplug and replug the devices to get it to reset. (Is there any way I can reset the channel without unplugging the USB??)
Here is what cat /proc/pcan looks like prior to unplugging the devices, what is status 0x0002? It looks like I am getting errors.
Code: Select all
*------------- PEAK-System CAN interfaces (http://www.peak-system.com) -------------
*------------- Release_20161108_n (8.2.0) Dec 22 2016 14:19:48 --------------
*------------- [mod] [isa] [pci] [pec] [dng] [par] [usb] [pcc] --------------
*--------------------- 8 interfaces @ major 241 found -----------------------
*n -type- -ndev---base-- irq --btr- --read-- --write- --irqs-- -errors- status
32 usbfd -NA- ffffffff 004 0x001c 00000000 00000000 00000000 00007e6d 0x0002
33 usbfd -NA- ffffffff 255 0x001c 00000000 00000000 00000000 00007e32 0x0002
34 usbfd -NA- ffffffff 003 0x001c 00000000 00000000 00000000 00007dfd 0x0002
35 usbfd -NA- ffffffff 255 0x001c 00000000 00000000 00000000 00007dc2 0x0002
36 usbfd -NA- ffffffff 002 0x001c 00000058 00000003 0000005b 00000000 0x0000
37 usbfd -NA- ffffffff 255 0x001c 00000000 00000000 00000000 00007cd2 0x0002
38 usbfd -NA- ffffffff 001 0x001c 00000000 00000000 00000000 0000525b 0x0002
39 usbfd -NA- ffffffff 255 0x001c 00000000 00000000 00000000 00007c59 0x0002