Page 1 of 1

LIN bus

Posted: Wed Mar 22, 2023 11:52 pm
by AndreyB
We already read one important bit via K-line, let's see what would end up being first rusEFI LIN use-case :)

Re: LIN bus

Posted: Wed Mar 22, 2023 11:53 pm
by AndreyB
2019 Q7 battery monitoring maybe? LIN is shared with generator and goes to gateway
image.png
image.png (43.66 KiB) Viewed 20506 times
image.png
image.png (17.65 KiB) Viewed 20506 times

Re: LIN bus

Posted: Wed Mar 22, 2023 11:56 pm
by puff
looks like a smart shunt? do you have the part number? know anything about its datagrams?

Re: LIN bus

Posted: Wed Mar 22, 2023 11:59 pm
by mck1117
It's either a shunt or a hall effect sensor.

Aside: Lots of hall effect ones available that you just tape around the battery cable and have regular ground/power/voltage output. Ford makes a few that are on a bazillion different vehicles.

Re: LIN bus

Posted: Thu Mar 23, 2023 9:20 am
by puff
afaik, hall-based current sensors work best at some certain current range: if it is good for small currents, it won't work for large currents (btw, not sure, will it provide wrong readings or just fail). those intended for large currents (e.g. of a starter motor) won't read small values (sensitivity issues?)

but once again, what information do such devices provide and who is the final 'consumer' of such information?

Re: LIN bus

Posted: Thu Mar 23, 2023 6:41 pm
by Dron_Gus
Sorry, following link is Russian https://www.drive2.ru/l/591231042828962546/

Re: LIN bus

Posted: Fri Mar 24, 2023 8:32 am
by puff
I am curious how much current does it consume when in sleep mode? ;-)
Still, no protocol details :-( I wonder, what chip is inside. Is it possible to disassebme the firmware? or decyphering protocol is the way to go?

sort of offtopic: there are also chinese BLE battery trackers, which provide detailed info (Vbatt) over the 30-day period - nice devices for ~$30.

Re: LIN bus

Posted: Fri Mar 24, 2023 10:42 pm
by Dron_Gus
Some battery monitor from "BMW 2 F22 2013":

Code: Select all

RX: ID 0x09, PID 0x49 (TX PID was 0x49), data len 8: 0f 27 57 2c 5e 00 00 b0 CRC 37
RX: ID 0x0a, PID 0xca (TX PID was 0xca), data len 8: 00 00 00 00 00 ff ff ff CRC 00
RX: ID 0x0b, PID 0x8b (TX PID was 0x8b), data len 8: 00 00 00 00 7c ff ff ff CRC 83
RX: ID 0x0f, PID 0xcf (TX PID was 0xcf), data len 8: ff ff ff ff ff ff ff ff CRC 00
RX: ID 0x10, PID 0x50 (TX PID was 0x50), data len 8: 00 ff 00 00 00 00 00 00 CRC 00
RX: ID 0x11, PID 0x11 (TX PID was 0x11), data len 8: 00 00 00 00 00 00 00 00 CRC ff
Only few bytes in first message changes... Seems it need some additional initialization?

Re: LIN bus

Posted: Fri Mar 24, 2023 11:40 pm
by Dron_Gus
Battery monitor from Audi A5/S5 2008+
Baudrate seems to be around 19200. New (LIN2.0) CRC type.

Code: Select all

---LIN wake---
RX: ID 0x2d, PID 0xad (TX PID was 0xad), data len 8: 60 30 00 80 00 ff fe ff CRC 42
RX: ID 0x2e, PID 0x2e (TX PID was 0x2e), data len 8: 00 00 00 00 80 00 08 fc CRC 4c
RX: ID 0x2f, PID 0x6f (TX PID was 0x6f), data len 8: 2f 29 e6 7f 3e 1a d0 00 CRC a8
RX: ID 0x30, PID 0xf0 (TX PID was 0xf0), data len 8: 17 ff 3e 3c 1e c0 b1 0b CRC e1
RX: ID 0x34, PID 0xb4 (TX PID was 0xb4), data len 8: af 2e 03 f1 a8 03 66 0c CRC 5a

Re: LIN bus

Posted: Fri Mar 24, 2023 11:45 pm
by AndreyB
Dron_Gus wrote:
Fri Mar 24, 2023 11:40 pm
New (LIN2.0) CRC type.
PRRRRRRRRRRRRRRRRR
PPPPPPPPPPPPPPPPPPR
PR?

Re: LIN bus

Posted: Sat Mar 25, 2023 5:31 am
by Dron_Gus
AndreyB wrote:
Fri Mar 24, 2023 11:45 pm
PRRRRRRRRRRRRRRRRR
PPPPPPPPPPPPPPPPPPR
PR?
This was captured with garbage lin adapter for PC... neet some time to move code in RE

Re: LIN bus

Posted: Sat Mar 25, 2023 9:20 am
by puff
which code? it's just raw data..
btw, googled for that BMW battery wire and got this:
"Плюсовой провод аккумуляторной батареи БМВ, Клемма аккумулятора BMW с пиропатроном" %-)))

Re: LIN bus

Posted: Sat Mar 25, 2023 10:27 am
by Dron_Gus
puff wrote:
Sat Mar 25, 2023 9:20 am
which code? it's just raw data..
btw, googled for that BMW battery wire and got this:
"Плюсовой провод аккумуляторной батареи БМВ, Клемма аккумулятора BMW с пиропатроном" %-)))
LIN bus driver code.
I have only minus battery wire. Hope it will not explode.

Re: LIN bus

Posted: Mon Mar 27, 2023 7:52 pm
by Dron_Gus
https://github.com/mestrode/IBS-Sensor-Library but not compatible with these two sensors that I got from junkyard.