Login Register

Vida CEM swapping

Post Reply
ObliviousOrange
Posts: 3
Joined: 16 Aug 2025, 20:42
Year and Model: 2011 C30
Location: Los Angeles

Post by ObliviousOrange »

Hi everyone, hopefully this is the correct place to ask. I have my CEM PIN and have done basic things like install heated seats with VDASH.
What I want to get next is global window open/close for my 2011 C30 (US-market C30s past 2008 do not let you close the windows with the key fob, only open them). There exists a VIDA procedure for this(https://charm.li/Volvo/2012/C30%20T5%20 ... agnostics/), and in VDASH it is an option for P3 cars. But nothing on P1s. And despite the process clearly existing, VIDA 2014D doesn't want to show me the option to make the change for this in the CEM, I assume it's only available for european market cars or older USDM ones. It acknowledges that global close is deactivated in the information tab, at least.

With what you guys all know, is there a way to find out the parameter for global window controls, and then program it to a different value and enable it for a USDM car? Maybe with some DID or something. Apologies if this is the wrong place to ask. Thanks for any help.

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

Post by RickHaleParker »

vtl wrote: 17 Sep 2026, 08:07 If ARM code execution gives a lot of jitter then what may help is turning off the speculations in ARM core, so it would execute the code slower, but with linear timing. Speculative execution and power saving.
Speculation = OFF makes a huge difference in Byte calculations reliability.
With Speculation On, CALC_BYTE = 3 is the best I can do.
With Speculation OFF, CALC_BYTE = 5 is the best I can do.

Not saying CALC_BYTE = 5 is the way to go. Just testing for changes.

All 5 bytes reached the top of the list in range 100 or 50.

Code: Select all

Candidate PIN 55 20 00 85 47 -- : brute forcing bytes 5 to 5 (1 bytes), will take up to 0 seconds
Progress: 0%..5%..10%..15%..done

found PIN: 85 20 47 55 20 00
PIN is cracked in 2389.30 seconds
Validating PIN
PIN verified.

Code: Select all

#define DISABLE_ARM_SPECULATION    /* comment out to re-enable ARM speculation 
#if defined(DISABLE_ARM_SPECULATION)

  /* Turn off the Cortex-M7's speculative/dual-issue behavior via the
   * Auxiliary Control Register (ACTLR, ARMv7-M Architecture Reference
   * Manual, also documented in the Cortex-M7 TRM). This is not the
   * "ACTLR" defined anywhere in the Teensy core headers, so we poke
   * the memory-mapped register directly at its fixed address.
   *
   * Bits disabled here:
   *   DISBTACREAD (13) - stop speculative reads driven by the branch
   *                       target address cache; a mispredicted branch
   *                       can otherwise let the core fetch/read past
   *                       a not-yet-taken branch
   *   DISFOLD      (0) - disable dual-issue instruction folding
   *   DISWBUF      (1) - disable the store (write) buffer, so writes
   *                       retire in program order instead of being
   *                       queued
   *   DISDEFWBUF  (14) - disable the default write buffer used for
   *                       AHBP (peripheral) writes
   *
   * None of this changes what the code computes -- it only removes
   * sources of cycle-to-cycle jitter in the ARM core itself, so the
   * TSC-based latency measurements this sketch relies on are more
   * repeatable. Expect a modest drop in raw execution speed while
   * this is enabled. */

  #define CEM_ARM_ACTLR (*(volatile uint32_t *)0xE000E008)

  CEM_ARM_ACTLR |= (1u << 13) | (1u << 0) | (1u << 1) | (1u << 14);

  printf ("ARM core speculation disabled (ACTLR = 0x%08lx)\n", (unsigned long)CEM_ARM_ACTLR);

#endif*/
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 )

Volvisti
Posts: 19
Joined: 05 Sep 2023, 14:04
Year and Model: C30
Location: Aussie
Been thanked: 1 time

Post by Volvisti »

hi,
i think this problem has been discussed before, but i cannot find it,
PIN is cracked in 3127.10 seconds
Validating PIN
PIN verified.

i tried it several times, i get the same (nearly, first4 are same) pin, teensy at 180mhz
but if i want to enter the cem, i get pin invalid. its a 31254317, anyone an idea?

Volvisti
Posts: 19
Joined: 05 Sep 2023, 14:04
Year and Model: C30
Location: Aussie
Been thanked: 1 time

Post by Volvisti »

@RickHaleParker eg. you cannot log onto the cem? as its not accepting the pin after verifying it. i only figured out, since i have the same cem in my car, that this one has a different software revision, which is older.

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

Post by RickHaleParker »

Volvisti wrote: 21 Sep 2026, 05:16 @RickHaleParker eg. you cannot log onto the cem? as its not accepting the pin after verifying it. i only figured out, since i have the same cem in my car, that this one has a different software revision, which is older.
What are you using to login to the CEM?
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 )

Volvisti
Posts: 19
Joined: 05 Sep 2023, 14:04
Year and Model: C30
Location: Aussie
Been thanked: 1 time

Post by Volvisti »

i wrote my own script, not working on this one, so i deleted everything from the cracker script, except the confirming part, and send the can request but does not work. on this cem, on the one in the car fine. hm

Volvisti
Posts: 19
Joined: 05 Sep 2023, 14:04
Year and Model: C30
Location: Aussie
Been thanked: 1 time

Post by Volvisti »

Unlocking CEM on HS CAN...
TX ID=000FFFFE DLC=8 DATA=50 BE 04 80 28 67 36 10
RX ID=00000003 DLC=8 DATA=50 B9 02 00 00 00 00 00
PIN rejected, status = 0x02
PIN UNLOCK FAILED

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

Post by vtl »

Volvisti wrote: 21 Sep 2026, 05:22 Unlocking CEM on HS CAN...
TX ID=000FFFFE DLC=8 DATA=50 BE 04 80 28 67 36 10
RX ID=00000003 DLC=8 DATA=50 B9 02 00 00 00 00 00
PIN rejected, status = 0x02
PIN UNLOCK FAILED
IIRC code 2 is "already unlocked".

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

Post by vtl »

RickHaleParker wrote: 21 Sep 2026, 00:43
vtl wrote: 17 Sep 2026, 08:07 If ARM code execution gives a lot of jitter then what may help is turning off the speculations in ARM core, so it would execute the code slower, but with linear timing. Speculative execution and power saving.
Speculation = OFF makes a huge difference in Byte calculations reliability.
With Speculation On, CALC_BYTE = 3 is the best I can do.
With Speculation OFF, CALC_BYTE = 5 is the best I can do.

Not saying CALC_BYTE = 5 is the way to go. Just testing for changes.

All 5 bytes reached the top of the list in range 100 or 50.

Code: Select all

Candidate PIN 55 20 00 85 47 -- : brute forcing bytes 5 to 5 (1 bytes), will take up to 0 seconds
Progress: 0%..5%..10%..15%..done

found PIN: 85 20 47 55 20 00
PIN is cracked in 2389.30 seconds
Validating PIN
PIN verified.

Code: Select all

#define DISABLE_ARM_SPECULATION    /* comment out to re-enable ARM speculation 
#if defined(DISABLE_ARM_SPECULATION)

  /* Turn off the Cortex-M7's speculative/dual-issue behavior via the
   * Auxiliary Control Register (ACTLR, ARMv7-M Architecture Reference
   * Manual, also documented in the Cortex-M7 TRM). This is not the
   * "ACTLR" defined anywhere in the Teensy core headers, so we poke
   * the memory-mapped register directly at its fixed address.
   *
   * Bits disabled here:
   *   DISBTACREAD (13) - stop speculative reads driven by the branch
   *                       target address cache; a mispredicted branch
   *                       can otherwise let the core fetch/read past
   *                       a not-yet-taken branch
   *   DISFOLD      (0) - disable dual-issue instruction folding
   *   DISWBUF      (1) - disable the store (write) buffer, so writes
   *                       retire in program order instead of being
   *                       queued
   *   DISDEFWBUF  (14) - disable the default write buffer used for
   *                       AHBP (peripheral) writes
   *
   * None of this changes what the code computes -- it only removes
   * sources of cycle-to-cycle jitter in the ARM core itself, so the
   * TSC-based latency measurements this sketch relies on are more
   * repeatable. Expect a modest drop in raw execution speed while
   * this is enabled. */

  #define CEM_ARM_ACTLR (*(volatile uint32_t *)0xE000E008)

  CEM_ARM_ACTLR |= (1u << 13) | (1u << 0) | (1u << 1) | (1u << 14);

  printf ("ARM core speculation disabled (ACTLR = 0x%08lx)\n", (unsigned long)CEM_ARM_ACTLR);

#endif*/
Yes, as expected. I could not find how to disable speculation back then in 2020, but these days we have AI... Do a pull request, I'll merge.

You may also try to reduce the amount of samples per range and see how low we can go with the cracking sill being reliable: https://github.com/vtl/volvo-cem-cracke ... r.ino#L654

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

Post by RickHaleParker »

vtl wrote: 21 Sep 2026, 08:20 Yes, as expected. I could not find how to disable speculation back then in 2020, but these days we have AI... Do a pull request, I'll merge.

You may also try to reduce the amount of samples per range and see how low we can go with the cracking sill being reliable: https://github.com/vtl/volvo-cem-cracke ... r.ino#L654
1. I have not touched git for for 4 - 5 years and I was not very good then. I will try to get it uploaded, then do a pull request.
2. All 5 got to the top in range 100 ( 10 samples ) or range 50 ( 20 samples ) 30 total.
Soo how about shorten ranges and samples to:

Code: Select all

uint32_t ranges 3  = { 100, 50, 25 };
 uint32_t samples 3 = { 10,  20, 50 };

for (i = 0; i <  3 ; i++) {

    /* run through the range and exit if aborted */
to play it on the safe side?
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 )

Post Reply
  • Similar Topics
    Replies
    Views
    Last post