Gain control over your P1 Volvo. Volvo CEM cracker

Author's volvo.
The victim

Hello and welcome to my first blog post. Buckle up because today we’re preparing a timing attack on a car. This little hack will help you add features like cruise control to your car, and it’s all for a fraction of the cost of those fancy pre-made units. If you prefer a video, click here.

Before we dive in, here's an important disclaimer: This guide is for educational purposes only. We’ll be performing a timing attack, and I’m not responsible for any damage, fried electronics, or unintended consequences that may occur. Tinker at your own risk!

Why?

So, you’ve heard of cruise control, right? You know, that magical button that makes your car keep speed by itself while you sit back and relax (sort of). Well, to add that to your Volvo, you need to decode the CEM PIN (or visit the authorized service, in Poland the cost is about $300). Normally, you'd have to fork out a whopping $627 for a ready-made unit. But we’re going to build one ourselves for just $65! Talk about a bargain!

What?

Here’s your link list:

Pro tip: Make sure to get a male OBD cable. The offer has probably changed and I'm probably too lazy to create a new link.

How?

Step 1: Prepare the OBD Cable

First up, we need to whip up an OBD cable. That means... Solder Time!

You’ll want to connect these pins:

    • Pins 6 and 14 for CAN high speed
    • Pins 3 and 11 for CAN low speed
    • Pin 5 for Ground

Step 2: Connect the Dots:

Next, we’ll hook everything up according to this diagram:

Volvo CEM Cracker diagram
The worst diagram you'll see today
  • Use a breadboard for easy connections and quick fixes.
  • Secure Waveshare CAN module jumpers using cable screws. You don't want to reconnect it every minute.
  • The original diagram mentions the need for external power. In my experience, there's no need for external power—your USB (3.0+) port has got you covered.

The result:

Assembled project
Not particularly pretty piece of electronics

Step 3: Software:

  • Download & open Arduino IDE: Head to settings (Ctrl + comma) and add the URL from the Teensyduino website.
Board manager preference

Then, go to device selector and click on "Select other board and port...".

Arduino IDE device selector #1

Search for Teensy 4.0 and click on "OK".

Arduino IDE device selector #2

Look at the bottom right corner, there should be a message asking to install packages. Click on "Yes".

Message asking for core instalation
  • Get the Code: Download the code from GitHub. Unzip the file and open the volvo-cem-cracker.ino using Arduino IDE. You'll probably get "The file needs to be inside a sketch folder" - just click on OK.
Github download zip
  • Compile: Plug the board into your computer with a micro USB cable, and compile the code.
Arduino compile and upload button
  • Upload: Press the programming (the only one) button on the board, then click the Program button.
Teensy program button
  • Test it: Check the port using the device manager (Win+X -> Device manager) and test with a serial port monitor like PuTTY. Avoid the built-in monitor in Arduino IDE— while convenient, it’s not reliable.
device manager

The Grand Decoding Process

Here’s where the magic happens:

  1. Prepare:
    • Connect the board to your computer (not the car yet!).
    • Check the port number and fire up the serial port monitor.
  2. Connect to the Car:
    • Unplug the board from the computer.
    • Connect it to the OBD port in your Volvo.
    • Turn the key to the second position.
    • Reconnect the board to your computer and quickly start the serial port monitor.

If your car’s electronics go dark, congratulations! You’ve entered programming mode. Now sit back and let the decoder do its thing.

the process

Problems?

  • Restarting the Board: Just unplug and replug the USB cable.
  • Weird Car Behavior: If your car starts acting like it’s possessed (brake failure messages, wipers going crazy, or hearing odd noises), you probably connected something wrong and messed up CAN communication. Disconnect and reconnect the battery to reset the car.

Mac and Linux Users, Rejoice!

If you’re a rebel using macOS or Linux, you can still do it. Download the Arduino IDE for your platform and use the screen command for the serial console (ls /dev | grep usb to find the device). It worked like a charm on my MacBook.

Final Thoughts

And there you have it! You’ve just built a Volvo CEM PIN decoder and performed your first timing attack. Now with the use of VDASH, you can add all sorts of cool features to your car. If you have any questions or run into trouble, reach me by email: bielecki@bieleckipawel.pl. Happy hacking!