Pages: [1]
Author Topic: reversing the formula of logging values  (Read 911 times)
s54b32T
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 2


« 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?

valuebyte1byte2byte3
13,50x050x870x65
2727,00x010x870x65
27,30x020x870x65
27,30x030x870x65
-35,10x040x870x65
13,50x050x870x65
13,60x060x870x65
0,00x0a0x870x65
0,60x0b0x870x65
13,60x0c0x870x65
-3,50x0d0x870x65
0,00x100x870x65
0,00x110x870x65
5454,00x120x870x65
0,00xa00x870x65
0,00xa10x870x65
6108.50xa20x870x65
2700,00x010x870x65
2727,00x010x870x66
2754,00x010x870x67
2781,00x010x870x68
2808,00x010x870x69
2660,00x010x850x64
2680,00x010x860x64
2700,00x010x870x64
2720,00x010x880x64
2740,00x010x890x64
2760,00x010x900x64
2686,60x010x850x65
2706,80x010x860x65
2727,00x010x870x65
2747,20x010x880x65
2767,40x010x890x65
2787,60x010x900x65
« Last Edit: June 27, 2025, 07:42:54 PM by s54b32T » Logged
fknbrkn
Hero Member
*****

Karma: +216/-24
Offline Offline

Posts: 1529


mk4 1.8T AUM


« Reply #1 on: June 28, 2025, 03:54:42 AM »

what standard are you referring to?
kwp1281?
this data looking weird to me also
Logged
s54b32T
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 2


« Reply #2 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.
Logged
kartoffelpflanze
Newbie
*

Karma: +1/-0
Offline Offline

Posts: 8


« Reply #3 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 / 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
0x01: byte3 * byte2 * 0.2
0x02: byte3 * byte2 * 0.002
0x03: byte3 * byte2 * 0.002
0x04: (byte3 - 127) * byte2 * -0.01
0x05: (byte3 - 100) * byte2 * 0.1
0x06: byte3 * byte2 * 0.001
0x0A: (byte3 ? 1 : 0)
0x0B: 1 + ((byte3 - 128) * byte2 * 0.0001)
0x0C: byte3 * byte2 * 0.001
0x0D: (byte3 - 127) * byte2 * 0.001
0x10: byte3 & byte2
0x11: byte2 * 256 + byte3
0x12: byte3 * byte2 * 0.04
0xA0: (needs 5 bytes instead of 3)
0xA1: byte2 * 256 + byte3
0xA2: byte2 * byte3 * 0.448

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" Smiley
« Last Edit: July 06, 2025, 08:46:35 PM by kartoffelpflanze » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 1.252 seconds with 17 queries. (Pretty URLs adds 0s, 0q)