Title: VW TP2.0 (CAN) + KWP2000 Post by: seishuku on October 23, 2015, 07:06:52 PM I'm trying to make my aux gauge display a little more flexible, which means going a little deeper with diagnostic modes to get more detailed data.
I can poll OBD2 data no problem, ISOTP works just fine... But when I open a channel and try to poll KWP2k data, I can get the first data set fine, but the ECU is tossing extra CAN frames and then disconnect me: Code: 200h 7 01h C0h 00h 10h 00h 03h 01h // Request channel setup (module 01h, RX CAN ID 300h) I'm sending data exactly how the docs say, it's also identical to how VCDS is doing it. I just don't get why I get a proper data block, then some junk and then disconnected. I get this on both my Teensy 3.1 and STM32F429 discovery boards, so I'm pretty sure it's nothing hardware or a CAN driver issue. Any ideas? Title: Re: VW TP2.0 (CAN) + KWP2000 Post by: Basano on October 24, 2015, 12:33:56 AM Hi,
Your last ack should be B5h, not B2h :) Example below. I assume you have the attached spec already, but it may help others as well. Code: 19 200 7 1 C0 0 10 0 3 1 Title: Re: VW TP2.0 (CAN) + KWP2000 Post by: seishuku on October 24, 2015, 06:37:34 AM So I'm supposed to count both my sequence AND the incoming?
I guess that would explain a lot... I'll have to try that. Thanks! Title: Re: VW TP2.0 (CAN) + KWP2000 Post by: seishuku on October 25, 2015, 04:48:22 PM Well, not quite counting incoming and outgoing sequences, more like the tester ack after the last data packet must follow the last sequence (eg. 0x13 last packet, 0xb4 ack).
The opposite is also true, tester outgoing data with 0x18 would get an ack of 0xb9. It kinda makes sense to me now, but more importantly, I can stream in data now, continuously and without error. https://www.youtube.com/watch?v=ltJswTSfDXM https://www.youtube.com/watch?v=5rVMd0zYlgU Title: Re: VW TP2.0 (CAN) + KWP2000 Post by: seishuku on October 31, 2015, 04:38:17 PM The end results:
https://www.youtube.com/watch?v=Mi4X8Rdz4GE and source code, if anyone is interested: https://github.com/seishuku/teensycanbusdisplay Not really very different than my other setup with OBD2 PIDs, but with access to WAY more information. Need to implement dynamicallyDefineLocalIdentifier, should help with display update rates (even though it's not too bad). Title: Re: VW TP2.0 (CAN) + KWP2000 Post by: dream3R on December 06, 2015, 08:57:08 PM Hi, Your last ack should be B5h, not B2h :) Example below. I assume you have the attached spec already, but it may help others as well. Code: 19 200 7 1 C0 0 10 0 3 1 Thank you squire Title: Re: VW TP2.0 (CAN) + KWP2000 Post by: dream3R on December 06, 2015, 08:59:07 PM The end results: https://www.youtube.com/watch?v=Mi4X8Rdz4GE and source code, if anyone is interested: https://github.com/seishuku/teensycanbusdisplay Not really very different than my other setup with OBD2 PIDs, but with access to WAY more information. Need to implement dynamicallyDefineLocalIdentifier, should help with display update rates (even though it's not too bad). Which ECU/SW? I might be able to help there. Title: Re: VW TP2.0 (CAN) + KWP2000 Post by: seishuku on December 08, 2015, 11:14:49 AM Which ECU/SW? I might be able to help there. Address 01: Engine (CJA) Labels: 03L-906-022-CBE.clbPart No SW: 03L 906 019 HE HW: 03L 907 309 AA Component: R4 2,0L EDC G000SG 4606 Revision: 12H14--- Serial number: Coding: 0050072 Shop #: WSC 00066 000 00000 VCID: 75EAF8541C686D894D9-8020 I think I have most of it figured out, just haven't had the time to play with it yet. Any help would be appreciated though. Title: Re: VW TP2.0 (CAN) + KWP2000 Post by: dream3R on December 08, 2015, 02:50:12 PM Address 01: Engine (CJA) Labels: 03L-906-022-CBE.clb Part No SW: 03L 906 019 HE HW: 03L 907 309 AA Component: R4 2,0L EDC G000SG 4606 Revision: 12H14--- Serial number: Coding: 0050072 Shop #: WSC 00066 000 00000 VCID: 75EAF8541C686D894D9-8020 I think I have most of it figured out, just haven't had the time to play with it yet. Any help would be appreciated though. You have the identifiers? If not what are you after and I'll get them :) edit Crap it's a VW I only got Audi stuff lol Title: Re: VW TP2.0 (CAN) + KWP2000 Post by: seishuku on December 08, 2015, 05:09:28 PM Oh, yeah, I have most localIDs for what I need for my specific engine, at least for what info I find useful.
Most data is pretty easy to figure out (especially when I can log CAN data from VCDS). ;D Title: Re: VW TP2.0 (CAN) + KWP2000 Post by: dream3R on December 09, 2015, 03:48:00 AM Oh, yeah, I have most localIDs for what I need for my specific engine, at least for what info I find useful. Most data is pretty easy to figure out (especially when I can log CAN data from VCDS). ;D LOL that's one way. There's generally a lot of stuff in the DB than VCDS uses fwiw. Title: Re: VW TP2.0 (CAN) + KWP2000 Post by: Cadensdad14 on November 27, 2020, 05:01:55 PM So I know im resurrecting a dead thread but im hoping someone can shed some light on this. Code calls the function:
Status+=CAN_VWKWP_GetValue(0x0B, 2, &Boost); Which goes to: int CAN_VWKWP_GetValue(uint8_t LocalID, uint8_t Index, float *Value) I understand this is the readDataByLocalIdentifier with the 0x21 SID and described as: The metric value of the data record defined by the local identifier $F0 is set by the DynamicalDefineLocalIdentifier service. The ReadDatabyLocalIdentifier service can also read other data records set in the ECU's internal table. Each local identifier has its own specific table that contains a description of the data to be transferred. So what I dont understand is where were getting the Local ID and Index values. Are these similar to the PID tables? Also, would it be possible to use SID 0x23 for readMemoryByAddress along with the 0x38xxxx address to get really specific information? Eventually I would also like to be able to add the SID 0x3D to be able to write RAM values. But first, please help me know where the LocalID and Index values come from |