RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Tue May 21, 2013 4:37 am

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Subaru ROM patching for logging.
PostPosted: Tue Feb 21, 2012 10:28 pm 
Offline
Newbie

Joined: Mon Feb 11, 2008 12:31 am
Posts: 15
Some time ago Colby over on openecu.org opened a thread with the same title as this one. http://forums.openecu.org/viewtopic.php?f=57&t=4405

Fair warning this thread doesn't relate directly to romraider. What this thread is about is standalone logging. Specifically enabling the logging of ram parameters via canbus. Can logging without Colby's patch logs at 50hz. Thats 50 rows per second. I have never thrown enough parameters at it to slow it down. The one caveat is that logging ram parameters is not supported.

In the above mentioned thread Colby found a way to enable the logging of ram parameters with canbus. Specifically he mentioned creating a patch for his 08 STi. Colby then released the patch within one of the ecuflash releases.

Since the patch is not available for my rom (08 Legacy GT) I got curious. I found an 08 STi rom and loaded it up in ecuedit. Sure enough the patch was in the list. It is a simple check box to enable the patch. However saving the rom after checking the box did not include the patch in the rom file (same md5sum as original rom sneaky sneaky).

I inspected the ecuedit program files and did not find anything that looked like a patch file. At some point I believe I read a post from Colby saying the patches were compiled into the ecuflash binary. I have yet to try spelunking inside the ecuflash binary but I digress.

Obviously Mr. Boles doesn't want to make this easy to reverse...

It might not be easy to reverse anyhow. Colby did mention the work he had done involved refactoring the logging code in his 08 STi rom to make room for his patch. Separating the refactored code from the additional code could prove interesting too.

He also added that the patch was applied in such a way that it would attempt a pattern match on your rom for the old logger function. That way it would only be available for your rom if it was compatible, but it was not rom specific. Unfortunately it seems my 08 Legacy uses a different logger function.

So with all of that said

Has anyone here enabled this feature on their ecu?
Have you analyzed the rom changes?

I would really like to see if the work Colby did can be ported to other cars.


Top
 Profile  
 
 Post subject: Re: Subaru ROM patching for logging.
PostPosted: Wed Feb 22, 2012 1:53 pm 
Offline
Experienced
User avatar

Joined: Thu Jul 23, 2009 1:46 pm
Posts: 478
Location: Pennsyltucky
Isn't this obsolete with RomRaider's new fast polling?

I'd imagine it's easy to reverse but I've never looked at it. Patch a 08STi rom, run a hex comparison against the original to find the patch, open it in IDA and see what's going on.

_________________
RomRaider IRC Chat: http://webchat.freenode.net/?channels=romraider
Subaru Alpha Definition Git Repo & Instructions: viewtopic.php?f=34&t=8635&p=82450#p82450


Top
 Profile  
 
 Post subject: Re: Subaru ROM patching for logging.
PostPosted: Wed Feb 22, 2012 2:38 pm 
Offline
Newbie

Joined: Mon Feb 11, 2008 12:31 am
Posts: 15
I wouldn't say fast poll makes this obsolete. Fast poll is still slower than what the openport is capable of standalone using canbus. Still, even without the speed difference it is nice to not have to use a laptop for some long term logging tasks.

I will try again to see if I can get the patch written to a romfile, but when I tried that in the past (without an ecu to flash and reread) simply enabling the patch, and saving the rom again did not seem to change the file. A second look won't hurt so I will do that.

I am really just curious if anyone has ever isolated the changes before.

Thank you for your time responding.


Top
 Profile  
 
 Post subject: Re: Subaru ROM patching for logging.
PostPosted: Wed Feb 22, 2012 5:48 pm 
Offline
Experienced
User avatar

Joined: Thu Jul 23, 2009 1:46 pm
Posts: 478
Location: Pennsyltucky
No problem. If I have some free time tonight I will try to isolate the code and check it out.

I talked to Colby today and he said he is going to check out the continuous push 'fast polling' mode as another option for faster logging.. IMO it's the way to go as it works on all models with a very easy firmware update on the OP2.0. Granted it's no CAN/patch speed, but it's still WAY better than standard logging and could be implemented in a matter of days.

_________________
RomRaider IRC Chat: http://webchat.freenode.net/?channels=romraider
Subaru Alpha Definition Git Repo & Instructions: viewtopic.php?f=34&t=8635&p=82450#p82450


Top
 Profile  
 
 Post subject: Re: Subaru ROM patching for logging.
PostPosted: Wed Feb 22, 2012 6:26 pm 
Offline
Newbie

Joined: Mon Feb 11, 2008 12:31 am
Posts: 15
That's certainly fair. I don't know that it is strictly necessary to see the kind of logging speeds that can provides. Fast poll has worked out very well. I just know that k-line doesn't cut it speed wise for the number of parameters I like to log. And since k-line is the only way to get ram parameters logged to SD at the moment I usually turn to romraider when I need to log ram parameters.

I am happy to spend time learning more about these ecus, and I have been digging through mine with IDA, but I tend to believe looking at what Colby had done would give a huge head start.

And of course if a solution can be presented that prevents the need to patch roms, I would agree that is preferable.


Top
 Profile  
 
 Post subject: Re: Subaru ROM patching for logging.
PostPosted: Wed Feb 22, 2012 7:15 pm 
Offline
Newbie

Joined: Thu Mar 23, 2006 5:17 am
Posts: 8
Location: Seattle, WA
Can you point me to the where this fast polling mode is detailed? Is this simply the shift to 10400 baud or something else? I tried the shift to higher baud rates years ago with my 2002 WRX and the issue is that you quickly reach a point where the ECU just doesn't have time to service the requests. You don't notice that at 4800 baud because you cant ask for things fast enough.

Merp wrote:
No problem. If I have some free time tonight I will try to isolate the code and check it out.

I talked to Colby today and he said he is going to check out the continuous push 'fast polling' mode as another option for faster logging.. IMO it's the way to go as it works on all models with a very easy firmware update on the OP2.0. Granted it's no CAN/patch speed, but it's still WAY better than standard logging and could be implemented in a matter of days.


Top
 Profile  
 
 Post subject: Re: Subaru ROM patching for logging.
PostPosted: Wed Feb 22, 2012 7:17 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 3662
Location: Canada eh!
Merp wrote:
I talked to Colby today and he said he is going to check out the continuous push 'fast polling' mode as another option for faster logging...
Unless there's some limitation I don't see why this mode would not work via CAN too. Continues data once you've set the parameters you want.


Top
 Profile  
 
 Post subject: Re: Subaru ROM patching for logging.
PostPosted: Wed Feb 22, 2012 7:26 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 3662
Location: Canada eh!
I implemented it in RR Logger last June. In the SSM read request set the mode byte to '1' rather than '0'. The mode byte would be the byte after the command byte 'A8' in the request.
Send the request one time and then just listen to the K-line for data from the ECU. Data flow will continue until the ECU is interrupted. I use a "break" signal to stop the ECU before switching to a new query set or when shutting down the Logger (or the ECU will send till it is powered off).

cboles wrote:
Can you point me to the where this fast polling mode is detailed? Is this simply the shift to 10400 baud or something else? I tried the shift to higher baud rates years ago with my 2002 WRX and the issue is that you quickly reach a point where the ECU just doesn't have time to service the requests. You don't notice that at 4800 baud because you cant ask for things fast enough.

Merp wrote:
No problem. If I have some free time tonight I will try to isolate the code and check it out.

I talked to Colby today and he said he is going to check out the continuous push 'fast polling' mode as another option for faster logging.. IMO it's the way to go as it works on all models with a very easy firmware update on the OP2.0. Granted it's no CAN/patch speed, but it's still WAY better than standard logging and could be implemented in a matter of days.


Top
 Profile  
 
 Post subject: Re: Subaru ROM patching for logging.
PostPosted: Wed Feb 22, 2012 8:51 pm 
Offline
Newbie

Joined: Mon Feb 11, 2008 12:31 am
Posts: 15
First off, thank you all for taking some time to discuss this.

Secondly, I honestly don't know how I screwed it up last time I looked. But the patch most certainly does get applied to a saved rom file after it is enabled. I must have screwed that up a while ago. My apologies for making a false claim.

For grins I will probably look at what you did to the 08 STi rom Colby. But I assume you would prefer to make a change to the openport rather than have people hound you to patch hundreds of different roms. Seems like the path of least resistance to me. But I am not doing any of the work so it's easy to say things like that.


Top
 Profile  
 
 Post subject: Re: Subaru ROM patching for logging.
PostPosted: Thu Feb 23, 2012 10:13 pm 
Offline
Newbie

Joined: Mon Apr 11, 2011 9:26 pm
Posts: 7
If you're curious about what a CAN implementation might look like, you might want to check out a Mazda rom. The RX-8 ecu, at least, is very similar to some of the Subarus I've looked at, same OS, etc, but Mazda jumped on the canbus/ISO14229 bandwagon earlier to stay on Fords diagnostic platform.

So, there are lots of interesting services:
Code:
[size=85]ROM:0005D3BC               canUDSmodes <0x28, 0, 0, 0, communicationControl, 0, 0, 0, 1>
ROM:0005D3C8               canUDSmodes <0x85, 0, 0, 0, controlDTCsetting, 0, 0, 0, 1>
ROM:0005D3D4               canUDSmodes <0x10, 0, 0, 0, startDiagnosticSession, 0x10, 0, 0, 0xF> ! start diagnostic session
ROM:0005D3E0               canUDSmodes <0x27, 0, 0, 0, securityAccess, 0x10, 0, 0, 0xE>
ROM:0005D3EC               canUDSmodes <0x3E, 0, 0, 0, testerPresent, 0x10, 0, 0, 0xF>
ROM:0005D3F8               canUDSmodes <0x11, 0, 0, 0, ecuReset, 0, 0, 0, 0xE>
ROM:0005D404               canUDSmodes <0x21, 0, 0, 0, readDataByLocalID, 0x10, 0, 0, 0xF>
ROM:0005D410               canUDSmodes <0x22, 0, 0, 0, readDataByCommonID, 0x10, 0, 0, 0xF>
ROM:0005D41C               canUDSmodes <0x23, 0, 0, 0, readMemoryByAddress, 0, 0, 0, 6>
ROM:0005D428               canUDSmodes <0x3B, 0, 0, 0, writeDataByLocalID, 0, 0, 0, 0xE>
ROM:0005D434               canUDSmodes <0x18, 0, 0, 0, readDTCbyStatus, 0, 0, 0, 5>
ROM:0005D440               canUDSmodes <0x12, 0, 0, 0, readFreezeFrameData, 0, 0, 0, 1>
ROM:0005D44C               canUDSmodes <0x14, 0, 0, 0, clearDiagnosticInformation, 0x10, 0, 0, 5>
ROM:0005D458               canUDSmodes <0x2F, 0, 0, 0, inputOutputControlByCommonID, 0x10, 0, 0, 4>
ROM:0005D464               canUDSmodes <0x31, 0, 0, 0, startRoutineByLocalIdentifier, 0, 0, 0, 5>
ROM:0005D470               canUDSmodes <0x32, 0, 0, 0, stopRoutineByLocalIdentifier, 0, 0, 0, 5>
ROM:0005D47C               canUDSmodes <0x33, 0, 0, 0, requestRoutineResultsByLocalID, 0, 0, 0, 5>
ROM:0005D488               canUDSmodes <0x34, 0, 0, 0, requestDownload, 0, 0, 0, 6>
ROM:0005D494               canUDSmodes <0x36, 0, 0, 0, transferData, 0, 0, 0, 6>
ROM:0005D4A0               canUDSmodes <0x37, 0, 0, 0, requestTransferExit, 0, 0, 0, 6>
ROM:0005D4AC               canUDSmodes <0xB1, 0, 0, 0, diagnosticCommand, 0, 0, 0, 0xF>
ROM:0005D4B8               canUDSmodes <0xFF, 0, 0, 0, disabledTestStub, 0, 0, 0, 0>[/size]


Unfortunately, read by address requires going through security access. I don't have that figured out, so I have no idea how well it performs.


Top
 Profile  
 
 Post subject: Re: Subaru ROM patching for logging.
PostPosted: Sat Feb 25, 2012 3:42 pm 
Offline
Experienced
User avatar

Joined: Wed Nov 10, 2010 7:56 am
Posts: 211
lordeldor wrote:
Has anyone here enabled this feature on their ecu?
Have you analyzed the rom changes?


Subaru Diesel Crew did it with their patch V2 for the Diesel:

http://subdiesel.wordpress.com/2011/08/ ... -patch-v2/

But AFAIK noone every got this patch (see commants)

One other point:
AFAIR after patching RAM-parameter will be loggable via SSMviaCAN.
This is ISO15765 protocoll witch isn´t supported by RomRaider Logger jet.

Do RomRaider work on this allready ?
Or with way to you want to log CAN data ? Stande-alone Logger ?

The EURO5 Diesel chance protocoll for SSM-Logging to CAN, so this will be one of the sources how to chance

BR

_________________
performence based on engineering..


Top
 Profile  
 
 Post subject: Re: Subaru ROM patching for logging.
PostPosted: Mon Feb 27, 2012 11:56 pm 
Offline
Newbie

Joined: Mon Feb 11, 2008 12:31 am
Posts: 15
Jochen_145 wrote:
Subaru Diesel Crew did it with their patch V2 for the Diesel:

http://subdiesel.wordpress.com/2011/08/ ... -patch-v2/

But AFAIK noone every got this patch (see commants)

That's interesting.
Quote:
One other point:
AFAIR after patching RAM-parameter will be loggable via SSMviaCAN.
This is ISO15765 protocoll witch isn´t supported by RomRaider Logger jet.

Do RomRaider work on this allready ?
Or with way to you want to log CAN data ? Stande-alone Logger ?

The EURO5 Diesel chance protocoll for SSM-Logging to CAN, so this will be one of the sources how to chance

BR

No the thread is not about RomRaider. I intended on researching this change for an improvement in standalone logging capability with the openport 2. This ecu analysis forum seems to be the most organized and active.

I do think that implementing faster kline logging on the device would have the widest reaching effect. That is probably the much more worthwhile pursuit.


Top
 Profile  
 
 Post subject: Re: Subaru ROM patching for logging.
PostPosted: Wed Feb 29, 2012 11:29 am 
Offline
Experienced
User avatar

Joined: Wed Nov 10, 2010 7:56 am
Posts: 211
lordeldor wrote:
I intended on researching this change for an improvement in standalone logging capability with the openport 2.


Good to know, that someone still working on the stand-alone logger.
I myself sometimes also use that one too, but at the end RomRaider is still better solution, if you have a k-line based car.
But for EURO5 Diesel, k-line is no longer availible, so yet, stand-alone logger is the only chance to log them :-(

Logging with stand-alone logger via CAN gives you a lot date, with only a few sampling-rates. So you´ve a lot constat values..

Same as for RomRaider, stand-alone logger needs IMO a reducing of logging rate..

Quote:
This ecu analysis forum seems to be the most organized and active.

I think it is the last active one, where there is still a devellopment going on.

openecu.org devellopment is dead.
Subaru Diesel Crew, FreeSSM etc also...

_________________
performence based on engineering..


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subsilver by phpBBservice.nl