VW Transport Protocol 2.0

2,508 views
Skip to first unread message

SDLV

unread,
Jan 30, 2013, 10:20:11 AM1/30/13
to jazdw-s...@googlegroups.com
      Hi Jared,

I'm trying to make a C++ tp2.0 implementation. I'm interested if you did some implementations of the VW TP2.0 protocol? Maybe, you could help me with some stuff.

    Have a nice day!

jazdw

unread,
Jan 31, 2013, 12:32:51 AM1/31/13
to jazdw-s...@googlegroups.com
I'm probably not going to have too much time to help you but if you have any specific questions I will try to answer them.

What device are you using to interface with the CAN bus? Are you writing a TP 2.0 driver for the Linux Socket CAN system?

SDLV

unread,
Jan 31, 2013, 1:52:23 AM1/31/13
to jazdw-s...@googlegroups.com
        Hi Jared,

   I'm using an ECU(engine control unit) from VW and it's connected with an EDICard2(pc-card - PCMCIA) from SOFTING at my computer. I'm trying to make a C++ implementation for TP20 protocol. My purpose is to realize communication from ECU to computer using TP20 protocol. Until now i'd implemented some from the code, but i'm stuck to SendMessage,ReceiveMessage(), and SendAndReceiveMessage() methods.
  If you have some documents with TP2.0 it would be helpful for me.

   Thanks for the quick response, and have a nice day!

jazdw

unread,
Jan 31, 2013, 2:01:20 AM1/31/13
to jazdw-s...@googlegroups.com
So you are developing a stand alone C++ application that accesses the CAN bus through the COM port?
You are going to have to give me more information on what you are stuck on if you want some help. I have no idea what your SendMessage() etc functions do.

I do not have any documents other than what is referenced at http://jazdw.net/tp20.htm

pcb....@gmail.com

unread,
Mar 3, 2013, 8:23:15 PM3/3/13
to jazdw-s...@googlegroups.com
Hello Jared. I wonder if you can tell me what exactly are the data that i receive from the ECU.. I do not know where are they, or how many bytes is each value or how to decode them. I can receive for example the engine measuring block 01 but which byte(s) is the rpm, coolant, etc ? Any help on that? I haven't found anything yet by searching

jazdw

unread,
Mar 4, 2013, 6:19:46 PM3/4/13
to jazdw-s...@googlegroups.com
I would suggest reading here - http://www.blafusel.de/obd/obd2_kw1281.html & here http://www.blafusel.de/obd/vag_kw2000.html
They are in German but probably the best resources on the net.

sergun...@gmail.com

unread,
Mar 15, 2013, 10:52:53 AM3/15/13
to jazdw-s...@googlegroups.com
Hi Jared

Great job, you may have other case? (kwp2000 :: decodeBlockData?
Yes it would be a maximum of 255 pieces what is possible.

One can also apply them to TP2.0.

jazdw

unread,
Mar 19, 2013, 5:26:08 AM3/19/13
to jazdw-s...@googlegroups.com
Yes you could also have a look at the source code I have posted on GitHub.

I'm not sure what the second part of your message means sorry.

sergun...@gmail.com

unread,
Mar 20, 2013, 3:17:44 AM3/20/13
to jazdw-s...@googlegroups.com
I speak of the remaining live data parameters (vag measuring block) there are a total of 255. In the new model, it is also up to 255.

I miss the other case number.

Thanks

QVariant kwp2000::decodeBlockData(quint8 id, quint8 a, quint8 b, QString &units)
{
//qDebug() << "ID " << id << QString::number(id, 16) << " A " << a << " B " << b << flush;

unsigned int uint;
double dbl;
QString ret;

switch (id) {
case 0x01:
units = "rpm";
dbl = a*b/5.0;
return dbl;
case 0x04:
if (b > 127) {
units = QString::fromUtf8("\u00B0 ATDC");
}
else {
units = QString::fromUtf8("\u00B0 BTDC");
}
dbl = abs(b-127)*0.01*a;
return dbl;
case 0x07:
units = "km/h";
dbl = 0.01*a*b;
return dbl;
case 0x08:
units = "Binary";
uint = (a << 8 | b);
return uint;
case 0x10:
units = "Binary";
uint = (a << 8 | b);
return uint;
case 0x11:
units = "ASCII";
ret = QChar::fromAscii(a);
ret += QChar::fromAscii(b);
return ret;
case 0x12:
units = "mbar";
dbl = a*b/25.0;
return dbl;
case 0x14:
units = "%";
dbl = a*b/128.0-1;
return dbl;
case 0x15:
units = "V";
dbl = a*b/1000.0;
return dbl;
case 0x16:
units = "ms";
dbl = 0.001*a*b;
return dbl;
case 0x17:
units = "%";
dbl = b*a/256.0;
return dbl;
case 0x1A:
units = QString::fromUtf8("\u00B0 C");
dbl = b-a;
return dbl;
case 0x21:
units = "%";
if (a == 0)
dbl = 100.0*b;
else
dbl = 100.0*b/a;
return dbl;
case 0x22:
units = "kW";
dbl = (b-128)*0.01*a;
return dbl;
case 0x23:
units = "l/h";
dbl = a*b/100.0;
return dbl;
case 0x25:
units = "Binary";
uint = (a << 8 | b);
return uint;
case 0x27:
// fuel
units = "mg/stk";
dbl = a*b/256.0;
return dbl;
case 0x31:
// air
units = "mg/stk";
dbl = a*b/40.0;
return dbl;
case 0x33:
units = QString::fromUtf8("mg/stk \u0394");
dbl = ((b-128)/255.0)*a;
return dbl;
case 0x36:
units = "Count";
dbl = a*256+b;
return dbl;
case 0x37:
units = "s";
dbl = a*b/200.0;
return dbl;
case 0x51:
units = QString::fromUtf8("\u00B0 CF");
dbl = ((a*112000.0) + (b*436.0))/1000.0; // Torsion, check formula
return dbl;
case 0x5E:
units = "Nm";
dbl = a*(b/50.0-1); // Torque, check formula
return dbl;
default:
units = "Raw";
uint = (a << 8 | b);
return uint;

Reply all
Reply to author
Forward
0 new messages