FrameID received wrong

The free LIN software API (Application Programming Interface) for Windows® (only for usage with the PCAN-USB Pro CAN/LIN interface)

FrameID received wrong

Postby etixier » Mon 20. May 2019, 14:25


I am currently working with the PLIN api, in order to send and receive predefined messages through A PEAK. I have created an application that communicate with the peak. The peak is used as master and I have only one slave.
The communication works well, and I can send message and receive the response from my slave, and the datas contained the response are correct.
However, the frameID of the received message is wrong.
Here is my reception loop :
Code: Select all
void linObject::readMessages()
    TLINRcvMsg RcvMessage;
    TLINError error = 1;
        error = LIN_Read(handlerClient, &RcvMessage);
        if (RcvMessage.Type != mstStandard)
//            qDebug() << "message type wrong, Type = " <<RcvMessage.Type;
        if (error == 0)
            qDebug() << "frame_id " << RcvMessage.FrameId;
    }while (!(error & errRcvQueueEmpty));

Have I missed something ?

Thank you for your help,

Best regards,

Posts: 1
Joined: Mon 20. May 2019, 13:47

Re: FrameID received wrong

Postby M.Maidhof » Mon 20. May 2019, 15:11


please note that LIN_Read() will return the protected frame identifier, and not the LIN frame ID. See LIN spec. for more details on how to convert protected ID to LIN frame ID (Example: LIN_frame_id = RcvMessage.FrameId & 0x3F)


Posts: 1247
Joined: Wed 22. Sep 2010, 13:00
Location: Darmstadt, Germany

Return to PLIN-API

This website uses cookies for analytics, for logins to the online shop and the forum, and for the handling of an order. By browsing this website you agree to the use of cookies. Detailed information on their use can be found in our privacy policy.

OKPrivacy Policy