⚡ TeslaCAN

May 13, 2026 · View on GitHub

⚡ TeslaCAN

Open-source Tesla CAN bus mod for ESP32-C6 — with a built-in LCD, a WiFi dashboard, and now a Flipper Zero companion.

PlatformIO License: MIT Version GitHub stars Last commit Issues Tesla Flipper Zero

English | Türkçe | Wire protocol | Changelog


What is TeslaCAN?

TeslaCAN is an open-source CAN-bus modification firmware for the Waveshare ESP32-C6-LCD-1.47. It plugs into the Tesla Model 3 / Y diagnostic port and gives you:

  • FSD activation at the CAN frame layer (requires an active FSD entitlement on the car)
  • Driver-attention nag suppression and ISA chime suppression
  • Battery telemetry: real-time SoC, voltage, current, power, pack temperature, Wh/km
  • Battery preconditioning trigger — heat the pack before plug-in
  • A built-in 1.47″ color LCD that always shows live status without a phone
  • A WiFi access point + web dashboard at http://192.168.4.1
  • A Flipper Zero companion app that talks to the firmware over a 4-wire UART link — see flipper/README.md
  • A reference Python client (tools/teslacan_client.py) for scripting and testing without any extra hardware

How it compares

TeslaCAN (this repo)hypery11/flipper-tesla-fsdS3XY Commander (commercial)
Standalone use (no Flipper)✅ Built-in LCD + WiFi dashboard❌ Flipper required✅ Yes
Flipper Zero companion✅ MVP (this release)✅ Mature❌ No
WiFi 6 + BLE 5.0 hardware✅ ESP32-C6⚠ Classic ESP32 / MCP2515Proprietary
Open source✅ MIT✅ GPL-3.0❌ Closed
Battery preconditioning
ISA chime suppress
Web dashboard✅ Built-in APApp-only
Cost (DIY)~$25~$14$200+
Bilingual docs (EN/TR)

The aim is not to displace either of the others — hypery11/flipper-tesla-fsd is the mature Flipper-first stack and we cross-reference its excellent CAN research. TeslaCAN is positioned as the standalone-first option with Flipper as an add-on rather than a hard dependency.

Hardware

PartNotes
Waveshare ESP32-C6-LCD-1.47172×320 ST7789 display, WiFi 6 + BLE 5.0
SN65HVD230 CAN transceiver3.3 V tolerant, common on Aliexpress
LM2596 buck converter12 V → 5 V for the ESP32
Dupont jumper wiresFemale-to-female
(optional) Flipper ZeroFor the companion app

Total BOM, without the Flipper: ~$25.

Wiring (in-car)

 Tesla Diagnostic Port                    ESP32-C6-LCD-1.47
 (Front Bumper)                          ┌─────────────────┐
 ┌──────────┐                            │                 │
 │  CAN-H ──┼──── CANH ┌───────────┐    │  ┌───────────┐  │
 │  CAN-L ──┼──── CANL │ SN65HVD230│    │  │  172×320  │  │
 │          │          │  TX ──────┼────┼──► GPIO 0    │  │
 │  12V ────┼──┐       │  RX ──────┼────┼──► GPIO 1    │  │
 │  GND ────┼──┼──┐    │  VCC ─────┼────┼──► 3.3V      │  │
 └──────────┘  │  │    │  GND ─────┼────┼──► GND       │  │
               │  │    └───────────┘    │              │  │
               │  │    ┌───────────┐    │  WiFi AP:    │  │
               │  └────│ LM2596    │    │  TeslaCAN    │  │
               │       │ 12V → 5V ─┼────┼──► 5V        │  │
               └───────│ GND ──────┼────┼──► GND       │  │
                       └───────────┘    └──────────────┘

Pin map

FunctionGPIONotes
TWAI TX0to SN65HVD230 TX
TWAI RX1from SN65HVD230 RX
Flipper TX4to Flipper pin 14 (RX) — FLIPPER_UART_TX
Flipper RX5to Flipper pin 13 (TX) — FLIPPER_UART_RX
LCD SPI SCK7built-in
LCD SPI MOSI6built-in
LCD CS14built-in
LCD DC15built-in
LCD RST21built-in
LCD BL22backlight
Activity LED8built-in

All UART/CAN pins can be remapped via PlatformIO build flags in platformio.ini.

CAN map

CAN IDNameDirectionFunction
0x3FD (1021)AP_CONTROLRead/WriteFSD enable (bit 46/60), nag suppress (bit 19)
0x3F8 (1016)AP_FOLLOW_DISTReadSpeed profile via follow-distance stalk
0x132 (306)BMS_hvBusStatusReadPack voltage & current
0x292 (658)BMS_socStatusReadState of charge
0x212 (530)BMS_statusReadPrecondition allowed / worthwhile flags
0x312 (786)BMS_thermalStatusReadPack temperature min/max
0x33A (826)UI_ratedConsumptionReadEnergy consumption Wh/km
0x082 (130)UI_tripPlanningWritePreconditioning trigger (10 Hz)
0x399 (921)ISA_chimeRead/WriteISA speed-warning chime suppression

Detailed signal layout: TESLA_CAN_BATTERY_REFERENCE.md, TESLA_CAN_STEERING_REFERENCE.md.

Supported vehicles

VehicleHandlerStatus
Tesla Model Y Juniper (HW4)HW4Handler✅ Primary target
Tesla Model 3 / Y (HW3)HW3Handler✅ Supported
Tesla Model 3 / Y (Legacy AP)LegacyHandler✅ Supported
Model S / X (Palladium)⏳ Roadmap

Three ways to use it

1. Standalone (LCD + phone)

Boot the ESP32-C6 in the car. Watch the LCD. Connect your phone to the TeslaCAN WiFi (password tesla1234) and open http://192.168.4.1 for the full web dashboard.

2. With a Flipper Zero in the cabin

Wire four cables (GND, 3V3, TX, RX) between the Flipper top header and the ESP32-C6. Side-load teslacan.fap onto the Flipper.

cd flipper
pip install --upgrade ufbt
ufbt launch

Open the TeslaCAN app from the Flipper Tools menu. You get a live dashboard plus on-screen toggles for FSD, preconditioning, and speed modes — see flipper/README.md for the protocol and wiring details.

3. Scripted from a laptop

Plug a USB-serial adapter into the same UART pins and run the reference Python client:

pip install pyserial
./tools/teslacan_client.py /dev/cu.usbserial-1234 --hello
./tools/teslacan_client.py /dev/cu.usbserial-1234 --stream
./tools/teslacan_client.py /dev/cu.usbserial-1234 --precond on

The wire protocol is plain ASCII (EVT … / CMD … lines) and is fully documented in include/uart_bridge.h.

Build & flash

git clone https://github.com/tuncasoftbildik/tesla-can-mod.git
cd tesla-can-mod
pio run                  # build
pio run -t upload        # flash over USB-C
pio device monitor       # watch serial logs

Build flags

Edit platformio.ini to customise:

build_flags =
    -D HW4                        ; vehicle handler: HW4 / HW3 / LEGACY
    -D DRIVER_TWAI                ; ESP32 native CAN driver
    -D TWAI_TX_PIN=0
    -D TWAI_RX_PIN=1
    -D PIN_LED=8
    -D FORCE_FSD                  ; always enable FSD (omit for UI-gated)
    -D FLIPPER_UART_ENABLE        ; enable the Flipper bridge
    -D FLIPPER_UART_TX=4
    -D FLIPPER_UART_RX=5
    -D FLIPPER_UART_BAUD=115200
    -D FLIPPER_FW_VERSION=\"0.2.0\"

Project layout

tesla-can-mod/
├── src/
│   └── main.cpp                 # entry point — CAN + LCD + WiFi + UART loop
├── include/
│   ├── handlers.h               # HW4 / HW3 / Legacy CAN handlers
│   ├── uart_bridge.h            # Flipper Zero UART protocol bridge (v0.2.0)
│   ├── can_helpers.h
│   ├── can_frame_types.h
│   ├── shared_types.h
│   ├── log_buffer.h
│   ├── lcd_display.h
│   ├── User_Setup.h
│   ├── drivers/
│   │   ├── can_driver.h
│   │   └── twai_driver.h
│   └── web/
│       ├── web_server.h
│       └── web_ui.h
├── flipper/                     # Flipper Zero companion FAP (new in 0.2.0)
│   ├── application.fam
│   ├── teslacan_app.{c,h}
│   ├── teslacan_uart.{c,h}
│   └── README.md
├── tools/
│   └── teslacan_client.py       # Python reference client
├── TESLA_CAN_BATTERY_REFERENCE.md
├── TESLA_CAN_STEERING_REFERENCE.md
├── platformio.ini
├── CHANGELOG.md
└── README.md

Roadmap

  • OTA firmware update over WiFi
  • SD-card CAN bus logger
  • Motor torque/power live view (0x108, 0x1D8)
  • 0–100 km/h performance timer
  • Chassis CAN support via second transceiver — steering-mode toggle
  • Model S / X (Palladium) handler
  • Grafana / Prometheus exporter from the WiFi side
  • Flipper Zero settings scene (per-toggle on/off, stream-rate slider)
  • Sub-GHz pairing as wire-free Flipper alternative
  • Star-history badge once we cross 100 ⭐

Contributing

PRs, issues, and CAN-signal observations from other Tesla owners are welcome. Useful starting points:

  • Port the firmware to a new hardware variant by adding a new Handler subclass under include/handlers.h
  • Add a new event type to the UART bridge and the Flipper companion
  • Improve the Flipper UI — proper icons, a per-toggle settings scene, ban-detection alerting

Run the firmware in listen-only mode (set FORCE_FSD=0 and disable TX) on a test bench first. Never push a change to the car bus you have not bench-validated.


⚠ Disclaimer

This software is provided "AS IS" without warranty of any kind. Using, downloading, installing, or modifying it means you accept all responsibility for any consequences, including but not limited to:

  • Vehicle damage, malfunction, or safety hazards
  • Voiding your vehicle's warranty
  • Violation of local, state, or federal laws and regulations
  • Personal injury or property damage
  • Any legal consequences arising from vehicle modification

This software modifies safety-critical vehicle systems via the CAN bus. Incorrect use can result in loss of vehicle control, accidents, injury, or death. The authors and contributors are NOT liable for any damages, losses, or legal issues resulting from the use of this software.

This project is intended for educational and research purposes only. Use at your own risk.


Türkçe

TeslaCAN nedir?

TeslaCAN, Waveshare ESP32-C6-LCD-1.47 için açık kaynaklı bir CAN-bus modifikasyon firmware'idir. Tesla Model 3/Y'nin teşhis portuna bağlanır ve şunları sunar:

  • FSD aktivasyonu — CAN frame seviyesinde (araçta aktif FSD aboneliği gerekir)
  • Sürücü dikkat (nag) bastırma + ISA hız uyarı sesi bastırma
  • Batarya telemetrisi: gerçek zamanlı SoC, voltaj, akım, güç, pack sıcaklığı, Wh/km
  • Batarya ön koşullandırma tetikleyici — şarja takmadan önce paketi ısıt
  • Dahili 1.47″ renkli LCD — telefon olmadan da canlı veri
  • WiFi AP + web paneli (http://192.168.4.1)
  • Flipper Zero companion uygulaması — 4 kabloluk UART üzerinden (bkz. flipper/README.md)
  • Referans Python istemcisi (tools/teslacan_client.py) — ekstra donanım olmadan scripting & test için

Rakiplerle karşılaştırma

TeslaCANhypery11/flipper-tesla-fsdS3XY Commander
Tek başına kullanım (Flippersız)✅ LCD + WiFi dashboard❌ Flipper zorunlu
Flipper Zero companion✅ MVP (bu sürüm)✅ Olgun
WiFi 6 + BLE 5.0✅ ESP32-C6⚠ Klasik ESP32Proprietary
Açık kaynak✅ MIT✅ GPL-3.0
Web dashboard✅ Dahili APApp içinde
DIY maliyet~₺850~₺500₺7,000+
TR/EN dokümantasyon

Üç kullanım modu

1. Tek başına: Araçta ESP32-C6 çalışır, LCD canlı veri gösterir. Telefon TeslaCAN WiFi'sine bağlanır (parola tesla1234), http://192.168.4.1 adresinde tam web paneli açılır.

2. Flipper Zero ile: Flipper'ın üst GPIO header'ı ile ESP32-C6 arasına 4 kablo çek (GND, 3V3, TX, RX). teslacan.fap'i Flipper'a yükle:

cd flipper
pip install --upgrade ufbt
ufbt launch

Flipper'da TeslaCAN uygulamasını aç. Canlı dashboard + FSD, preconditioning, hız modu toggle'ları menüden erişilebilir.

3. Laptop'tan script ile: USB-serial adaptörü aynı UART pinlerine bağla, Python referans istemcisini çalıştır:

pip install pyserial
./tools/teslacan_client.py /dev/cu.usbserial-1234 --stream
./tools/teslacan_client.py /dev/cu.usbserial-1234 --precond on

Derleme

git clone https://github.com/tuncasoftbildik/tesla-can-mod.git
cd tesla-can-mod
pio run                  # derle
pio run -t upload        # USB-C ile yükle
pio device monitor       # serial logları izle

Yol haritası

  • WiFi üzerinden OTA güncelleme
  • SD kart üzerinde CAN bus loglama
  • Motor tork/güç canlı izleme (0x108, 0x1D8)
  • 0-100 km/s performans zamanlayıcı
  • İkinci CAN transceiver — chassis CAN + direksiyon modu değiştirme
  • Model S / X (Palladium) handler
  • Grafana / Prometheus exporter
  • Flipper Zero settings scene (toggle başına on/off, stream hızı slider)
  • Sub-GHz eşleştirme — Flipper için kablosuz alternatif

Sorumluluk Reddi

Bu yazılım herhangi bir garanti olmaksızın "OLDUĞU GİBİ" sunulur. Kullanan kişi, araç hasarı / arıza / yasa ihlali / yaralanma / ölüm dahil tüm sorumluluğu kabul eder. Bu yazılım, güvenlik açısından kritik CAN sinyallerine yazar. Sadece eğitim ve araştırma amacıyla kullanılır. Kendi sorumluluğunuzdadır.


Built with ESP32-C6 · PlatformIO · Adafruit GFX · Flipper Zero SDK

Made by @tuncasoftbildik · Changelog · Issues · License