Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ESP32 V2V Mesh Module

GitHub: Carputer-project/esp32_mesh_module

Vehicle-to-vehicle mesh network module. Broadcasts beacons and relays alerts between nearby cars using ESP-NOW multi-hop.

Hardware

Component Cost
ESP32 DevKit ~$3-5
Total ~$3-5

Architecture

[Car A] ──mesh──> [Car B] ──mesh──> [Car C]
   │                  │
   └── body controller ← TCP/UART ── mesh ESP32

Each car has a dedicated mesh ESP32 that talks to its body controller via TCP/UART. The mesh module handles:

  • Beacon broadcast (vehicle presence)
  • Alert relay (alarm, hazard, emergency)
  • Hop routing (multi-car forwarding)

Key principle: Each radio has one job. Mesh module does NOT handle WiFi AP, sensor data, or phone connections.

Mesh Protocol

Port Protocol Purpose
5010 UDP broadcast Beacons + vehicle data (speed, RPM, gear)
5011 UDP unicast Remote commands (fob/phone → body controller)
5012 UDP broadcast Alarm events

Beacon Format

{
  "id": "module_hash_id",
  "vin": "vehicle_vin",
  "type": "mesh",
  "data": {
    "speed": 60,
    "rpm": 2500,
    "gear": 3,
    "alert": false
  }
}

Hop Relay

Beacons are forwarded up to 3 hops with TTL decrement. Each module tracks seen beacons to prevent loops.

Build & Flash

cd esp32_mesh_module
pio run              # Build
pio run --target upload  # Flash

Dependencies

  • ESP32 Arduino core (built-in ESP-NOW support)
  • ArduinoJson — JSON parsing (v7)

Security

  • Module identity: prefix + hash(MAC + VIN + salt) — unique per module per car
  • HMAC authentication for relay commands
  • Nonce window prevents replay attacks
  • 4-digit PIN pairing for initial setup

About

ESP32 V2V mesh module — vehicle-to-vehicle communication, beacon broadcast, hop relay

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages