Login Register

Vida CEM swapping

A mid-size luxury crossover SUV, the Volvo XC90 made its debut in 2002 at the Detroit Motor Show. Recognized for its safety, practicality, and comfort, the XC90 is a popular vehicle around the world. The XC90 proved to be very popular, and very good for Volvo's sales numbers, since its introduction in model year 2003 (North America). P2 platform.
Post Reply
vtl
Posts: 4727
Joined: 16 August 2012
Year and Model: 2005 XC70
Location: Boston
Has thanked: 114 times
Been thanked: 606 times

Re: Vida CEM swapping

Post by vtl »

Teensy 4.0 (ARM Cortex-M7) is great!



Had a couple of doubts that were oscilloscoped out. As a consequence, the code was completely rewritten. It technically can run on ESP32, but it won't work properly, because ESP32's single conditional jump command takes almost two microseconds - far away from the required precision.

Next step is to simplify the hw part: use a 3.3v CAN transceiver (Teensy has a built-in CAN-controller) and get rid of bi-directional 3.3v<>5v level shifter (CYT1072).

3r1k
Posts: 11
Joined: 5 November 2020
Year and Model: S40
Location: Sweden
Has thanked: 1 time

Post by 3r1k »

Just found this thread, awesome work you have done vtl! Personally I am into the P1 Volvo CEMs and more specific changing the car configuration as I have retrofitted many goodies to my car. Right now my way to go is to solder into the MC9S12 (which has a flash and EEPROM) and manually changing the bit(s), as installing software as Volvo says is equivalent to just activating that feature in the CEMs car config as the software is already in the module from the factory.

I am right now seeking how to do this via the canbus and what I am missing is where the PIN is stored/or how to crack and what commands has to be sent over the can network. This picture shows the block responsible for the car configuration that on P1 cars, it is in the flash.

Image

I know this looks the same on P2 2005-2007 (downloaded a random dump and confirmed this) on the 2000-2004 the only difference I can see is that the Checksum and size of the carconfig has flipped order, In the dump above this is located at, Size = 0x3c100 and Checksum = 0x3c101, in 2000-2004 P2 this is flipped. If you read out the car via VIDA, the order VIDA displays the carconfiguration is the same order as you see it in the flash. It is also possible to decode this using some information from the VIDA databases where you can find what each specific offset is equivalent to and what different configurations means.

vtl
Posts: 4727
Joined: 16 August 2012
Year and Model: 2005 XC70
Location: Boston
Has thanked: 114 times
Been thanked: 606 times

Post by vtl »

I don't know anything about PIN in P1 CEM, but if the principle is similar to P2 - it can be cracked by a similar timing attack.

3r1k
Posts: 11
Joined: 5 November 2020
Year and Model: S40
Location: Sweden
Has thanked: 1 time

Post by 3r1k »

Yeah I will for sure try digging into that. Btw, Have you tried dealing anything with the car configuration on your P2 CEM using your PIN?

vtl
Posts: 4727
Joined: 16 August 2012
Year and Model: 2005 XC70
Location: Boston
Has thanked: 114 times
Been thanked: 606 times

Post by vtl »

This is not my PIN - I play with the spare donor CEM on my desk. I knew the PIN up front by reading the Renesas M32C via serial port, that helped a lot with steering the algorithm.

Yeah, I'm planning to do some configuration changes... Thinking about mating XC70 and its engine to the frame and the rest of drivetrain from 4th gen Toyota 4Runner =)

User avatar
RickHaleParker
Posts: 7129
Joined: 25 May 2015
Year and Model: See Signature below.
Location: Kansas
Has thanked: 8 times
Been thanked: 958 times

Post by RickHaleParker »

vtl wrote: 05 Nov 2020, 19:18 Thinking about mating XC70 and its engine to the frame and the rest of drivetrain from 4th gen Toyota 4Runner =)
Sounds like your about to bite off almost as much as I have. Retrofitting a Volvo V8 into a 2004 S60R.
⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙
1998 C70, B5234T3, 16T, AW50-42, Bosch Motronic 4.4, Special Edition package.
2003 S40, B4204T3, 14T twin scroll AW55-50/51SN, Siemens EMS 2000.
2004 S60R, B8444S TF80 AWD. Yamaha V8 conversion
2005 XC90 T6 Executive, B6294T, 4T65 AWD, Bosch Motronic 7.0.

vtl
Posts: 4727
Joined: 16 August 2012
Year and Model: 2005 XC70
Location: Boston
Has thanked: 114 times
Been thanked: 606 times

Post by vtl »

RickHaleParker wrote: 06 Nov 2020, 00:30 Sounds like your about to bite off almost as much as I have. Retrofitting a Volvo V8 into a 2004 S60R.
Yeah, I "follow" your thread :) Nice!

sirloins
Posts: 43
Joined: 5 November 2020
Year and Model: 2010 V50 T5 AWD M66
Location: Ottawa, Canada
Been thanked: 3 times

Post by sirloins »

Just wanted to chime in and say awesome work!

I am just getting started looking at the P1 platform like 3r1k.

User avatar
RickHaleParker
Posts: 7129
Joined: 25 May 2015
Year and Model: See Signature below.
Location: Kansas
Has thanked: 8 times
Been thanked: 958 times

Post by RickHaleParker »

3r1k wrote: 05 Nov 2020, 16:31 I am missing is where the PIN is stored/or how to crack and what commands has to be sent over the can network.
You might find some clues to where the PIN is in bin file by reading the Block users guide for that specific version of the MC9S12.

Block User Guide for your MC9S12 is FTSxxxK where xxx is the numbers on the end of the device name.

For example:
MC9S12C32 get Block User Guide FTS32K.
MC9S12C128 get Block User Guide FTS128K
⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙
1998 C70, B5234T3, 16T, AW50-42, Bosch Motronic 4.4, Special Edition package.
2003 S40, B4204T3, 14T twin scroll AW55-50/51SN, Siemens EMS 2000.
2004 S60R, B8444S TF80 AWD. Yamaha V8 conversion
2005 XC90 T6 Executive, B6294T, 4T65 AWD, Bosch Motronic 7.0.

vtl
Posts: 4727
Joined: 16 August 2012
Year and Model: 2005 XC70
Location: Boston
Has thanked: 114 times
Been thanked: 606 times

Post by vtl »

RickHaleParker wrote: 06 Nov 2020, 08:15 You might find some clues to where the PIN is in bin file by reading the Block users guide for that specific version of the MC9S12.

Block User Guide for your MC9S12 is FTSxxxK where xxx is the numbers on the end of the device name.
Volvo does not use ID code of the device (the one that does a physical read access restriction for the flash), as it turned out. Instead it uses its own PIN code that Volvo implements in its own protocol. That PIN is just a few bytes in the dump, you still need to look for them in a car/platform-specific location.

Post Reply
  • Similar Topics
    Replies
    Views
    Last post