RomRaider Logo

RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Tue Dec 23, 2025 7:09 pm

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 43 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Read/Write a CAN enabled ECU with RomRaider
PostPosted: Wed Nov 17, 2021 9:29 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7314
Location: Canada eh!
Hidden away in the RomRaider Logger is a module that will read and write (program) a CAN enable ECU ROM memory image in binary format.
This only works with a J2534 interface cable (such as the Tactrix openport 2.0).

These commands are best issued from a command prompt window.

To check comms with the ECU:
- Open a command prompt window
- Change to the directory where RomRaider is installed (by default: C:\Program Files (x86)\RomRaider\)
- Issue this command (assumes Java is on the path):
Code:
java -Djava.library.path=lib/windows -cp RomRaider.jar com.romraider.io.j2534.api.TestJ2534NCS <J2534_library>
where:
<J2534_library> is the library name for your J2534 cable, for example: op20pt32 or MONGI432 or /usr/local/lib/j2534.so
It will report back some ECU info and try a few different UDS modes to see what replies and what does not.

To Read the ECU:
- Open a command prompt window
- Change to the directory where RomRaider is installed (by default: C:\Program Files (x86)\RomRaider\)
- Issue this command (assumes Java is on the path):
Code:
java -Djava.library.path=lib/windows -cp RomRaider.jar com.romraider.io.j2534.api.TestJ2534NCS <J2534_library> r <start_address> <length>
where:
<J2534_library> is the library name for your J2534 cable, for example: op20pt32 or MONGI432 or /usr/local/lib/j2534.so
<start_address> is the memory address (in hex or decimal) to start reading from, use 0 to start at the beginning
<length> is the length (in hex or decimal) of memory to read 524288 for a 512kB ROM, 1048576 for a 1024kB ROM, etc.
If you use hex values they must start with 0x
When the read is complete a file with the name of the <ecuid>_read.bin will be saved to your Windows %HOME% directory

To Write to the ECU:
Make sure the car's battery is fully charged or you have a battery charger connected and running, you've been warned!
There is a Test mode that tries all the commands except the erase and write portions, I suggest you use it.
To Test:
Code:
java -Djava.library.path=lib/windows -cp RomRaider.jar com.romraider.io.j2534.api.TestJ2534NCS <J2534_library> t <path/filename>
where:
<path/filename> is the full path to the binary file to test write, use quotes around it if it has spaces in the path or name.

To write, after a successful test:
Code:
java -Djava.library.path=lib/windows -cp RomRaider.jar com.romraider.io.j2534.api.TestJ2534NCS <J2534_library> P <path/filename>
where:
<path/filename> is the full path to the binary file to test write, use quotes around it if it has spaces in the path or name.

A sample batch file is below, which you can save into your RomRaider installation directory and then edit as you desire. The default is set to read a 1MB ROM from the ECU.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject: Re: Read/Write a CAN enabled ECU with RomRaider
PostPosted: Thu Nov 18, 2021 7:04 pm 
Offline
Experienced

Joined: Thu Apr 14, 2011 8:16 am
Posts: 425
Wow this is huge! If I come across a CAN only vehicle in the future, I'll be very eager to give this a try. Thanks!

Do you know if it works on the really new SH72533 ECUs?


Top
 Profile  
 
 Post subject: Re: Read/Write a CAN enabled ECU with RomRaider
PostPosted: Fri Nov 19, 2021 6:30 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7314
Location: Canada eh!
I've only tested on my bench ECU, SH7058. It does support memory sizes up to 2MB.


Top
 Profile  
 
 Post subject: Re: Read/Write a CAN enabled ECU with RomRaider
PostPosted: Sun Nov 28, 2021 10:06 am 
Offline
RomRaider Donator
User avatar

Joined: Fri Jul 26, 2019 3:35 am
Posts: 789
Location: United States of America
This is amazing to see! Great job! :D I've been bummed about the fact that we couldn't touch any major Nissan/Infiniti after ~2006, so it's awesome to see that the barrier has been lifted! One thing I'd like to add, could a future release support customizable CAN ID's? So instead of only being able to dump/flash the ECU through CAN ID 0x7E0, we'd be able to at least ATTEMPT to dump/flash any of the available modules. While not all will support it, it would be nice to have the ability to test each one out.

Just in case you don't have a full list already, the screenshot provided is from Nissan Datascan 3, showing the CAN ID's and tester ID's for just about all possible control modules.


You do not have the required permissions to view the files attached to this post.

_________________
NissanDefinitions Repository


Top
 Profile  
 
 Post subject: Re: Read/Write a CAN enabled ECU with RomRaider
PostPosted: Wed Dec 08, 2021 7:42 am 
Offline
Experienced
User avatar

Joined: Sun Aug 18, 2019 8:10 am
Posts: 278
Location: Russia, Ulan-Ude (Near Lake Baikal)
Tested it with 22611AG572 on a bench, from JDM Forester Cross Sport, SH7055. Can be read and written with other tool via CAN, using Denso CAN bootloader.
Can't get any answer with RomRaider, read and write commands ((

_________________
Subaru Outback BR9 EDM 2010 EJ253 CVT... Subaru Impreza GG2 JDM 2001 EJ152 AT...
Some Hitachi ROM's modifications...


Top
 Profile  
 
 Post subject: Re: Read/Write a CAN enabled ECU with RomRaider
PostPosted: Wed Dec 08, 2021 9:34 am 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7314
Location: Canada eh!
Care to share the log?


Top
 Profile  
 
 Post subject: Re: Read/Write a CAN enabled ECU with RomRaider
PostPosted: Wed Dec 08, 2021 11:05 am 
Offline
Experienced
User avatar

Joined: Sun Aug 18, 2019 8:10 am
Posts: 278
Location: Russia, Ulan-Ude (Near Lake Baikal)
No problem, will do it tomorrow. Almost night here.
Any verbose options for log?

_________________
Subaru Outback BR9 EDM 2010 EJ253 CVT... Subaru Impreza GG2 JDM 2001 EJ152 AT...
Some Hitachi ROM's modifications...


Top
 Profile  
 
 Post subject: Re: Read/Write a CAN enabled ECU with RomRaider
PostPosted: Wed Dec 08, 2021 9:07 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7314
Location: Canada eh!
SergArb wrote:
No problem, will do it tomorrow. Almost night here.
Any verbose options for log?

No, just what is displayed on the command line output.


Top
 Profile  
 
 Post subject: Re: Read/Write a CAN enabled ECU with RomRaider
PostPosted: Wed Dec 08, 2021 11:56 pm 
Offline
Experienced
User avatar

Joined: Sun Aug 18, 2019 8:10 am
Posts: 278
Location: Russia, Ulan-Ude (Near Lake Baikal)
Code:
C:\Program Files\RomRaider>java -Djava.library.path=lib/windows -cp RomRaider.jar com.romraider.io.j2534.api.TestJ2534NCS op20pt32 r 0 0x80000
J2534 Firmware:[1.17.4877], DLL:[1.02.4798 Jun 13 2016 17:16:24], API:[04.04]
J2534 Interface Pin 16: 14.312VDC
J2534 Config item 1: Parameter: LOOPBACK, value:0
J2534 Config item 2: Parameter: ISO15765_BS, value:0
J2534 Config item 3: Parameter: ISO15765_STMIN, value:0
J2534 Config item 4: Parameter: BS_TX, value:65535
J2534 Config item 5: Parameter: STMIN_TX, value:65535
J2534 Config item 6: Parameter: ISO15765_WFT_MAX, value:0

--- Vehicle Information ---
com.romraider.io.j2534.api.J2534Exception: readMsg error: timeout expired waiting for 1 more message(s)


Logger connects only via K-Line, but this ecu my be flashed only via CAN. Early Denso modification.
May be that's a problem, no id's via CAN.

With same connections:
Attachment:
AG572_Read.jpg


You do not have the required permissions to view the files attached to this post.

_________________
Subaru Outback BR9 EDM 2010 EJ253 CVT... Subaru Impreza GG2 JDM 2001 EJ152 AT...
Some Hitachi ROM's modifications...


Top
 Profile  
 
 Post subject: Re: Read/Write a CAN enabled ECU with RomRaider
PostPosted: Thu Dec 09, 2021 9:34 am 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7314
Location: Canada eh!
If you get no or limited output then CAN read and write won't work. This "feature" is for CAN only ECUs, ones that do not respond to k-line.
I see your output, it failed to read even the basic SID09 routine.


Top
 Profile  
 
 Post subject: Re: Read/Write a CAN enabled ECU with RomRaider
PostPosted: Thu Dec 09, 2021 10:10 am 
Offline
Experienced
User avatar

Joined: Sun Aug 18, 2019 8:10 am
Posts: 278
Location: Russia, Ulan-Ude (Near Lake Baikal)
Ok, thank you for your time.

_________________
Subaru Outback BR9 EDM 2010 EJ253 CVT... Subaru Impreza GG2 JDM 2001 EJ152 AT...
Some Hitachi ROM's modifications...


Top
 Profile  
 
 Post subject: Re: Read/Write a CAN enabled ECU with RomRaider
PostPosted: Sat Dec 11, 2021 3:58 pm 
Offline
Experienced

Joined: Tue Apr 03, 2018 6:56 am
Posts: 124
Is it possible to read the whole RAM using CAN?


Top
 Profile  
 
 Post subject: Re: Read/Write a CAN enabled ECU with RomRaider
PostPosted: Sat Dec 11, 2021 4:07 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7314
Location: Canada eh!
Yes, if the ECU supports SID 23.


Top
 Profile  
 
 Post subject: Re: Read/Write a CAN enabled ECU with RomRaider
PostPosted: Sun Dec 12, 2021 3:27 pm 
Offline
Experienced

Joined: Tue Apr 03, 2018 6:56 am
Posts: 124
Please help me what to enter to read ram completely as a rom file.


Top
 Profile  
 
 Post subject: Re: Read/Write a CAN enabled ECU with RomRaider
PostPosted: Sun Dec 12, 2021 9:18 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7314
Location: Canada eh!
Enter the RAM start address and size.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 43 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subsilver by phpBBservice.nl