# BAP Protocol Overview **Bedien-und Anzeigeprotokoll (BAP)** - "Control and Display Protocol" is a structured, event-based communication protocol developed by Volkswagen Group. It defines how control units communicate across the CAN bus or via IPC, primarily in PQ and MQB platform vehicles. ## Core Concepts BAP manages ECU communication in Volkswagen Group vehicles, succeeding DDP (Diagnostic Data Protocol). Instead of traditional broadcast-style communication (e.g., cyclic data broadcasted every 10ms), BAP transmits data once and updates only as necessary. ### Key Terminology - **FSG (Funktionssteuergerät)**: Function Control Unit - generates data without HMI/display capability - **ASG (Anzeigesteuergerät)**: Display Control Unit - displays data to the user/driver with HMI capability - **LSG (Logisches Steuergerät)**: Logical Control Unit - sub-devices within an ECU, identified by `lsg_id` - **FCT (Function ID)**: Specific data/services provided by each LSG [[Opcodes and Function IDs]] - **Opcodes**: Operation types used in BAP messages (Get, Set, Status, Error) ### Communication Rules - Communication is always between FSG and ASG - No ASG-to-ASG or FSG-to-FSG communication - Each control unit has at least one logical ID (`lsg_id`) - Most control units have multiple `lsg_ids` (e.g., telephone-menu and telephone-screen have different IDs) [[Services Overview]] ## Architecture Features ### Event-Driven Design - **No constant polling** - Data sent only when changed - **Reduced bus load** - Fewer messages vs broadcast protocols - **Responsive updates** - Near real-time without overwhelming the network - **Intelligent caching** - ASG maintains current state locally ### Protocol Capabilities - **Standardized messaging**: Fixed header with variable payload - **Multi-platform support**: PQ and MQB implementations - **Error resilience**: Automatic retransmission and state synchronization - **Multi-frame support**: For messages >6 bytes [[Header and Multi-frame]] ### Relationship to TP2.0 BAP shares architectural patterns with Transport Protocol 2.0 (TP2.0): - Both use segmented multi-frame messages - Both define stateful communication sequences - BAP reuses concepts like transaction IDs, acknowledgements, and heartbeat timers - However, BAP is self-contained, combining both transport and application layers ## ECU Configurations ### 1. FSG (Führendes Steuergerät) - Main/master control unit that generates data - Initiates communication and sends status updates - Configured with specific functions to expose - Implements heartbeat generation ### 2. ASG (Angesteuertes Steuergerät) - Secondary/controlled unit that displays data - Requests data and sends commands to FSG - Maintains cache of received values - Handles user interactions ### 3. Small FSG - Resource-constrained implementation - Reduced feature set optimized for memory usage - Limited to essential functionality - Optimized message handling ## Real-World Applications ### Cluster-to-Module Communication ``` Phone Module (FSG) ←→ Instrument Cluster (ASG) ├── Phone connection status → Cluster display ├── Signal strength indicator → Dashboard icons ├── Battery level display → Status symbols └── Incoming call alerts → Cluster notifications ``` ### Infotainment-to-Module Integration ``` Radio/MIB2 (ASG) ←→ Various Modules (FSG) ├── Climate Control → Temperature settings, fan status ├── Rear View Camera → Video stream control, guidelines ├── Parking Sensors → Distance warnings, visual alerts ├── Phone Interface → Contact lists, call management └── Media Players → Track info, playback control ``` ### Communication Flow Example ``` User connects iPhone → Phone Module (FSG) detects connection ↓ Phone Module sends StatusArray(DeviceName: "iPhone", Status: Connected) ↓ Cluster (ASG) receives update → Updates dashboard display ↓ User sees "iPhone Connected" + signal/battery icons ``` ## Platform Implementations ### PQ Platform - **11-bit CAN IDs** with LSG/FCT in message payload - **Software message filtering** for protocol routing - Vehicles: Golf 6, Passat B7, Tiguan 5N generations ### MQB Platform - **29-bit extended CAN IDs** with LSG embedded in identifier - **Hardware CAN filtering** for improved performance - **Enhanced multi-frame handling** with reduced overhead - **Future-ready architecture** for advanced infotainment systems ## Common LSG ### Communication & Entertainment - **Telephone (LSG 0x28)** - Call management, contact integration - **Phonebook (LSG 0x29)** - Contact lists, SMS, call history - **MDI (LSG 0x30)** - Media device interface, playback control - **Secondary Display (LSG 0x2B)** - Cluster phone/media display ### Vehicle Systems - **Parking Sensors (LSG 0x0A)** - Distance measurement, warning alerts - **Rear View Camera (LSG 0x0B)** - Camera control, guideline overlay - **Climate Control (LSG 0x01)** - HVAC settings, temperature control - **Homelink (LSG 0x14)** - Garage door programming and control ### Advanced Features - **Lane Assist (LSG 0x1A)** - Driver assistance systems - **Traffic Sign Recognition (LSG 0x21)** - Sign detection and display - **Power Rear Gate (LSG 0x1F)** - Automated trunk/liftgate control ## Benefits Over Traditional Protocols ### Near Real-Time Serialized Data Flow BAP enables controlled, event-driven updates: - Climate module sends temperature changes only when adjusted - Phone module pushes connection status on state changes - Camera module streams control data during reverse gear engagement - Sensor modules report warnings only when thresholds are exceeded ### Result - Reduced CAN bus load with responsive, real-time user experience - Modular system architecture with centralized control - Function-based addressing for specific services - Multi-platform scalability for current and future vehicles ## Documentation References ### Core Protocol Documentation - [[core/Opcodes and Function IDs|Opcode Reference & Function IDs]] - Complete opcode definitions and standardized FCT IDs - [[Header and Multi-frame]]- Protocol framing and segmentation ### Platform-Specific Guides - [[platforms/pq-implementation|PQ Platform Details]] - 11-bit CAN implementation - [[platforms/mqb-implementation|MQB Platform Details]] - 29-bit extended CAN implementation ### Service Documentation - [[Services/Services Overview|LSG Services Index]] - Complete list of all BAP services - [[Services/0x2B (Secondary Display)/Secondary Display Overview|Secondary Display (0x2B)]] - Phone/media display in cluster