mestrode / lin-interface-library Goto Github PK
View Code? Open in Web Editor NEWProvide LIN-Master functions (write and request LIN-Frames via hardware UART
License: GNU General Public License v2.0
Provide LIN-Master functions (write and request LIN-Frames via hardware UART
License: GNU General Public License v2.0
Hey,
I was reading a lot about LIN and trying to find some libraries and examples. But nothing matches to what I am receiving, and I am pulling my hair on that.
I wonder if you could maybe help me, I know It's been a year since you've pushed to that repo but worth a shot.
So I have LIN in my car for ambient lighting and LED modules. It constantly sends loads of messages but they are same messages.
I think it should be something similar to https://github.com/MarkusLange/APGRD004/blob/main/src/apgrd004.cpp
so I've used your library and id didn't really give me an answer either.
While I understand I should have break 0x00
and sync 0x55
I can't seem to figure out what I am receiving
Here is an example
0x00 0x20 0x18 0xE6 0x06 0x26
0x00 0x20 0x18 0xE6 0x06 0x26 0x 0x06 0x26
0x00 0x20 0x18 0xE6 0x06 0x26 0x06 0x26
0x00 0x20 0x18 0xE6 0x06 0x26 0xE6 0x26
0x00 0x20 0x1E 0xE6 0x26
.
.
.
0x00 0x20 0x1E 0xE6 0x26 0x18 0xF8 0x26
0x00 0x20 0x1E 0xF8 0x26
.
.
.
0x00 0x20 0x1E 0xF8 0x26 0xE6 0x26
0x00 0x20 0x1E 0xE6 0x26
.
.
.
0x00 0x20 0x1E 0xE6 0x26 0x18 0xF8 0x26
0x00 0x20 0x1E 0xF8 0x26
.
.
.
0x00 0x20 0x1E 0xF8 0x26 0xF8 0xF8 0x26
0x00 0x20 0x00 0xF8 0x26 0xE6 0xC6 0x26
0x00 0x20 0x00 0xE6 0xE0 0x26
.
.
.
0x00 0x20 0x00 0xE6 0xE0 0x26 0x1E 0x26
0x00 0x20 0x00 0x18 0x26
.
.
.
0x00 0x20 0x00 0x18 0x26 0xE6 0xC6 0x26
0x00 0x20 0x00 0xE6 0xE0 0x26
.
.
.
0x00 0x20 0x00 0xE6 0xE0 0x26 0xE6 0x18 0x26
0x00 0x20 0x18 0xE6 0x06 0x26
.
.
.
0x00 0x20 0x18 0xE6 0x06 0x26 0xE6 0x26
0x00 0x20 0x1E 0xE6 0x26
.
.
.
0x00 0x20 0x1E 0xE6 0x26 0xE6 0x18 0x26
0x00 0x20 0x18 0xE6 0x06 0x26
.
.
.
So when I was playing in the car and changing colors, it was sending longer message which looks like repeat of previous state plus new state request (?)
dots in example are just repeated previous line (it's spamming those lines so I think it could be slaves sending current state ?)
since 0x00
is my break byte, does that mean 0x20
is my sync byte ? then next byte would be PID or ID ?
Also last byte should be CRC but that does not make sense either since last byte is always 0x26
My goal is so I can trigger LED module from my car on my bench, but I am getting nowhere. And all examples over the internet are nothing alike to what I am getting.
Hello,
your code looks good :-)
Can you improve by removing the delay's and the while loops?
This stopps the controller and no other function in the delay time is possible ..
BR
Alf
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.