I am relatively new to CAN and working on a project that requires me to read and filter some data off a CAN bus. I've come to understand that this would first require accessing the CAN data through the CAN bus (I am using the PEAK USB adapter) and then translating that data through the .dbc file associated with the CAN bus.
I think I have figured the first part out using manuals like -
h**s://www.star.bnl.gov/public/tof/electronics ... n_3.2x.pdf.
I can see CAN data coming over the USB like so -
Code: Select all
ragkumar@ragkumar-VirtualBox:~/Desktop/peak-linux-driver-8.9.0$ cat /dev/pcan32
x b 0x00000001 0 2832581847 779
m s 0x00000458 7 0x02 0x01 0x00 0x00 0x00 0x00 0x00 2832581847 088
m s 0x000003ed 1 0x00 2832581847 216
m s 0x00000113 3 0x01 0x97 0x01 2832581847 344
m s 0x000007ff 8 0x03 0x00 0x08 0x48 0x61 0x42 0x01 0x02 2832581847 600
m s 0x00000318 8 0x13 0x0a 0x17 0x00 0x08 0x15 0x0f 0x7b 2832581847 813
m s 0x00000458 7 0x02 0x01 0x00 0x00 0x00 0x00 0x00 2832581848 069
m s 0x00000405 8 0x12 0x46 0x33 0x38 0x38 0x37 0x34 0x37 2832581848 283
m s 0x00000113 3 0x01 0x97 0x01 2832581848 453
m s 0x000007ff 8 0x01 0x05 0x53 0x55 0x04 0x04 0x15 0x00 2832581848 709
m s 0x00000318 8 0x13 0x0a 0x17 0x00 0x08 0x15 0x11 0x7d 2832581848 923
Code: Select all
ragkumar@ragkumar-VirtualBox:~/Desktop/peak-linux-driver-8.9.0$ cat /proc/pcan
*------------- PEAK-System CAN interfaces (www.peak-system.com) -------------
*------------- Release_20190802_n (8.9.0) Oct 4 2019 12:46:34 --------------
*---------------------------- [mod] [par] [usb] -----------------------------
*--------------------- 1 interfaces @ major 240 found -----------------------
*n -type- -ndev- --base-- irq --btr- --read-- --write- --irqs-- -errors- status
32 usb -NA- ffffffff 000 0x001c 0000000c 00000000 00000003 00000000 0x0000
Is there a barebones translation possible through python or on the terminal?
Finally, if nothing is possible, can I just track the CAN messages and manually decode?
Thanks!
Raghav