Nominate our 2022 Qt Champions!

CAN bus protocol counter REC/TEC

  • Hi everyone,

    I would like to know where are this counters and how I can recover there value in Qt CAN class .

    Thank you

  • I have found my answer in the CAN protocol here :

    in fact, when problem occur, node send active frame, after 127 active frame , if error is still here, node send passive error frame, and after 255 , node place in mode buss off.

    So we just need to check this type of frame and the type of enum return from Qt lib when we are in mode bus off :

    QCanBusDevice::CanBusStatus QCanBusDevice::busStatus() const


    In fact this is not 127 frame send, because counter increase by 8 bit when error occur but is when counter are 127, node emit passive frame...

Log in to reply