Discussion:
Automotive Diagnostic Command Set & kwp2000 Read/Write Memory By Address
(too old to reply)
left
2007-09-10 03:40:06 UTC
Permalink
I used NI Automotive Diagnostic Command Set 1.0 Read/Write EEPEOM By Address of ECU base VW TP2.0  KWP2000 diagnostic protocol . I used NI example ReadWrite Memory.vi but not successful. I know must use below step. 
Description

The usual procedure for getting a security access to the ECU is as follows:

- Request a seed from the ECU using RequestSeed.vi with access mode = n .
- From the seed, compute a key for the ECU on the host.
- Send the key to the ECU using <a href="mk:@MSITStore:C:\Program%20Files\National%20Instruments\Automotive%20Diagnostic%20Command%20Set\Documentation\niadcs.chm::/SendKeyVI.html" target="_blank">SendKey.vi</a> with access mode = n + 1.
- The security access is granted if the ECU validates the key sent. Otherwise, an error is returned.

Who has used NI Automotive Diagnostic Command Set 1.0 and know VW TP2.0 KWP2000 protocol. Please support some suggest and example VI.
Thanks
Ceule
2007-09-10 13:40:10 UTC
Permalink
If you have trouble using the Read/WriteMemoryByAddress service, you can easily create a copy of the service VI and modify it according to your needs.... unfortunately, the KWP2000 protocol has several variants for specific services, which differ by the parameters they send to/receive from the ECU.
&nbsp;
Christian
left
2007-09-10 15:10:17 UTC
Permalink
&nbsp;
&nbsp;
I modify NI example Read/Write Memory lool at attached files.
Now I know how to&nbsp;calculate&nbsp;the key and successful.But sometimes ok and sometimes no ok. The best luck is pass three error.
&nbsp;
&nbsp;


pho0.JPG:
Loading Image...


ReadWrite ECU.vi:
http://forums.ni.com/attachments/ni/30/2824/2/ReadWrite ECU.vi


seedaddkey.vi:
http://forums.ni.com/attachments/ni/30/2824/3/seedaddkey.vi
Ceule
2007-09-10 13:40:09 UTC
Permalink
The example code for using the RequestSeed/SendKey services looks like in the appended VIs. Note that the security access feature requires a component of your code to calculate the key from the seed that the ECU provided in the RequestSeed service. If you have a e.g. a SeedKey.dll from your ECU vendor, you might want to call that in the CalcKey VI.
&nbsp;


Security Access.vi:
http://forums.ni.com/attachments/ni/30/2822/1/Security Access.vi


CalcKey.vi:
http://forums.ni.com/attachments/ni/30/2822/2/CalcKey.vi
left
2007-09-10 15:10:17 UTC
Permalink
Thanks for Ceule&nbsp; example vi.
&nbsp;
Left


pho11.JPG:
Loading Image...


pho0.JPG:
Loading Image...
left
2007-09-10 13:40:09 UTC
Permalink
Hi Adnan,
&nbsp;
Thank you for reply!
&nbsp;
Ni toolkit doesn't provide include send key example vi.&nbsp; And read/write by address.vi&nbsp; is not correct with KWP2000 protocol.
&nbsp;
Do you know or have KWP2000 protocol document? I have it but write by German,so I can't&nbsp; understand it correctly .
&nbsp;
Left
left
2007-09-11 00:40:05 UTC
Permalink
Hi Ceule,
I also consider need connection test. And&nbsp; I studied and used ni example diagnostic command.vi, but if first connection is no pass how to continue connection.
Now the question is how to solve first connection no good, and I think it run quickly and no need a second before my attached VI.
Left_zuo


Diagnostic Commander.vi:
http://forums.ni.com/attachments/ni/30/2827/1/Diagnostic Commander.vi
Ceule
2007-09-11 06:40:09 UTC
Permalink
Maybe you should try calling Connection Test right after VWTP Connect.vi. Maybe the ECU expects that. I do not know for sure, but if you see a connection timeout very soon, it is worth trying.
&nbsp;
Christian

Loading...