Kvaser Linux CANLIB

Frequently Asked Questions

Q: How do I flush the receive and/or transmit queue?
A: Use canFlushReceiveQueue() and canFlushTransmitQueue(). You can also use canIoCtl().

Q: How do I send a wakeup frame using LAPcan + DRVcan S?
A: Use the canMSG_WAKEUP flag in the call to canWrite().

Q: How large is the transmit/receive queue on my hardware?
A: See Message Queue and Buffer Sizes.

Q: How large is the transmit/receive queue in the software?
A: The driver buffers, per default, 256 messages in the transmit queue and 1024 messages (per handle) in the receive queue. These values can be changed although it's rarely needed.

Q: I get strange CAN messages. They have identifiers like 0x8a4 but they are flagged as standard CAN where the maximum identifier is 0x7FF. What's up?
A: You are seeing error frames. Check the flags parameter from canRead() and you will see that the canMSG_ERROR_FLAG is set. The identifier is, on some types of hardware, set to the error code from the CAN controller and this explains the strange error code. See SJA1000 Error Codes for more details.