Python and RPi n00b here. Trying to get CANopen working on my RPI, and think I'm 8/10s of the way to communicating.
Target device is an RPi 3+ with fairly pedestrian install of Raspbian Buster and 5.4.51-v7+ linux kernel, attached to Kvaser Leaf USB CANopen adapter. CANopen adapter hardware is known to be good, works well with Windows software.
Relevant info:
-Installed can-utils
-Installed python-can 4.0.0
-Appear to have installed Kvaser drivers successfully (finally got make to complete without errors)
-vcan appears to work fine - have successfully transmitted and received test packets with this handy virtual can adapter using can-utils
I can set up the can socket initially:
sudo modprobe can
but when I try to initialize actual hardware, it fails and gets the following error:
sudo ip link add dev can0 type can
RTNETLINK answers:Operation not supported
Obviously I'm missing something, but cannot figure out what. I notice that others have had similar issues (though different hardware). Please advise of solutions and TIA.
You need to uninstall "Kvaser Linux Drivers and SDK" and install "Kvaser SocketCAN device driver".