LIN Transeiver or Library or my code not working?!


Hello from Germany!

I am currently try to connect to a Seat (Volkswagen) Steering Wheel which communicate via LIN Bus 2.0.

The Library i’m using is this one:

My code for sending and receiving data is the following:

#include <lin_stack.h>

lin_stack LIN1(2); // Creating LIN Stack
byte data_size=8; // length of byte array
byte data[8]; // byte array for received data

void setup() {


void loop() {
// Request data

// read data
byte a =, data_size);

// if data received, print it
if(a == 1){
SerialUSB.println(“New Lin Data: “);
for (int i=0; i<8; i++){SerialUSB.println(data[i],HEX);}

Inside the Libraray I needed to edit the file lin_stack.cpp at the “readStream” funtction because at line 216 of that file code was missing to actually give back received data:

  	for(int j=0;j<data_size;j++){
  		data[j] = rec[j];

With that change I was able to getting follwing data out of my requests:
8E, 8, 7, 20, 23, 4 , 8, 0

The problem: The received data should be this (Lin Analyzer):
Frame ID: 8E
Frame Data: 81, 00, 00, 00, 52, 00, 00 ,00
Checksum: 9D

To be clear: The request the Macchina M2 is sending reaches the steering wheel which responds, but this response i can only read on the external Lin Bus Analyzer, and not on the M2.

I checked it with Microchips Lin Bus Analyzer, so the problem must be on the Macchina M2 side.
The question: Is the fault part the hardware, the library or my code?

Can anyone help?

Thanks in advance,