You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
canIoCtlInit failes with canERR_PARAM (-1) on Kvaser Leaf Light v2 for Linux #2079
Creating a bus fails during initialization. I'm using the Kvaser backend under Linux with a Kvaser Leaf Light v2. Using the Leaf Light v2 on Windows the same function is successful
Here is my more formal work-around/suggestion for can/interfaces/kvaser/canlib.py
# enable canMSG_LOCAL_TXACK flag in received messagestry:
canIoCtlInit(
self._read_handle,
canstat.canIOCTL_SET_LOCAL_TXACK,
ctypes.byref(ctypes.c_byte(local_echo)),
1,
)
exceptCANLIBOperationErrorasexc:
# Some Linux CANlib/device combinations do not support# canIOCTL_SET_LOCAL_TXACK and return canERR_PARAM (-1).# Continue without TXACK support.ifexc.error_code!=canstat.canERR_PARAM:
raiselog.debug(
"canIOCTL_SET_LOCAL_TXACK not supported by this device/CANlib; ""continuing without local TXACK."
)
Activity
kyle-lawson-innio commentedon Jul 23, 2026
Here is my more formal work-around/suggestion for
can/interfaces/kvaser/canlib.py