Login Register

Vida CEM swapping

Post Reply
User avatar
yagger
Posts: 373
Joined: 24 Mar 2016, 16:29
Year and Model: V60 2016
Location: DreamLand
Has thanked: 6 times
Been thanked: 39 times

Post by yagger »

We use special algorithms for get access codes actually.

vtl
Posts: 4934
Joined: 16 Aug 2012, 13:35
Year and Model: 2005 XC70
Location: Boston
Has thanked: 129 times
Been thanked: 686 times

Post by vtl »

So it looks like the BUSY line in M32C is controlled from timer interrupt handler. The delay between last bit sent and BUSY lifted is 50 us with a very small jitter. The delay after ID sequence is fully sent is 500 us (well, 480 to 490 us). Going through all the permutations does not change anything significantly.

User avatar
RickHaleParker
Posts: 7200
Joined: 25 May 2015, 14:30
Year and Model: See Signature below.
Location: Kansas
Has thanked: 8 times
Been thanked: 978 times

Post by RickHaleParker »

vtl wrote: 16 Jul 2020, 13:32 So it looks like the BUSY line in M32C is controlled from timer interrupt handler. The delay between last bit sent and BUSY lifted is 50 us with a very small jitter. The delay after ID sequence is fully sent is 500 us (well, 480 to 490 us). Going through all the permutations does not change anything significantly.
This is from somebody that did the M16C side attack. It pushes the delay to around 7500us. You can see smaller differences at a slower clock speed.

After running the measurements a few more times, we were quite sure that the timing was indeed different when the first byte of the key is 0xFF. I then disconnected the EC from its' 16MHz crystal to a signal generator, which I clocked down to a 666KHz square wave. With the chip now running slowly, I was able to quickly discern the time difference when measuring the time-until-not-busy for each possible byte of the key: [source]
Active
1998 C70, B5234T3, 16T, AW50-42, Bosch Motronic 4.4, Special Edition package.
2017 Ford PIU. 3.5l, Twin Turbo, 365 Hp.
............................
Past
2003 S40, B4204T3, 14T twin scroll AW55-50/51SN, Siemens EMS 2000. ( Killed by a plastic radiator. )
2004 S60R, B8444S TF80 AWD. Yamaha V8 conversion ( I moved, the project did not )
2005 XC90 T6 Executive, B6294T, 4T65 AWD, Bosch Motronic 7.0. ( Transmission dead after sitting for a winter )

vtl
Posts: 4934
Joined: 16 Aug 2012, 13:35
Year and Model: 2005 XC70
Location: Boston
Has thanked: 129 times
Been thanked: 686 times

Post by vtl »

Yeah, saw that. My latency detection threshold is about 170 ns.

vtl
Posts: 4934
Joined: 16 Aug 2012, 13:35
Year and Model: 2005 XC70
Location: Boston
Has thanked: 129 times
Been thanked: 686 times

Post by vtl »

Image

As a Linux kernel engineer I was overthinking the problem. Not all software problems require a rocket science approach. Sigh...

With a kind help from Eastern Europe I've got a CEM dump where ID was found set to zero. Means, Renesas is unprotected. Also everyone there was surprised that I needed an ID to read the flash. Apparently Volvo does not protect M32C and you can freely read it with any BDM programmer that supports that chip. I have a cheap second-hand E8 from ebay and it works fine.

Once you solder the programmer to CEM and have the bin file read - pass it through CEM PIN decode sw, the one I could not understand, and here's your PIN! Which is purely a Volvo-thing applicable to CAN, not Renesas.

The link for pin decoding sw: https://www.digital-kaos.co.uk/forums/s ... -2005-2009

Because Renesas speaks through serial port in boot-mode, all you need is a FTDI adapter/chip to translate between serial and USB, and software like this: https://github.com/fightling/flash-renesas Not necessary to burn a fortune on $xxx BDM programmers like Smoke, or Orange or E8a.

User avatar
RickHaleParker
Posts: 7200
Joined: 25 May 2015, 14:30
Year and Model: See Signature below.
Location: Kansas
Has thanked: 8 times
Been thanked: 978 times

Post by RickHaleParker »

vtl wrote: 25 Sep 2020, 08:19 Not necessary to burn a fortune on $xxx BDM programmers like Smoke, or Orange or E8a.
Good somebody got it all figured out.

The GitHub project looks like it flashes but does it read and make a binary file?

Would be nice if somebody would compile and make a installer for the non-coders and write a howto in plain English.

Redhat documentation for Serial mode 2 to program R8C, M16C, M32C, and R32C chips.

Redhat M32C project page.
Active
1998 C70, B5234T3, 16T, AW50-42, Bosch Motronic 4.4, Special Edition package.
2017 Ford PIU. 3.5l, Twin Turbo, 365 Hp.
............................
Past
2003 S40, B4204T3, 14T twin scroll AW55-50/51SN, Siemens EMS 2000. ( Killed by a plastic radiator. )
2004 S60R, B8444S TF80 AWD. Yamaha V8 conversion ( I moved, the project did not )
2005 XC90 T6 Executive, B6294T, 4T65 AWD, Bosch Motronic 7.0. ( Transmission dead after sitting for a winter )

vtl
Posts: 4934
Joined: 16 Aug 2012, 13:35
Year and Model: 2005 XC70
Location: Boston
Has thanked: 129 times
Been thanked: 686 times

Post by vtl »

Yeah, it does not read flash. Also, Renesas FDT programmer can read and erase flash, but can't write it back (timeouts). So my donor CEM is bricked. But I have a dump and will write my own programmer. The protocol is trivial.

vtl
Posts: 4934
Joined: 16 Aug 2012, 13:35
Year and Model: 2005 XC70
Location: Boston
Has thanked: 129 times
Been thanked: 686 times

Post by vtl »

Right now ebay has a couple of cheap Renesas E8 programmers. They price is about twice over Arduino board that still needs a software to be written (and it won't be a Windows one if I write it). I still will write the software because I need to unbrick my CEM, though.

User avatar
RickHaleParker
Posts: 7200
Joined: 25 May 2015, 14:30
Year and Model: See Signature below.
Location: Kansas
Has thanked: 8 times
Been thanked: 978 times

Post by RickHaleParker »

vtl wrote: 25 Sep 2020, 08:19 Because Renesas speaks through serial port in boot-mode, all you need is a FTDI adapter/chip to translate between serial and USB,
USB = Universal Serial Bus. Can't the USB port be configured to communicate with the chip directly?
Active
1998 C70, B5234T3, 16T, AW50-42, Bosch Motronic 4.4, Special Edition package.
2017 Ford PIU. 3.5l, Twin Turbo, 365 Hp.
............................
Past
2003 S40, B4204T3, 14T twin scroll AW55-50/51SN, Siemens EMS 2000. ( Killed by a plastic radiator. )
2004 S60R, B8444S TF80 AWD. Yamaha V8 conversion ( I moved, the project did not )
2005 XC90 T6 Executive, B6294T, 4T65 AWD, Bosch Motronic 7.0. ( Transmission dead after sitting for a winter )

vtl
Posts: 4934
Joined: 16 Aug 2012, 13:35
Year and Model: 2005 XC70
Location: Boston
Has thanked: 129 times
Been thanked: 686 times

Post by vtl »

Short answer is: "No".

Post Reply
  • Similar Topics
    Replies
    Views
    Last post