Software On ELM Street - OBD2 Software Development

Programs / Tools / Scripts
User avatar
Jayme
Posts: 2585
Joined: Sun Mar 01, 2009 8:59 am
Location: North Coast, NSW

Re: Software On ELM Street - OBD2 Software Development

Post by Jayme »

yep, you give it as many bytes as you want in the header. AVT data is in hex so you cant read the 1.5 bytes 5E8 together like the elm lol. so if you put 05 E8 08 FE in the header and click align to header, it will sit there and wait (until your timeout value) for that string, and then process the next X bytes, then move on to the next command in your macro, prevents junk on the bus being processed as a packet, so all good.

all you do for tester present is put a send packet in your macro every loop or every 10 loops or whatever, thats no problem either.
User avatar
antus
Site Admin
Posts: 9014
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: Software On ELM Street - OBD2 Software Development

Post by antus »

avt does support periodic messages for exactly this, so you can program it to fire off tester present messages in your connect macro and then forget about it. Although you then have to clean up on disconnect and tell it to stop. So keeping it simple so doing it jaymes way and implementing it in the loop might keep it clearer to the next person reading the adx.
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
User avatar
Tazzi
Posts: 3550
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: Software On ELM Street - OBD2 Software Development

Post by Tazzi »

Jayme wrote:yep, you give it as many bytes as you want in the header. AVT data is in hex so you cant read the 1.5 bytes 5E8 together like the elm lol. so if you put 05 E8 08 FE in the header and click align to header, it will sit there and wait (until your timeout value) for that string, and then process the next X bytes, then move on to the next command in your macro, prevents junk on the bus being processed as a packet, so all good.

all you do for tester present is put a send packet in your macro every loop or every 10 loops or whatever, thats no problem either.
Im looking forward to processing raw bytes.. rather then the nonsense string<->byte conversions constantly! :thumbup:

Something to think about for the DPID setup though, is only a fixed amount of data can be read out between all the dpid's. The "major" important pids should all fit plus a few extras. But to cover the entire PID selection, will probably need multiple ADX's.
antus wrote:avt does support periodic messages for exactly this, so you can program it to fire off tester present messages in your connect macro and then forget about it. Although you then have to clean up on disconnect and tell it to stop. So keeping it simple so doing it jaymes way and implementing it in the loop might keep it clearer to the next person reading the adx.
I read that in the doco sheets last night, handy little function!. But achievable and more manageable controlling it within a loop like you said.
Your Local Aussie Reverse Engineer
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Image
User avatar
Jayme
Posts: 2585
Joined: Sun Mar 01, 2009 8:59 am
Location: North Coast, NSW

Re: Software On ELM Street - OBD2 Software Development

Post by Jayme »

yeah im not too worried about fitting every single thing in. for the VPW DPID adx, I just added in the major PID's for tuning and declared that the adx! the rest can be covered in different ADX if there is need for it maybe? or maybe they can use the ADX for tuning and use your tool for the more deep dive into the rarely used PID's

did you end up finding any way of requesting an enhanced PID directly? as far as I have been able to figure out, you can only request SAE pids individually and enhanced PID's are DPID only? also do the bosch and delphi E38 etc differ in the DPID method? are we going to have to have an alloytec and a v8 ADX separately?
User avatar
Tazzi
Posts: 3550
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: Software On ELM Street - OBD2 Software Development

Post by Tazzi »

Jayme wrote:yeah im not too worried about fitting every single thing in. for the VPW DPID adx, I just added in the major PID's for tuning and declared that the adx! the rest can be covered in different ADX if there is need for it maybe? or maybe they can use the ADX for tuning and use your tool for the more deep dive into the rarely used PID's

did you end up finding any way of requesting an enhanced PID directly? as far as I have been able to figure out, you can only request SAE pids individually and enhanced PID's are DPID only? also do the bosch and delphi E38 etc differ in the DPID method? are we going to have to have an alloytec and a v8 ADX separately?
Your right there, thers only really the "main" PID's people want need to see of want to see. The others are just extras for the curious really!

Nah I didnt find a way of requesting the PID's directly, The only way to request 1 PID was to set 1 pid up in a DPID.. the request the DPID spam request using an 01 instead of 04..

So if I recall correctly.. AA 04 F4 ect Will do a massive spam of all that PID
And.. AA 01 F4 will send the DPID F4 response once and then stop immediately. So each DPID could be separately request this way.

The problem here was the for some reason, it wouldnt let you spam the request really quick the "single" request way. I could only get it to send about 2frames/s.
The normal DPID request using 04 on the VZ V6 ecu (E55), I had it over 150frames/s, and there was still more to capture because the ELM couldn't keep up! :lol:

Gives some razor sharp needle responses thats for sure!
Your Local Aussie Reverse Engineer
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Image
User avatar
Jayme
Posts: 2585
Joined: Sun Mar 01, 2009 8:59 am
Location: North Coast, NSW

Re: Software On ELM Street - OBD2 Software Development

Post by Jayme »

and thats my worry..... the AVT will keep up but tunerpro might not. and if it cant read the data fast enough, then the buffer will fill up in the avt slowly and start missing packets and all sorts of hairy badness.
I hope there is a way to slow down the spamming to a reasonable speed.
User avatar
Tazzi
Posts: 3550
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: Software On ELM Street - OBD2 Software Development

Post by Tazzi »

Jayme wrote:and thats my worry..... the AVT will keep up but tunerpro might not. and if it cant read the data fast enough, then the buffer will fill up in the avt slowly and start missing packets and all sorts of hairy badness.
I hope there is a way to slow down the spamming to a reasonable speed.
The AVT gives a warning when the buffer is full right? As an option, you could periodically turn off the CAN responses so no frames come through, clear the entire buffer, then re-start the CAN responses?
Your Local Aussie Reverse Engineer
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Image
User avatar
antus
Site Admin
Posts: 9014
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: Software On ELM Street - OBD2 Software Development

Post by antus »

It cant if the pc serial buffer is full. You'll get errors from the serial api and data will be missing when you catch up, so just need to discard corrupt packets and keep going. The avt is fast enough for max bus speed - its the pc buffer that'll overflow. You can flush it or not and keep going.
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
User avatar
Tazzi
Posts: 3550
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: Software On ELM Street - OBD2 Software Development

Post by Tazzi »

antus wrote:It cant if the pc serial buffer is full. You'll get errors from the serial api and data will be missing when you catch up, so just need to discard corrupt packets and keep going. The avt is fast enough for max bus speed - its the pc buffer that'll overflow. You can flush it or not and keep going.
Ahh right I see. I guess you cant check how full the buffer is in tunerpro?

I just read out all the data available and chuck it into a ring buffer that a separate thread can process onto the user interface. Id assume tunerpro will probably do everything on the same thread so it might actually fill the buffer up slowly. Id say best bet would be to make it disable the responses, clear out the buffer so its a fresh start then re-enable it, that way you know your not getting mumbo jumbo and should still all be in 'order'

Anyway.. something to tinker with once the AVT rocks up!
Your Local Aussie Reverse Engineer
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Image
User avatar
antus
Site Admin
Posts: 9014
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: Software On ELM Street - OBD2 Software Development

Post by antus »

Tunerpro is multithreaded and it takes as much time to check as it does to get it out in to your own buffer so might as well just hit it but handle failures sainly when winapi sends one back.
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
Post Reply