PCBUSB-Library
PCBUSB-Library copied to clipboard
Unable to disable PCAN_LISTEN_ONLY after CAN_Initialize has been called
If PCAN_LISTEN_ONLY
is enabled before CAN_Initialize
has been called, then trying to disable it subsequently, as follows, has no effect.
int option = PCAN_PARAMETER_OFF;
status = CAN_SetValue(PCAN_CHANNEL, PCAN_LISTEN_ONLY, &option, sizeof(option));
Even though the parameter will be reported as OFF when CAN_GetValue
is called, the PCAN_LISTEN_ONLY
appears to be still active.
This problem is observed with "libPCBUSB.0.11.dylib" on macOS Catalina (Intel).
Test setup:
- PCAN-USB FD
- one node on bus, periodically transmitting a message containing a byte that increments at each transmit
PCAN_LISTEN_ONLY
mode being active can be observed, when messages are received, but the counter is no longer increasing, suggesting that the PCAN device is not acknowledging the message.