EC logoEliot Cornu

Case study · Personal project

Auris2 Module

An ESP32-C6 listens to the CAN bus of a Toyota Auris 2 Hybrid in listen-only mode and streams the frames over BLE to an Android application.

  • ESP32-C6
  • CAN
  • BLE
  • Android

Project GitHub repository

Context

A modern car lets its control units talk over a CAN bus, accessible through the OBD2 port. On a Toyota Auris 2 Hybrid, this bus carries about 1000 frames per second. They tell everything: speed, engine speed, pedals, steering wheel, lights, doors. The challenge is to capture them without disturbing anything, then make sense of them.

Goal

Build a module that listens to the CAN line of the OBD2 port and forwards every frame over Bluetooth Low Energy to an Android application that decodes, displays and records them. The module never transmits on the car's bus.

Block diagram

Block diagram of the Auris2 moduleFrames from the car's CAN bus leave through the OBD2 port, pass through a CAN transceiver, are read in listen-only mode by an ESP32-C6 fitted with a small OLED screen, then streamed over Bluetooth Low Energy to an Android application. Data flows in one direction only: the module never transmits on the bus.CAN OK
Le flux ne va que dans un sens, de la voiture vers le téléphone : le contrôleur CAN est configuré en écoute seule.
  1. Toyota Auris 2 Hybride : les calculateurs diffusent leurs trames sur le bus CAN à 500 kbit/s.
  2. OBD2 port : CAN-H sur la broche 6, CAN-L sur la broche 14, masse et +12 V pour l’alimentation.
  3. Transceiver SN65HVD230 : convertit le signal différentiel du bus en niveaux logiques 3,3 V.
  4. XIAO ESP32-C6 : son contrôleur CAN intégré lit les trames en écoute seule, les regroupe en paquets numérotés et les diffuse en BLE.
  5. Écran OLED 128 × 64 : débit CAN en trames par seconde, état du Bluetooth, état du réseau, compteurs d’erreurs.
  6. Application Android : décodage des signaux, tableau de bord, vue voiture isométrique, enregistrement .log.

Approach

  1. Listen safely: the CAN controller runs in listen-only mode so the car is never disturbed. Power is planned to come from the +12 V pin of the port, through a 12 V to 5 V converter.
  2. Identify the signals: nine guided captures, one action at a time (idle, accelerator, brake, steering wheel, gears, lights, air conditioning, doors, driving), then a comparison of the frames to spot the ones that change.
  3. Transmit: frames are grouped into numbered BLE packets, which lets the app detect losses.
  4. Display: the app offers a tile dashboard, a raw frame table, settings, and an isometric car view driven by the signals.
  5. Record: frames are written to a .log file in candump format, which can then be replayed on a PC.

The car view, demonstrated

In the app, an isometric car reacts live to the frames received. The demo below reuses this principle with simulated signals: each tile matches a signal actually decoded on the Auris.

Isometric car animated by simulated CAN signalsA car seen from the rear left: wheels, lights, brake lights, reversing light, driver's door, tailgate and exhaust react to the values shown in the neighbouring dashboard.
Reproduction simplifiée pour ce site (illustration, pas une capture d’écran de l’application).

  • Speed– km/h
  • Engine speed– rpm
  • Gear–
  • Accelerator–
  • Brake–
  • Steering wheel–
  • Lights–
  • Driver door–
  • Trunk–
  • Fan– / 7

Tests

Limitations

View the project on GitHub