|
Title: reversing the formula of logging values Post by: s54b32T on June 27, 2025, 07:41:01 PM Hi,
I'm trying to create a small logger for an older Siemens ECU. Normally I try to find pattern in the response value and create the formula. Normally this working quite good, but I'm stuck at the moment with some temperature values that are a 3 byte answer. Maybe someone is aware of a typical pattern how Siemens outputs float values on obd with 3 bytes. byte 2 and 3 looking pretty clear to me, they are (with a factor) multiplied. but I can't find the pattern on the first byte. Any ideas?
Title: Re: reversing the formula of logging values Post by: fknbrkn on June 28, 2025, 03:54:42 AM what standard are you referring to?
kwp1281? this data looking weird to me also Title: Re: reversing the formula of logging values Post by: s54b32T on June 29, 2025, 05:51:48 PM what standard are you referring to? kwp1281? this data looking weird to me also It looks like kwp2000,. I have tested various values and byte combinations with original ecu and also with an emulated ecu to inject every Byte combination that I want. But this values is really strange, I just can't figure it out what the first byte does. Title: Re: reversing the formula of logging values Post by: kartoffelpflanze on July 06, 2025, 08:38:32 PM Those just look like KWP1281-style measuring blocks, which most KWP2000 ECUs support. They consist of a formula byte (first byte), which tells how to interpret the next 2 bytes (some formulas use more than 2). The first byte is normally called the Normierwert (factor), and the second one is the Messwert (measurement), but this doesn't make sense for all formulas.
Anyways, these formulas are well-known: http://nefariousmotorsports.com/forum/index.php?topic=22.msg166322#msg166322 (http://nefariousmotorsports.com/forum/index.php?topic=22.msg166322#msg166322) / https://github.com/domnulvlad/KLineKWP1281Lib/blob/84f90a9a1dc28d8706187fdbf9144e60799e6afe/src/KLineKWP1281Lib.cpp#L2211 (https://github.com/domnulvlad/KLineKWP1281Lib/blob/84f90a9a1dc28d8706187fdbf9144e60799e6afe/src/KLineKWP1281Lib.cpp#L2211) Here are those specified in your provided data: Code: 0x05: (byte3 - 100) * byte2 * 0.1 Some of your values are incorrect, I suspect you did not record them properly. Something else to note, I have never seen a single measurement change its formula, ever. So I assume your ECU returns a single formula for the measurement you are interested in, but the data you provided is from you playing around with the first byte with your "emulated ECU" :) |