NefMoto

Technical => Communication Protocols => Topic started by: Tony@NefMoto on September 02, 2009, 10:13:23 PM



Title: KWP-1281 Measuring Block Value Formulas
Post by: Tony@NefMoto on September 02, 2009, 10:13:23 PM

A list of all of the scaling formulas used by the KWP-1281 protocol when transmitting measured values.


Title: Re: KWP-1281 Measuring Block Value Formulas
Post by: elRey on September 07, 2010, 09:31:15 AM
Is sample rate limited using kwp1281 to read these? Is there a workaround to increase sample rate?


Title: Re: KWP-1281 Measuring Block Value Formulas
Post by: Tony@NefMoto on September 07, 2010, 11:28:19 AM
Sample rated is limited by the spec of the KWP1281 protocol.

If you want to sample faster, you would need to communicate over a different protocol like KWP2000.


Title: Re: KWP-1281 Measuring Block Value Formulas
Post by: elRey on September 12, 2010, 08:03:50 AM
Is it the kwp1281 that causes the sample rate to decrease the more mblocks you read?

Is it the same with kwp2000? Or does sample rate remain the same more matter how many mblocks are read?

Don't you have a data  logging utility in the works?

Thanks,
Rey


Title: Re: KWP-1281 Measuring Block Value Formulas
Post by: Tony@NefMoto on September 12, 2010, 01:17:36 PM
The KWP1281 protocol runs at fairly slow baud rate of 10400. The more measuring blocks you read, the longer it will be between each block read.

I have a data logger in the works, and it or checksum correction is what I am hoping to release next.


Title: Re: KWP-1281 Measuring Block Value Formulas
Post by: elRey on September 12, 2010, 06:49:00 PM
Great. I can't wait!

How you you suppose APR's ECU Explorer is able to get such a high sample rate that is not affected by the number of channels read at one time?

I know it's very ECU specific (property file need for each ECU).


Title: Re: KWP-1281 Measuring Block Value Formulas
Post by: Tony@NefMoto on September 13, 2010, 09:11:54 AM
They use the KWP2000 protocol for ECUx which can run at a much faster baud rate.


Title: Re: KWP-1281 Measuring Block Value Formulas
Post by: jacog on September 16, 2011, 01:02:49 AM
Hi,I'm looking for formulas used in VW-TP 2.0 (over CAN). For numbers from 1 to 70 KW1281 formulas are ok but for example on group 3 (tested on Octavia 1.4TSI), second value uses formula number 0x60 = 96dec.

I need this for VAGCANlogger project - standalone logger which saves engine logs on SD card.


Title: Re: KWP-1281 Measuring Block Value Formulas
Post by: fknbrkn on January 07, 2015, 11:30:06 AM
A list of all of the scaling formulas used by the KWP-1281 protocol when transmitting measured values.

can someone say where in binary variables are linked with this bytes ? and how they are getting IDs ? ( 1 nmot, 2 rl etc )
i want to declare my new variable to saw it in vcds meas. group


Title: Re: KWP-1281 Measuring Block Value Formulas
Post by: sonflasch on February 17, 2021, 01:57:51 AM
Hi,I'm looking for formulas used in VW-TP 2.0 (over CAN). For numbers from 1 to 70 KW1281 formulas are ok but for example on group 3 (tested on Octavia 1.4TSI), second value uses formula number 0x60 = 96dec.

I need this for VAGCANlogger project - standalone logger which saves engine logs on SD card.

Hello @ all
like "jacog" I am looking for what there are for formulas after 70.
Or does it end at 70 and I have a mistake? why is it for example 96 as described above?

Thanks if someone cleared it up

Kind Regards



Title: Re: KWP-1281 Measuring Block Value Formulas
Post by: elias on May 01, 2023, 02:54:28 PM
Hey

I am also really interested in figuring out, how values after 70(dec) behave. Especially trying to figure out how 0x60(dec 96) behave. If someone have some informations, please share.

Many thanks in Advance,
Elias


Title: Re: KWP-1281 Measuring Block Value Formulas
Post by: elias on May 02, 2023, 02:34:40 PM
Okey i found the missing measurement blocks formulas. Attached is the document which includes the informations needed. If you combine it with the previous table, you should be able to figure out the formulas.

There is also a example implementation using this table on github:
https://github.com/fr3ts0n/AndrOBD/blob/master/library/src/main/java/com/fr3ts0n/ecu/VagConversion.java



Title: Re: KWP-1281 Measuring Block Value Formulas
Post by: domnulvlad on July 01, 2024, 04:25:36 AM
Sorry for reviving such an old topic, but I might have some valuable info to share. And sorry if it seems like self-advertising, I'm just sharing the data I have collected.

https://github.com/domnulvlad/KLineKWP1281Lib/blob/main/src/KLineKWP1281Lib.cpp#L1652 (https://github.com/domnulvlad/KLineKWP1281Lib/blob/main/src/KLineKWP1281Lib.cpp#L1652)

This is my KWP1281 Arduino library, the link takes you straight to the function which applies conversion formulas. I hope they are all correct. Some of them I had to figure out through trial and error or debugging/decompilation. The ones still marked as "unknown", I have not yet figured out how to convert.


Title: Re: KWP-1281 Measuring Block Value Formulas
Post by: prj on July 02, 2024, 08:33:59 AM
You do not need to debug anything, all these formulas are in VAG iDEX access DB.
Opening that db can be hardly called reversing.

Here's dump of my logger class that calculates the values, labels and units.
Fuck implementing this ancient shit again and again and again.

Happy copy pasting.


Title: Re: KWP-1281 Measuring Block Value Formulas
Post by: domnulvlad on July 02, 2024, 12:29:53 PM
Very nice. It's easy to do when you have all the resources you need. I also made do with what I had, but I will assume yours are more accurate. Still, what is the meaning of formulas 139, 140, 141? You have commented them out, and I couldn't figure them out by giving values either.


Title: Re: KWP-1281 Measuring Block Value Formulas
Post by: prj on July 02, 2024, 03:36:39 PM
Very nice. It's easy to do when you have all the resources you need. I also made do with what I had, but I will assume yours are more accurate. Still, what is the meaning of formulas 139, 140, 141? You have commented them out, and I couldn't figure them out by giving values either.

Mine are not "more accurate", mine are exactly what VAG uses internally, dumped from their own tables.

139-141 are commented because they are probably almost never used in reality, and the translation is... annoying to say the least.
There's lookuptables and then calculations using those lookup tables.

Because I didn't see any ECU's use them I didn't bother.

If you want to implement them you will need to dump the iDEX data and test.


Title: Re: KWP-1281 Measuring Block Value Formulas
Post by: domnulvlad on July 02, 2024, 08:06:44 PM
Mine are not "more accurate", mine are exactly what VAG uses internally
So, by definition, more accurate than mine =)

Thank you for sharing your work.


Title: Re: Re: KWP-1281 Measuring Block Value Formulas
Post by: kartoffelpflanze on July 03, 2024, 04:41:08 AM
You do not need to debug anything, all these formulas are in VAG iDEX access DB.
Opening that db can be hardly called reversing.

Here's dump of my logger class that calculates the values, labels and units.
Fuck implementing this ancient shit again and again and again.

Happy copy pasting.
Is the data from iDEX different in any way from ODIS? I found the same strings as in your TEXTTAB in ODIS, named FORMULA37.


Title: Re: Re: KWP-1281 Measuring Block Value Formulas
Post by: prj on July 03, 2024, 05:22:21 AM
Is the data from iDEX different in any way from ODIS? I found the same strings as in your TEXTTAB in ODIS, named FORMULA37.

It is pretty much the same data just in a different format.
iDEX was easier for me to dump for these, so I used it.

VAS-PC also contains this data.