Notices
Series I Engine Tuning Forum EMS (Flash Tuning, Interceptor, Piggy Back, Stand Alone)

How does initating a new flash work?

Thread Tools
 
Search this Thread
 
Rate Thread
 
Old 10-09-2015 | 03:00 PM
  #1  
Shnifty's Avatar
Thread Starter
Is Nifty
 
Joined: Jun 2008
Posts: 184
Likes: 1
From: Apple Valley, MN
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.

Old 10-09-2015 | 03:18 PM
  #2  
NotAPreppie's Avatar
What am I doing here?
 
Joined: Mar 2006
Posts: 3,606
Likes: 649
From: 2017 Miata RF Launch Edition
This exists already.
MazdaEdit + OpenPort
Old 10-09-2015 | 04:07 PM
  #3  
Shnifty's Avatar
Thread Starter
Is Nifty
 
Joined: Jun 2008
Posts: 184
Likes: 1
From: Apple Valley, MN
Originally Posted by NotAPreppie
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.

Last edited by Shnifty; 10-09-2015 at 04:12 PM.
Old 10-09-2015 | 05:30 PM
  #4  
Shnifty's Avatar
Thread Starter
Is Nifty
 
Joined: Jun 2008
Posts: 184
Likes: 1
From: Apple Valley, MN
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.

Last edited by Shnifty; 10-09-2015 at 05:46 PM.
Old 10-09-2015 | 08:43 PM
  #5  
ShellDude's Avatar
weeeeeeeeee
iTrader: (12)
 
Joined: Jun 2008
Posts: 4,200
Likes: 229
From: Outside Philadelphia
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.
Old 10-09-2015 | 09:23 PM
  #6  
Shnifty's Avatar
Thread Starter
Is Nifty
 
Joined: Jun 2008
Posts: 184
Likes: 1
From: Apple Valley, MN
Originally Posted by ShellDude
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.
Old 10-09-2015 | 09:33 PM
  #7  
ShellDude's Avatar
weeeeeeeeee
iTrader: (12)
 
Joined: Jun 2008
Posts: 4,200
Likes: 229
From: Outside Philadelphia
I'll add this:

It has absolutely nothing to do with OBD2. OBD2 is easy. Hell, even CANBUS is easy.
Old 10-11-2015 | 11:34 AM
  #8  
Rote8's Avatar
Registered
 
Joined: Oct 2007
Posts: 1,574
Likes: 2
From: Boosted...
Originally Posted by Shnifty
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 .

Last edited by Rote8; 10-11-2015 at 11:36 AM.
Old 10-12-2015 | 12:14 AM
  #9  
SaveTheRotary's Avatar
Registered
 
Joined: Jul 2011
Posts: 38
Likes: 0
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.
Old 10-12-2015 | 10:52 AM
  #10  
Shnifty's Avatar
Thread Starter
Is Nifty
 
Joined: Jun 2008
Posts: 184
Likes: 1
From: Apple Valley, MN
Originally Posted by Rote8
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?
Old 10-12-2015 | 10:54 AM
  #11  
Shnifty's Avatar
Thread Starter
Is Nifty
 
Joined: Jun 2008
Posts: 184
Likes: 1
From: Apple Valley, MN
Originally Posted by SaveTheRotary
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?

Last edited by Shnifty; 10-12-2015 at 11:08 AM.
Old 10-12-2015 | 12:03 PM
  #12  
ShellDude's Avatar
weeeeeeeeee
iTrader: (12)
 
Joined: Jun 2008
Posts: 4,200
Likes: 229
From: Outside Philadelphia
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
Old 10-12-2015 | 12:46 PM
  #13  
Shnifty's Avatar
Thread Starter
Is Nifty
 
Joined: Jun 2008
Posts: 184
Likes: 1
From: Apple Valley, MN
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!

Last edited by Shnifty; 10-12-2015 at 12:56 PM.
Old 10-13-2015 | 12:29 AM
  #14  
ShellDude's Avatar
weeeeeeeeee
iTrader: (12)
 
Joined: Jun 2008
Posts: 4,200
Likes: 229
From: Outside Philadelphia
nice to see oltmann active over at openecu.org

You might want to try sending him a PM... here or there. He knows his **** about our ECU.
Old 10-14-2015 | 01:50 AM
  #15  
Shnifty's Avatar
Thread Starter
Is Nifty
 
Joined: Jun 2008
Posts: 184
Likes: 1
From: Apple Valley, MN
Originally Posted by ShellDude
nice to see oltmann active over at openecu.org

You might want to try sending him a PM... here or there. He knows his **** 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"
Old 10-14-2015 | 07:02 AM
  #16  
ShellDude's Avatar
weeeeeeeeee
iTrader: (12)
 
Joined: Jun 2008
Posts: 4,200
Likes: 229
From: Outside Philadelphia
Yup it is built into Linux. That's how the CBT works.
Old 10-14-2015 | 08:55 AM
  #17  
Shnifty's Avatar
Thread Starter
Is Nifty
 
Joined: Jun 2008
Posts: 184
Likes: 1
From: Apple Valley, MN
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?
Old 10-14-2015 | 09:32 AM
  #18  
ShellDude's Avatar
weeeeeeeeee
iTrader: (12)
 
Joined: Jun 2008
Posts: 4,200
Likes: 229
From: Outside Philadelphia
Originally Posted by Shnifty
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.
Old 10-14-2015 | 12:35 PM
  #19  
Shnifty's Avatar
Thread Starter
Is Nifty
 
Joined: Jun 2008
Posts: 184
Likes: 1
From: Apple Valley, MN
Originally Posted by ShellDude
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.
Old 10-14-2015 | 04:27 PM
  #20  
ShellDude's Avatar
weeeeeeeeee
iTrader: (12)
 
Joined: Jun 2008
Posts: 4,200
Likes: 229
From: Outside Philadelphia
Originally Posted by Shnifty
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

Last edited by ShellDude; 10-14-2015 at 04:46 PM.
Old 10-19-2015 | 08:34 AM
  #21  
ShellDude's Avatar
weeeeeeeeee
iTrader: (12)
 
Joined: Jun 2008
Posts: 4,200
Likes: 229
From: Outside Philadelphia
Hmmm...

http://www.elecfreaks.com/estore/can-bus-shield.html
Old 10-19-2015 | 03:06 PM
  #22  
Shnifty's Avatar
Thread Starter
Is Nifty
 
Joined: Jun 2008
Posts: 184
Likes: 1
From: Apple Valley, MN
Originally Posted by ShellDude
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.
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
kbrewmr2
RX-8's For Sale/Wanted
23
08-25-2017 11:07 AM
Belalnabi
Series I Trouble Shooting
7
01-09-2016 05:48 AM
2004mazdaATL
Series I Tech Garage
6
10-19-2015 11:36 AM
Arxeight
Series I Trouble Shooting
11
10-16-2015 05:32 PM
S54Kaleb
Series I Wheels, Tires, Brakes & Suspension
1
10-06-2015 09:41 PM



You have already rated this thread Rating: Thread Rating: 0 votes,  average.


All times are GMT -5. The time now is 07:18 PM.