RX8Club.com

RX8Club.com (https://www.rx8club.com/)
-   Series I Engine Tuning Forum (https://www.rx8club.com/series-i-engine-tuning-forum-63/)
-   -   How does initating a new flash work? (https://www.rx8club.com/series-i-engine-tuning-forum-63/how-does-initating-new-flash-work-260303/)

Shnifty Oct 9, 2015 02:00 PM

How does initating a new flash work?
 
I'll admit that I haven't put in a lot of reading time yet but after watching videos like this where they make logging look really easy, I'm wondering why I can't take a similar home made setup to interface with the ODBII and modify it as a tuning device. Is there something inherently complicated about initiating the reflash? It seems like the available hardware has come a long way since people started tuning the RX8 and that It should be VERY cheap to accomplish this kind of tuning solution. I'm a open-souce linux guy so maybe I'm just being too optimistic with my lack of ODBII experience.


NotAPreppie Oct 9, 2015 02:18 PM

This exists already.
MazdaEdit + OpenPort

Shnifty Oct 9, 2015 03:07 PM


Originally Posted by NotAPreppie (Post 4721819)
This exists already.
MazdaEdit + OpenPort

I am familiar with that combo of products. I'm talking even cheaper than that. What is the MazdaEdit software or OpenPort adapter doing to initiate the reflash? Why does there need to be a processor on the adapter if we can do everything cheaper on either a laptop or a micro computer like the Raspberry Pi. Integrating with a small computer could open up the possiblity of a very cheap tuning solution as well as other neat functionality like sending logs to your network computer/server automatically when it connects to wifi when you get home. You could also interface the Pi with your stereo and use it for music... which could be loaded via wifi.

Shnifty Oct 9, 2015 04:30 PM

What it comes down to is ODB "hacking" and I can't seem to find detailed info about sending a new map to the ECU. Is Mazda doing something in the ECU that is making it more difficult to use or have we just not had enough ODB nerds look at it? Have the people at COBB and MazdaEdit completely reverse engineered the hex data from a proprietary protocol or something?

Here is a list of ODB protocols in Mazda cars. Anyone familiar with this kind of stuff?

ECU Reflashing - DeepThoughts Engineering

Code:

used in Mazda's produced after 1996

 
Pin        Signal        Description
2        J1850 Bus+         
3        LS CAN Hi        Low speed (125Kb) CAN bus. This bus used for some IC, RFA and other units.
4        CGND        Chassis ground
5        SGND        Signal ground
6        CAN High        J-2284
7        K-LINE        Diagnostic, (ISO 9141-2 and ISO/DIS 14230-4)
10        J1850 Bus-         
11        LS CAN Low        Low speed (125Kb) CAN bus. This bus used for some IC, RFA and other units.
14        CAN Low        J-2284
15        ISO 9141-2 L-LINE        Diagnostic, (ISO 9141-2 and ISO/DIS 14230-4)
16        +12v        Battery power

 

 

 
Mazda OBD-2 compatibility list

Note that list is not 100% complete!
Model        Engine        Year (starting from)        OBD-2 Protocol
Mazda 121        1,25 liter, Gasoline (100 HP)        1995        PWM J1850
Mazda 2        Gasoline (74 HP)        2008        CAN
Mazda 323        Gasoline (97 HP)        2001        ISO 9141-2
2, Gasoline (130HP)        2001        ISO 9141
Gasoline (92 HP)        2003        -
Gasoline (97 HP)        2001         
Mazda 6        Diesel (120 HP)        2003         
Diesel (135 HP)        2005        CAN
Gasoline (127 HP)        2005         
Gasoline (135 HP)        2005        CAN
Diesel (135 HP)        2005        CAN
Diesel (135 HP)        2005        CAN
Gasoline (164 HP)        2003         
2.0 MZR CD, Diesel (136HP)        2003        CAN 11bit (500kb)
2.0 MZR CD, Diesel (120HP)        2006        CAN 11bit (500kb)
2, Diesel (143HP)        2006        CAN 11bit (500kb)
Diesel MZR 2.0, Diesel (128 HP)        2007         
Mazda 626        2.0 16V, Gasoline (114 HP)        2001        ISO 14230-4, ISO 9141-2
Mazda B2300                  2002        PWM J1850
Mazda B2500SE Pickup                  2001        PWM J1850
Mazda B3000                  2002        PWM J1850
Mazda BT50        2.5 MRZ-CD, Diesel (130HP)        2007        CAN 11bit (500kb)
Mazda 2        1.4, Diesel (68HP)        2007        CAN 11bit (500kb)
1.3 MZR, Gasoline (86HP)        2009        CAN 11bit (500kb)
Mazda 3        1.6 MZCD, Diesel (110HP)        2004        CAN 11bit (500kb)
Gasoline (74 HP)        2005        CAN
Mazda 5        2.0 MZ-CD, Diesel (110HP)        2006        CAN 11bit (500kb)
CRD, Diesel (145HP)        2007        CAN 11bit (500kb)
1.8L, Gasoline (114 HP)        2006        CAN
1.6 MZR-CD, Diesel (110HP)        2011        CAN 11bit (500kb)
Mazda MX-5        Gasoline (109 HP)        2001        ISO 14230-4
1.8L, Gasoline (126HP)        2006        CAN 11bit (500kb)
Mazda MX-5 (Australian)                  2003        ISO 14230-4, ISO 9141-2
Mazda MX-5 (Miata)                  2003        ISO 14230-4, ISO 9141-2
Mazda MX5 NB        Gasoline (139 HP)        2000         
Gasoline (113 HP)        2003        ISO 9141-2
Mazda MX-5 NC        Gasoline (128 HP)        2007        CAN
Mazda MX-5 NC1        Gasoline (159 HP)        2006        CAN
Mazda MX5NB FL        Gasoline (114 HP)        2004        ISO 14230-4, ISO 9141-2
Mazda Protege                  2001        ISO 14230-4, ISO 9141-2
Gasoline (108 HP)        2000         
Mazda Protege 5                  2002        ISO 14230-4, ISO 9141-2
Mazda RX8        1308 cm3, Gasoline (192HP)        2003        CAN 11bit (500kb)
2.6, Gasoline (231HP)        2004        CAN 11bit (500kb)
Gasoline (228 HP)        2003        CAN
Gasoline (190 HP)        2005         
Mazda Tribute                  2002        PWM J1850

Protocols used:

1996-2002 : ISO-9141

2002-2005 : ISO-9141 or CAN

after 2005 : CAN

Mazda (Ford) used J1850-PWM mostly.


ShellDude Oct 9, 2015 07:43 PM

The Mazda ECU file has a certificate of sorts that must be submitted before it will allow a ECU dump / upload.

Peeps like epifan (mazdaedit) and Cobb (accessTuner Race) figured out how to crack Mazda's code.

Trust me, its far easier to just pay the money for a copy of MEP and an open Port.

Shnifty Oct 9, 2015 08:23 PM


Originally Posted by ShellDude (Post 4721855)
The Mazda ECU file has a certificate of sorts that must be submitted before it will allow a ECU dump / upload.

Peeps like epifan (mazdaedit) and Cobb (accessTuner Race) figured out how to crack Mazda's code.

Trust me, its far easier to just pay the money for a copy of MEP and an open Port.

I already have an accessport so It's not about easy at this point. After the crappy driver/firmware support from cobb and there being only one other popular option(mazdaedit), I'm in it for the movement. I dunno, Maybe I'll lose interest in a week or two but I'm pretty confident that If I could figure out the certificate/CAN communication stuff somehow, I could throw together a linux solution for the rest. We're talking $10 dollars for a ODB-II adapter and free software to get reflashing capabilities. I could put together a Raspberry Pi Carputer with the bluetooth adapter for under $100.

I guess I'm a fan of the open-source business model where the product is free and you pay for support.

ShellDude Oct 9, 2015 08:33 PM

I'll add this:

It has absolutely nothing to do with OBD2. OBD2 is easy. Hell, even CANBUS is easy.

Rote8 Oct 11, 2015 10:34 AM


Originally Posted by Shnifty (Post 4721856)
I already have an accessport so It's not about easy at this point. After the crappy driver/firmware support from cobb and there being only one other popular option(mazdaedit), I'm in it for the movement. I dunno, Maybe I'll lose interest in a week or two but I'm pretty confident that If I could figure out the certificate/CAN communication stuff somehow, I could throw together a linux solution for the rest. We're talking $10 dollars for a ODB-II adapter and free software to get reflashing capabilities. I could put together a Raspberry Pi Carputer with the bluetooth adapter for under $100.

I guess I'm a fan of the open-source business model where the product is free and you pay for support.

How about a Raspberry Pi running the as an ECU replacement on a Mazda flash???

A VM ECU to "flash" would then be possible, and if we could get the ability to run a virtual ECU on a live engine,"hot swapped" it would be awesome.

Then... a virtual-box laptop running your car and switching live control of the engine between virtual ECUs and the car ECU for different performance modes .

SaveTheRotary Oct 11, 2015 11:14 PM

I will love to see this going somewhere as well as find a way to reprogram the TCM which I need right now for the High Performance AT I'm getting built for my 20B Rx-8. There is TCM software for a lot of cars around including Mazda 6 MPV but not for Rx-8 which is frustrating. Same with this ECU issues that the other brands have already resolve and had left us behind.

Shnifty Oct 12, 2015 09:52 AM


Originally Posted by Rote8 (Post 4722005)
How about a Raspberry Pi running the as an ECU replacement on a Mazda flash???

A VM ECU to "flash" would then be possible, and if we could get the ability to run a virtual ECU on a live engine,"hot swapped" it would be awesome.

Then... a virtual-box laptop running your car and switching live control of the engine between virtual ECUs and the car ECU for different performance modes .

In the short term I think we just need to compile existing info about the RX8 ECU. Hell... Any ECU for that matter. What hardware and software is required to accomplish something like this? Is the Raspberry Pi even powerful enough? Does it have the right IO requirements?

Shnifty Oct 12, 2015 09:54 AM


Originally Posted by SaveTheRotary (Post 4722084)
I will love to see this going somewhere as well as find a way to reprogram the TCM which I need right now for the High Performance AT I'm getting built for my 20B Rx-8. There is TCM software for a lot of cars around including Mazda 6 MPV but not for Rx-8 which is frustrating. Same with this ECU issues that the other brands have already resolve and had left us behind.

I'd imagine if we could figure out the ECU, the TCM wouldn't be that hard to throw in. Do you have any info on what other people have done?

ShellDude Oct 12, 2015 11:03 AM

I imagine we could use portmon if under the covers the OpenPort presents itself to Windows as a COM port.

In doing so we could record a couple flash sessions through MEP and see the data going across the wire.

The AccessPORT likely does similarly.

In my MEP logs you see it:

1. Erase firmware
2. Request Challenge from ECU
3. Challenge ECU
4. Upload the new firmware in chunks

Shnifty Oct 12, 2015 11:46 AM

Good idea ShellDude. I'm going to try portmon and see what I can find.

Also, I found this thread to be somewhat informative: openecu.org ? View topic - RX8 Flash Protocol
Here is another one: http://www.romraider.com/forum/viewt...hp?f=25&t=6303

Down the rabbit hole I go!

ShellDude Oct 12, 2015 11:29 PM

nice to see oltmann active over at openecu.org

You might want to try sending him a PM... here or there. He knows his shit about our ECU.

Shnifty Oct 14, 2015 12:50 AM


Originally Posted by ShellDude (Post 4722319)
nice to see oltmann active over at openecu.org

You might want to try sending him a PM... here or there. He knows his shit about our ECU.

Yeah, I've noticed that you and oltmann have been involved in most of the ecu/carputer type threads here, I really appreciate the content. I've been doing a lot of reading since I started this thread and to no surprise, I've mostly just continually grown my list of things I need to learn. I'm working on compiling a list of known ECU and CAN info for the RX8 and I'll probably edit the first post to contain info if this goes anywhere.

One really promising thing is that I've come across some projects that seem to imply that you can turn a micro-controller running linux into J2534 protocol compliant pass-through device which is what does the flashing. For example:

https://github.com/jeremyhahn/ecutoo...r/pass-through

This would replace the need to buy a pre-built device like the openport.

I'm not a C programmer yet but I'm going to look into it as much as possible. Unfortunately I have a lot of work to do before I'm familiar enough with any of these protocols to make something worthwhile.

Can anyone provide known protocols/electronics that we are dealing with on an RX8?

Flashing Passthrough: J2534
CAN: ?
ECU: Hitachi SuperH processor by Renesas
SH7055 "64F7055F40"

ShellDude Oct 14, 2015 06:02 AM

Yup it is built into Linux. That's how the CBT works.

Shnifty Oct 14, 2015 07:55 AM

Sorry, can you elaborate? Why are people paying for J2534 cables if they can just load linux on a laptop? Are we talking about the same thing?

ShellDude Oct 14, 2015 08:32 AM


Originally Posted by Shnifty (Post 4722562)
Sorry, can you elaborate? Why are people paying for J2534 cables if they can just load linux on a laptop? Are we talking about the same thing?

Just because it is supported it doesn't mean anything is in place from an application stack to process it...

Look at it like basic serial port level support.

Shnifty Oct 14, 2015 11:35 AM


Originally Posted by ShellDude (Post 4722573)
Just because it is supported it doesn't mean anything is in place from an application stack to process it...

Look at it like basic serial port level support.

I'm aware of that. The point is that it's possible for a small cheap carputer to do flash tuning on top of whatever else you want it to do if an application is written for it accordingly.

ShellDude Oct 14, 2015 03:27 PM


Originally Posted by Shnifty (Post 4722608)
I'm aware of that. The point is that it's possible for a small cheap carputer to do flash tuning on top of whatever else you want it to do if an application is written for it accordingly.

Yup... Look here....

http://www.canb.us

ShellDude Oct 19, 2015 07:34 AM

Hmmm...

http://www.elecfreaks.com/estore/can-bus-shield.html

Shnifty Oct 19, 2015 02:06 PM


Originally Posted by ShellDude (Post 4723487)

Yeah man, that looks pretty cool. With all of these devices that have become available in the last few years... I really think we're missing something.


All times are GMT -5. The time now is 10:25 AM.


© 2026 MH Sub I, LLC dba Internet Brands