Pages: 1 2 [3] 4 5
Author Topic: New open source tuning software  (Read 9099 times)
willemml
Full Member
***

Karma: +10/-0
Offline Offline

Posts: 50


« Reply #30 on: March 02, 2025, 06:10:41 AM »

Is it stuck on the first StartDiagnosticSession 0x85 or after the seed has been resolved?

I gets stuck on StartDiagnosticSession, I get a positive response from sending the seed solution. I am wondering if this is maybe because I am starting an 0x89 diagnostic session before I send the seed (so I can use DDLI/WBLI). I'll try your suggestions as well as look into timing. Maybe I will build a sniffer, I have a lot of usb serial cables, and my software should even work with CH340...

If you plan to expand to more ECU in the future, it could be interesting to do a full implementation. Although, I think most, if not all ME7, uses the same one

Ideally this will support as many ECUs as possible. Once I have a fully functional program for my car's 518AK I will start looking into widening compatibility. I am trying to make the code as generic as possible.

While the change you made to the code makes sense, it doesn't actually work. This is because it affects the result of the if statement.

Great work so far, love to see the frequent updates and a Rust project I can keep up with. Very interesting language

Thanks! I'll keep up with the updates, good to know they are appreciated.
Logged
Artemisia
Full Member
***

Karma: +18/-0
Offline Offline

Posts: 83



« Reply #31 on: March 02, 2025, 11:33:45 AM »

I gets stuck on StartDiagnosticSession, I get a positive response from sending the seed solution. I am wondering if this is maybe because I am starting an 0x89 diagnostic session before I send the seed (so I can use DDLI/WBLI). I'll try your suggestions as well as look into timing. Maybe I will build a sniffer, I have a lot of usb serial cables, and my software should even work with CH340...

After the DDLI, you could close the connection, start a new connection into a 0x85 session, solve the seed, start session 0x85. On TP2.0, if I solved the seed on a 0x89 session, I close the communication and restart on 0x85

Ideally this will support as many ECUs as possible. Once I have a fully functional program for my car's 518AK I will start looking into widening compatibility. I am trying to make the code as generic as possible.

While the change you made to the code makes sense, it doesn't actually work. This is because it affects the result of the if statement..

Totally understandable and apologies for the mistake, I feel foolish for thinking the u32 would preserve the carry after the shift Embarrassed
Logged
willemml
Full Member
***

Karma: +10/-0
Offline Offline

Posts: 50


« Reply #32 on: March 02, 2025, 12:14:06 PM »

After the DDLI, you could close the connection, start a new connection into a 0x85 session, solve the seed, start session 0x85. On TP2.0, if I solved the seed on a 0x89 session, I close the communication and restart on 0x85

Have tried that. Re-init works, but I still get the RequestPending (eventually it stops sending that and doesn't send any data at all).
After spending the first half of my morning playing around with that I decided to start writing a much more friendly API for interacting with KWP2000.
It's still a bit messy because I am doing everything in a loop (so order isn't obvious) but that will be fixed soon too.

Totally understandable and apologies for the mistake, I feel foolish for thinking the u32 would preserve the carry after the shift Embarrassed

Haha, to be fair, I did spend a good 15 minutes trying to figure out why your change didn't work  Smiley
Logged
_nameless
Hero Member
*****

Karma: +347/-802
Offline Offline

Posts: 2859



« Reply #33 on: March 02, 2025, 03:44:09 PM »

It may be worth mentioning that some tools have a problem finishing the flashing session on the later me7.5 ecus, its not all that common but I have had it happen to me in the past. The end result is the ecu is stuck in programing mode. Normally doing a read again will close the session properly. There is a patch floating around on the forum that fixes this problem too.
Logged

If you are broke or expecting free handouts DO NOT message me. I'll probably put you on blast if you do.
willemml
Full Member
***

Karma: +10/-0
Offline Offline

Posts: 50


« Reply #34 on: March 03, 2025, 02:18:26 PM »

Good to know, thanks. I should check that I didn't leave it in programming mode after I cancelled a flash read in Nefmoto. Once I got the bench harness working I boot mode flashed a stock file (the one from the 1.8t community thread) and then used the nef flasher to make sure the ECU was responding to kwp2000. I'll try doing a full readback and proper disconnect like this post says.

Reason for re-flash is that I have no idea what the previous tuners (used car, previous owner got a Unitronic tune) did but I know that they disabled reading over KWP2000... Made a backup of the tune for good measure, but my DIY noob tune already seems to be running much smoother than the OTS file (though slightly less peak load, but that seems safer...)  Maybe one day I'll map that bin and compare their changes with mine.
Logged
nyet
Administrator
Hero Member
*****

Karma: +609/-169
Offline Offline

Posts: 12290


WWW
« Reply #35 on: March 03, 2025, 02:35:25 PM »

I can almost guarantee you that

1) anything you DIY is likely better than ANY tuner OTS. period
2) there is nothing you can learn from an OTS tune. don't bother. Do your own thing, you are on the right track.
Logged

ME7.1 tuning guide
ECUx Plot
ME7Sum checksum
Trim heatmap tool

Please do not ask me for tunes. I'm here to help people make their own.

Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your ex
willemml
Full Member
***

Karma: +10/-0
Offline Offline

Posts: 50


« Reply #36 on: March 03, 2025, 03:30:08 PM »

I don't doubt #1, given I am actually using logs of my own car. I am curious as to why the OTS tune idles rough (had no idea it was bad until I flashed a stock file, never been in a 1.8T other than my own) and partial throttle is so jerky. I can guess knowing what I do now, but it would still be nice to see what it actually is. Anyways, not going to bother doing that unless I truly get bored, which will be a long ways out given the two software projects I've got going on now.
Logged
nyet
Administrator
Hero Member
*****

Karma: +609/-169
Offline Offline

Posts: 12290


WWW
« Reply #37 on: March 03, 2025, 03:50:43 PM »

I don't doubt #1, given I am actually using logs of my own car. I am curious as to why the OTS tune idles rough (had no idea it was bad until I flashed a stock file, never been in a 1.8T other than my own) and partial throttle is so jerky. I can guess knowing what I do now, but it would still be nice to see what it actually is. Anyways, not going to bother doing that unless I truly get bored, which will be a long ways out given the two software projects I've got going on now.

Makes sense. Just remember this: just about everything "professional" large scale tuners do is a hackjob, because they're trying to cover a ton of different ECUs from multiple platforms all at once.

What does this mean? Generally, anything that you find in an OTS, learn from in the sense of "don't do this" Smiley

I learned the hard way, by assuming stuff that didn't make sense to me somehow made sense to a "professional". This is rarely the case, in reality.
Logged

ME7.1 tuning guide
ECUx Plot
ME7Sum checksum
Trim heatmap tool

Please do not ask me for tunes. I'm here to help people make their own.

Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your ex
willemml
Full Member
***

Karma: +10/-0
Offline Offline

Posts: 50


« Reply #38 on: March 03, 2025, 05:58:33 PM »

It may be worth mentioning that some tools have a problem finishing the flashing session on the later me7.5 ecus, its not all that common but I have had it happen to me in the past. The end result is the ecu is stuck in programing mode. Normally doing a read again will close the session properly. There is a patch floating around on the forum that fixes this problem too.

Well you were right. Even the nefmoto flasher fails to connect with a programming session, exact same issue (tries, then times out). I'm a little pissed at myself for not trying this sooner, that's a lot of wasted debug hours. Oh well, so it goes with projects like this.

Edit: not actually sure what nameless mentioned is the exact issue anymore, but the nefmoto flasher does have the same issue as me.
Edit 2: seems the nef flasher successfully gets security access sometimes, but then when it tries to do a read the ECU reports that it doesn't have security access. I wonder if these issues are because of my DDLI security timeout hack.

Makes sense. Just remember this: just about everything "professional" large scale tuners do is a hackjob, because they're trying to cover a ton of different ECUs from multiple platforms all at once.

What does this mean? Generally, anything that you find in an OTS, learn from in the sense of "don't do this" Smiley

I learned the hard way, by assuming stuff that didn't make sense to me somehow made sense to a "professional". This is rarely the case, in reality.

That's really good to know before jumping in, thank you Smiley
I do forget sometimes that professional just means paid, not better.
« Last Edit: March 03, 2025, 06:25:45 PM by willemml » Logged
Artemisia
Full Member
***

Karma: +18/-0
Offline Offline

Posts: 83



« Reply #39 on: March 03, 2025, 06:46:11 PM »

Well you were right. Even the nefmoto flasher fails to connect with a programming session, exact same issue (tries, then times out). I'm a little pissed at myself for not trying this sooner, that's a lot of wasted debug hours. Oh well, so it goes with projects like this.

Edit: not actually sure what nameless mentioned is the exact issue anymore, but the nefmoto flasher does have the same issue as me.
Edit 2: seems the nef flasher successfully gets security access sometimes, but then when it tries to do a read the ECU reports that it doesn't have security access. I wonder if these issues are because of my DDLI security timeout hack.

That's really good to know before jumping in, thank you Smiley
I do forget sometimes that professional just means paid, not better.

I believe this is what nameless is referencing to:
http://nefariousmotorsports.com/forum/index.php?topic=6719.0

I don't think this would be your issue. From experience, it would only prevent an engine start, but not getting into 0x85. Do you have 12v on pin 121? Some 1.8T ECUs needs 12v on pin 121 for flash programming
« Last Edit: March 03, 2025, 06:48:09 PM by Artemisia » Logged
willemml
Full Member
***

Karma: +10/-0
Offline Offline

Posts: 50


« Reply #40 on: March 03, 2025, 06:51:07 PM »

That was the solution (which I eventually figured out when I saw only half my bench harness was plugged in).  I am now in diagnostics mode. I actually had to do a bootmode flash as well, and nefmoto still doesnt work. But at least my kwp2000 works!
Logged
Artemisia
Full Member
***

Karma: +18/-0
Offline Offline

Posts: 83



« Reply #41 on: March 03, 2025, 07:44:52 PM »

That was the solution (which I eventually figured out when I saw only half my bench harness was plugged in).  I am now in diagnostics mode. I actually had to do a bootmode flash as well, and nefmoto still doesnt work. But at least my kwp2000 works!

Great to hear! Things should go very quick from there, TransferData and the compression will likely be the worst part
Logged
willemml
Full Member
***

Karma: +10/-0
Offline Offline

Posts: 50


« Reply #42 on: March 04, 2025, 12:23:28 AM »

Wanted to get my API looking nice before I started to work on the programming functions. Now everything is abstracted away to simple function calls instead of a messy loop. This API will undergo a lot of changes later on, but the way it is now makes it easy to do quick development.
Logged
willemml
Full Member
***

Karma: +10/-0
Offline Offline

Posts: 50


« Reply #43 on: March 07, 2025, 01:17:54 PM »

Fixed 3D graphing in the tuning software.

I've been messing with the TransferData service to try and read flash, so far I think I am running into issues with my failed attempts locking me out. Need to make the testing process faster/easier.
Logged
willemml
Full Member
***

Karma: +10/-0
Offline Offline

Posts: 50


« Reply #44 on: March 07, 2025, 04:20:18 PM »

Rudimentary flash reading in programming mode works now.
Logged
Pages: 1 2 [3] 4 5
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 2.801 seconds with 16 queries. (Pretty URLs adds 0.0010000000000003s, 0q)