**English** | [中文 (Chinese translation)](README.zh-CN.md) | [繁體中文](README.zh-TW.md) | [Русский (Russian translation)](README.ru.md) | [한국어 수정본](README.ko.md) | [Español](README.es.md)

Idrive Custom Apps

Custom apps for the BMW MGU head unit (iDrive 7), drawn by their own GPU render engine at a true 60 fps.
Plus a complete kit to build your own.

60 fps OpenGL ES 2 GPU time iDrive 7

Redline: full-screen rev bar, shift lights and gear, animated at 60 fps

Redline on the windscreen head-up display: Comfort set up as a small Pill in the corner on the HUD looks page, Sport flicking through the layouts, graded shifts, then the tyre widget and directions in the corner
Redline on the head-up display, set up on the centre screen. Watch in HD

Real electric range, battery health and a charge log for plug-in hybrids, and live battery power, cell temperatures and climate power use. A sport cluster with boost, fuel pressures, ignition timing, misfires and tyre data. Shift lights and a full-screen tach, also on the windscreen head-up display, a virtual dyno, brake and drag timers, a G-meter, an oil warm-up guide, a fault-code scanner / cleaner, the car's service items, live data and a trip computer, ambient light colours by driving mode, exhaust flap control, a ZF 8HP gearbox monitor, and Doom for when you're parked. They run on the car's own app platform, use the HMI's real buttons and settings menus, read live vehicle data and survive reboots. Everything can be removed again with one command. > **Disclaimer.** This is an unofficial hobby project. It is not affiliated with, endorsed by > or supported by BMW AG. You modify your own head unit at your own risk. Use the apps parked > or on a closed track, and keep your eyes on the road. The Fault Scanner can clear fault > memories in every control unit of the car, so read the codes first. --- ## Not a PNG slideshow: a custom render engine BMW's app platform has one way for an app to show custom graphics: draw a picture in JavaScript, compress it to **PNG**, and hand it to the HMI, which decodes it and puts it in an image box. It's the only route the SDK offers for custom graphics, and it tops out at a handful of frames per second: on the head unit's Atom CPU, just compressing one 1600 × 520 PNG takes about 60 ms, before anything is drawn or sent. These apps don't do that. They ship with **`mgu-renderd`**, a render engine in C on OpenGL ES 2 (since 2.0 [mgu-render](kit/renderd/README.md#the-engine-mgu-render) by Robert Nisipeanu and IterioDev, grown out of this project's first engine). An app doesn't send pictures at all: it sends a few kilobytes of **drawing commands** per frame, and the engine draws them on the head unit's Intel GPU, on its own compositor layer, in step with the display's refresh. Result: **a true 60 fps**, with needles and bars that glide instead of jump.

The same Redline frames shown at 10 fps (PNG path) and at full rate (GPU engine)
Top: the same frames held at 10 fps, the PNG path's typical rate. Bottom: every frame, as the engine draws them.

| | Stock way: PNG images | `mgu-renderd` | |---|---|---| | **What the app sends** | a compressed bitmap per frame | drawing commands, a few KB per frame | | **Who draws** | JavaScript on the CPU, pixel by pixel | the Intel HD Graphics 505 GPU | | **Frame rate** | a few fps (PNG encode alone: ~60 ms) | **60 fps**, paced by the display | | **Motion** | values jump from frame to frame | spring-smoothed gauges, every frame | | **Screen space** | the HMI's image box, its title bar and 120 px button bar | full screen: tabs in the HMI's title strip, no button bar | **Measured on a real car** (head unit app logs, 10-second averages): | App | Frame rate | GPU time per frame | App (JavaScript) time per frame | |---|---|---|---| | M Vitals | 60-61 fps | 1.0-1.3 ms (peak 11 ms) | 2-5 ms | | eDrive | 60-61 fps | 1.0-1.2 ms | | | G-Force | 56-61 fps | 1.3 ms | | A frame has 16.7 ms at 60 fps. The GPU needs about one of them, so there is plenty of headroom. Static parts (cards, dial faces, scales) are drawn once and cached on the GPU. If the engine isn't installed, the same apps fall back to the PNG path automatically (same code, same look). ``` app (Node.js) ── drawing commands ──▶ mgu-renderd (C, OpenGL ES 2) ──▶ own layer above the HMI │ Unix socket, per frame Intel GPU, synced to vsync (input still goes to the HMI) └── buttons, settings, tiles: BMW's own HMI widgets, so the iDrive controller and touch work as usual ``` More in [How apps draw](#44-how-apps-draw-remote-hmi-rhmi) and [`kit/renderd`](kit/renderd/README.md). --- ## Gallery
Redline
Redline: Live Cockpit rev bar, big gear, shift scoring
Redline on the windscreen HUD: Standard, Arc, Ramp and Dial layouts on the demo drive
Redline on the windscreen HUD (cluster-render): shift lights early by your reaction time, gear, grades and readouts; Standard and the M-style Arc, Ramp and Dial
Redline's HUD looks page
Redline HUD: nine layouts, picked and edited by picture on the app's HUD looks page
M Vitals engine page
M Vitals: rpm, boost, speed + gear, power, torque
M Vitals chassis page
M Vitals: g-force, tyre pressures + temperatures, xDrive split
M Vitals fuel and ignition page
M Vitals: intake air, HPFP / LPFP fuel pressure, ignition timing, boost and air charge targets, misfires per cylinder
G-Force
G-Force: friction circle with trail, grip envelope, peaks, records
Drag Timer
Drag Timer: live speed trace, splits, ¼ mile
Brake Test
Brake Test: 100-0 distance, deceleration trace, fade
Warm-Up
Warm-Up: time to working temperature, safe rev limit
Virtual Dyno
Virtual Dyno: power and torque curve from a pull, against the engine computer's torque
Fault Scanner
Fault Scanner: fault codes of every control unit, with their texts; Check Control messages
Ambient config, colour page
Ambient config: any colour on the colour ring, whole car or upper / lower lights, brightness; driving-mode colours, animations and favourites
Service
Service: service requirements, next service, details per item; an Engine page with oil life, spark plugs, engine hours and the particulate filter
Transmission Config, live page
Transmission Config (ZF 8HP, experimental): live oil and electronics temperatures, gear, shaft speeds, converter clutch
Transmission Config, clutch adaptations
Transmission Config: clutch fill adaptations A–E, shift maps, temperature history
eDrive
eDrive: real electric range, battery charge, last charge, this drive
eDrive charge log
eDrive: charge log with cost and totals
eDrive energy page
eDrive: live battery usage, regen, where the power goes now
eDrive battery page
eDrive: battery health, every cell's voltage, temperature
eDrive on a 48 V mild hybrid
eDrive on a 48 V mild hybrid: the 48 V battery, the DC/DC converter and the 12 V battery
eDrive without a hybrid system
eDrive without a hybrid system: the 12 V battery's charge from the DME with Ah left, what it is doing (charging, regen, supplying), voltage, this drive's regen and charging time
eDrive 12 V history
eDrive without a hybrid system, History: the last hour's voltage and charge, the charge the car recorded and the time per charge band
Live Data, a screen of gauges
Live Data: a screen of your own, sport-display bar and numbers
Live Data, dial layout
Live Data: the same screen as a dial and two numbers
Live Data, car signals
Live Data: every signal the car sends the head unit, live
Live Data, engine values
Live Data: the engine unit's values in groups, read live
Live Data, trips
Live Data: the trip computer, distance, fuel and cost per trip
Engine Config, exhaust flap
Engine Config: exhaust flap open, closed, handed back to the car (OEM) or following the driving mode (Sport open, Eco Pro closed), held against the DME's timeout
Engine Config, exhaust flap closed
Engine Config: flap closed, the selected mode in red; Close handed back to the car above a set engine speed
Engine Config, engine map
Engine Config (tuned DME, experimental): engine map 1–4, Max Cooling, burbles and Active Sound as tabs, for the tuning software picked in Settings (shown here without a car)
Doom
Doom: Freedoom in full resolution across the whole screen, on the iDrive controller, saves itself
Every animation is recorded offline from the app's built-in demo drive through the engine's own drawing code (`mgu-renderd --replay`, see [6.3](#63-preview-build-deploy)), over the HMI's back arrow and status icons, in the default M Tricolour theme, as the car shows them: pages and Settings as tabs in the header, no button bar. GIFs play at 50 fps at most; the car shows 60. Every app also has M Red, Ice White and Night Amber themes. In the car the same screens show live data. --- ## Contents - [Not a PNG slideshow](#not-a-png-slideshow-a-custom-render-engine) · [Gallery](#gallery) 1. [The apps](#1-the-apps) 2. [What you need](#2-what-you-need) 3. [Quick start](#3-quick-start) 4. [How the head unit works](#4-how-the-head-unit-works) 5. [How the apps get onto the unit](#5-how-the-apps-get-onto-the-unit) 6. [Writing your own app](#6-writing-your-own-app) 7. [Vehicle signals reference](#7-vehicle-signals-reference) 8. [Troubleshooting and gotchas](#8-troubleshooting-and-gotchas) 9. [Known limits](#9-known-limits) 10. [Repository layout](#10-repository-layout) See also the [privacy audit of the stock head unit](https://github.com/cauliflowermossgrape/idrive7-privacy-audit): what it sends to BMW, what it stores, and how voice control works. --- ## 1. The apps Every app has a settings screen in the HMI's own style: four colour themes (M Tricolour, the default, M Red, Ice White, Night Amber), units, how often the speed readout changes (5 times a second like BMW's cluster, up to 60), and a demo mode. Results and records are saved on the unit and kept across reboots. | App | What it does | |---|---| | **Redline** | On the centre screenOn the windscreen HUD, by @biscotit (experimental, needs cluster-render)It learns your car (shown, frozen or reset on the Learned page)Details in apps/redline/README.md. | | **Virtual Dyno** | Do a full-throttle pull in one gear and get a power and torque curve, calculated from acceleration, car weight, air drag and rolling resistance. Settings for weight, body shape, drivetrain loss, hp/PS/kW and Nm/lb-ft/kgm. The rpm axis on Auto ends at 6000 for a diesel and 8000 for a petrol (*Engine* setting, as in Redline). Runs are saved; pin one as a baseline to see ± on every new pull. Optional overlay of the engine computer's own torque reading. | | **Brake Test** | 100-0 and 200-0 km/h (or 60-0 and 100-0 mph): distance, time, peak deceleration and a deceleration trace. The start crossing is interpolated between samples, so results don't depend on the sample rate. Optionally, stops corrected to a flat road (the slope is read standing after the stop). A brake-fade chart compares your last stops and warns when distances grow. Bests plus full history. | | **Drag Timer** | Standing 0-50, 0-100, 100-200, 0-200 km/h (0-30, 0-60, 60-130, 0-100 mph), ⅛ and ¼ mile (plus 1000 m or ½ mile) with trap speeds; rolling 100-200 and 200-250 km/h (60-130 and 130-160 mph; 250-300 km/h as an option) timed from any pull, no stop needed; one custom speed window; the road's slope under every result, with downhill runs past the limit kept out of the best times; a Dragy-style VALID / INVALID verdict per run; the outside air with each run (temperature, pressure from the engine unit, density altitude) and optionally times corrected to standard air (SAE J1349) and to a flat road; top speed, elevation and upshifts per run; interpolated splits, optional one-foot rollout, a live speed trace, best times and run history. | | **G-Force** | Friction circle with a fading trail and a grip envelope that grows as you use more grip in each direction. Live lateral/longitudinal bars, session peaks per direction, time spent above 0.5 g, all-time records. The g numbers update at the *G-force display rate* (10 a second by default); the dot and trail move at full frame rate. | | **Warm-Up** | Oil and coolant gauges and a warm-up calculator: minutes and clock time until oil and coolant reach working temperature, from the measured warm-up rate (typical rates until enough is measured, "engine off" when a hybrid drives electric), projected on a temperature trend graph. A safe rev limit that rises with oil temperature (from the cold limit to the redline; both on Auto follow the *Engine* setting: diesel 3000 to 5000 rpm, petrol 3500 to 7000), and a turbo cool-down countdown after hard driving (high rpm or high power: 30 s to 3 min of gentle driving, depending on how long you drove hard). | | **M Vitals** | A sport cluster: rpm, boost (pressures in bar, psi or kPa), speed with the gear (D / S / M + number), power from the iDrive sport display (its % × your car's max power, so stock or tuned engines both read right; kW, hp or PS) and torque (Nm, lb-ft or kgm; in kgm the bar ends at the *Torque gauge max (kgm only)* setting, 100 kgm by default, e.g. 40 for a G20 320i like its factory sport display), coolant and oil temperature, g-forces and more, over several pages, with peak values. A Fuel & ignition page shows intake air temperature (IAT), high-pressure fuel (HPFP / rail) and low-pressure fuel (LPFP) pressure, ignition timing, boost target against actual boost and requested against actual air charge (with a 5-minute trace of both, BMW DME DIDs 4AB0 / 580B / 480C / 5813 with OBD PID 0x70 as the fallback) and the misfire counter of every cylinder (this driving cycle, OBD service 06; on a V8 with two engine units bank 2's from the second unit), read from the DME over UDS / OBD (standard OBD data IDs, adjustable in `app.json` config.dme), plus how much warmer the intake air is than outside; the Thermals page adds the gearbox temperature from the gearbox unit (EGS, config.dme.egs). Each of these has an Auto / Show / Hide setting, and the tiles share the screen: whatever the car doesn't answer is left out. Tyre pressures (against the car's target) and temperatures are shown large on the Chassis page; its xDrive card can be set to Auto (shown once the car reports all-wheel drive), Show or Hide for rear-wheel-drive cars. When the car's own torque split signal sends nothing, the card reads the torque going to the front axle from the transfer case unit (LMV, UDS `22 DB32`, `app.json` config.xdrive) and estimates the split from engine torque and the gear; the card says where its number comes from. Boost, gearbox oil temperature, the tyre card and tyre temperatures have the same Auto / Show / Hide setting: Auto shows them once the car has sent real data, and a hidden item gives its space to the others. Values outside a plausible range (a tyre at 255 °C) and fields that never change (gearbox oil stuck at 0 °C) count as no data; the raw values the car sends for these go to the log (`raw tyre temperature`, `raw gearbox oil`, `raw FES boost`), to calibrate `app.json` config.scaling. Boost comes from the sport display, or, when that sends nothing usable, from the DME over OBD (charge / manifold pressure minus outside air pressure, candidates in config.dme.boost); the setting Boost from picks one by hand. On a V8 with two engine units, bank 2's boost from the second unit sits beside bank 1's, in the warning colour when the two banks are more than 0.2 bar apart. Dials run from blue to red as they near the redline / boost limit. The rpm bar ends at 6000 for a diesel and 8000 for a petrol, from the *Engine* setting (Auto / Diesel / Petrol, as in Redline); the redline on Auto is 5000 / 7000, on a V8 with two engine units 6500 for an N63 and 7200 for an M car's S63 / S68 (the engine unit's VIN maker code says which: WBS is BMW M GmbH; a US-built X5 / X6, 5YM, keeps 7000; only that code is kept). Redline (4000-9000) and *Rev scale up to* (5000-10000) can be set by hand, as in Redline. | | **Fault Scanner** | Scans every control unit for stored fault codes (UDS over the head unit's diagnostic gateway), shows them per module with status, shows live Check Control messages, and can clear fault memories (two-press confirm). Fault texts come from your car's own coding-tool export (`kit/tools/dtc_texts.py`), a few hand-written ones, and, if you import one, a fault text database for every control unit (`kit/tools/dtc_texts.py --db`): units with faults are then asked their SGBD index (UDS 22 F1 50), which picks their texts and their name. Only English texts are imported (one with German in it is left out, and that fault shows no text). A fault code list (CSV, `kit/tools/dtc_texts.py --codes`) fills in faults that still have none, for the units its texts belong to. Fault text tables (the `dtc_scanner_*.json` files, `kit/tools/dtc_tables.py`, after `--db`) add a text for each unit type and each address. The build packs the whole database into one compressed file (`dtc_db.pack`: about 19 MB of texts in 3.7 MB, `kit/tools/pack_data.py`), and the app only unpacks the few KB that hold the codes it shows. The repository ships the fault text tables already packed (`apps/dtc_scanner/dtc_db.pack`: the tables and the SGBD index, used with permission); a local `dtc_db/` folder you import replaces it. Imported databases and car exports stay out of git. | | **eDrive** | For plug-in hybrids / EVs: real electric range that adapts to how your car is driven: the charge above the point where the engine starts, divided by what the car uses per km for driving (learned from electric-only driving, last ~60 km) plus what climate control and the on-board electrics draw per hour (heating when cold, A/C when hot, learned per outside-temperature band while standing or creeping with the engine off). Driving is learned per speed band (under 35, 35-60, 60-85, 85-110, over 110 km/h) and the range uses your current pace, so motorway driving shows less range than town. The climate's draw is also learned while driving (what it uses above the same speed with the climate off), seat and steering-wheel heating are counted from their levels, and an Energy page shows use per speed band, where the power goes now (driving, climate, seats, wheel, on-board, with the km each costs), the car's own power distribution figures and the HV battery temperature (also on the Range page). The climate draw costs range by the hour, so it costs more of it in slow traffic; the screen shows it in kW and the km it costs. Whether climate control is on comes from the car itself (ClimateMaster `statusClimateSystemOn`): switched off, only the on-board electrics (learned separately, typically 0.3 kW) are taken off and the range goes up; switched on, it goes down again (shown as CLIMATE ON / CLIMATE OFF, with A/C when the A/C button is on). Until it has learned, the range comes from the outside temperature (a full battery gives 50 km at 20 °C, 40-45 km at 10 °C, 30-38 km at 0 °C, 20-30 km at -10 °C, scaled to your own 20 °C range), shown with its low-high spread, battery health (SOH: how much a full charge holds compared to new, in % and kWh) and the energy in the battery now (kWh; the battery size when new is a setting, e.g. 12 kWh for a 330e / 530e, 24 kWh for an X5 45e). Also shows the last HV battery charge (+%, kWh, km added; a charge done while the head unit slept shows at the next start; one charge from plugging in until the car drives off, however often the car wakes during it) and the 12 V battery voltage. A charge log page lists every charge (date, % and kWh added, range added, cost from your electricity price, 0.25 €/kWh by default) with monthly / all-time totals and a 14-day chart. It finds the car's system by itself (or set Drive system): on a plug-in hybrid all of the above; on a fully electric car (BEV, made for the iX3 G08: found by itself when the battery unit reports more than 45 kWh usable, or set Drive system to Fully electric) the same pages without the engine: the range counts down to 0 % (or a set 5-20 %) and is learned from all driving, the charge comes from `E5CE` (the iX3 answers `DDBC` with zero bytes), the kWh per % and the health from the battery's own usable kWh (`E5C7`) against the usable kWh when new (74 kWh by default), the live power from `E54D` x `E561` (or a voltage estimated from the charge, shown with ~), the Battery page's cells from the lowest and highest cell's charge when no cell voltages answer, slow AC charges are logged too, and the engine and gearbox units are never asked (the iX3's identifiers, their scaling and the replies `test_edrive.js` uses come from the [OBDb](https://github.com/OBDb) captures of the [iX3](https://github.com/OBDb/BMW-iX3) and [iX](https://github.com/OBDb/BMW-iX), CC BY-SA 4.0); on a 48 V mild hybrid (no high-voltage battery, the 48 V battery answers) a page of its own with the 48 V battery's charge, voltage, power, health and temperature, the DC/DC converter's mode and both its sides, and the 12 V battery; on a car with neither, the 12 V battery: its state of charge as the DME's energy management keeps it (40AD) with the Ah left and the five values before it, the capacity registered in the DME (40A9), the voltage with what the battery is doing (CHARGING, REGEN when it charges while the car slows down, SUPPLYING while the alternator rests), the battery sensor's current and power or, on DMEs that give none (a G20 320i's answers 402B with all FF and refuses F442), the voltage of the last 2 minutes, health, temperature, the alternator's current and this drive's regen and charging time; a History page with the last hour's voltage and current (or charge) and the time the battery spent per charge band. The voltage keeps coming from the source that answered (F442, OBD 42, the gearbox unit, ...). Read-only; parked (not driven for 3 min, the page not used for 10 min) it stops reading so the car can sleep. Charge and SOH are read from the battery control unit over UDS; a Diagnostics page shows the raw replies so the DIDs can be adjusted per model in `app.json`. | | **eDrive: live pages** | eDrive's live values (`apps/edrive/live.js`), set up for the X5 xDrive45e (24 kWh) and adjustable for other plug-in hybrids. **Battery:** the HV battery's power now in kW (pack voltage x current from the battery unit, read every second; + driving, - regen or charging) on a bar from the most regen to the most drive power the battery allows right now, a two-minute trace, cell temperature and coolant; every cell's voltage as a bar (lowest / highest marked, the spread between them); and this drive: energy used, regen, net, how much of it went to driving and to the climate, and peaks (Reset drive totals in the menu starts a new one). **Climate on the Energy page:** standing still with the engine off and not plugged in, the pack feeds only the car's own consumers, so that draw minus the on-board baseline (learned with the climate off) is what heating / A/C really use; the Energy page's climate row shows that measurement (or the climate unit's own figures) instead of the estimate. Values come from the battery unit (SME) over UDS: `DD68` pack voltage, `DD69` current, `DDBF` cell voltages, `DDC0` cell temperatures, `DD6C` coolant, `DD7D` current limits (BMW's identifiers as OVMS decodes them on the i3); a Diagnostics page shows the replies, and `powerSign` flips the direction if a car reports current the other way. The **home-screen widget** (`startWidget`) shows live power, state, V / A, charge, a power bar, cells and this drive (big widget), or the same as text lines (small one) (Home-screen widget: picture keeps it clear of the HMI's fade at the edges: Medium or Small); the Battery unit and Scan pages come with the Diagnostics pages setting. | | **Live Data** | Live values from the car and its control units, and nothing but reading. **Gauges:** screens of your own made of dials, sport-display bars and big numbers (with the last 5 minutes as a trace); tap a gauge to choose its value from the car signals, the trip computer or the engine unit; one screen can be the home-screen widget. **Trips:** a trip computer that counts every drive in the background: distance, fuel, consumption and cost per trip, the last 5 trips, today, 7 / 30 days. **Signals:** what the car sends the head unit on its own (SOME/IP, nothing asked). **Engine:** the engine unit's values worth a look in groups (oil pressure and level, rail pressures, boost, ignition and knock per cylinder, VANOS, injector corrections, spark plug and particulate filter wear ...), decoding built in for the B58 / B48 / B38 (DME8FF_R). Temperatures in °C or °F (setting). **Units:** every control unit's identification and, with a catalog made from the public SGBD reference (`kit/tools/sgbd_catalog.py`, not in git), every identifier its type lists. Its diagnostic link refuses everything but UDS `22` and OBD-II `01` / `09` before it reaches the car. Details: [apps/live_data/README.md](apps/live_data/README.md). | | **Service** | The car's service requirements (BMW Condition Based Service) as the iDrive's own *Vehicle status > Service requirements* shows them: engine oil, brakes, brake fluid, vehicle check, inspection and the rest, each with the distance and date the car gives (in its own language and units; a language the app's fonts have no glyphs for, such as Korean, shows the item's English name and the date's numbers instead of a "?" per character), coloured green / yellow / red, a summary of the next service, and the item's service hint text as details. Read from the instrument cluster (`KombiInterface_2`). Read-only: these cars offer the head unit no service reset (that is done in the cluster's own menu or by a workshop). | | **Doom** | Freedoom: Phase 1 (four episodes, free game data) running in the head unit as WebAssembly. The engine draws the 3D view in full resolution across the whole screen (1920 x 504, Doom's vertical field of view widened to the screen), with the status bar, menus and messages on top at 4:3; 35 fps on the VM. A main menu (Play / Continue, New game, all settings) comes first; the game then has the screen to itself with no header or button bar, and BACK returns to the menu. **Turn the controller to aim, push it to walk and sidestep, press to fire and open doors, press twice for the next weapon.** While you play, the game has the controller to itself: the HMI ignores the knob, press and tilt, so pushing forward no longer opens the HMI's pull-down menu and pushing left no longer leaves the game. BACK, MENU and the touchscreen always work. This uses the controller gate that `deploy-car.sh` loads into the HMI (see [5.1](#51-what-deploy-carsh-install-does)). Without the gate, the game reads the controller signal itself and the HMI reacts to it too. It pauses when you leave the screen or a popup / call covers it, and saves itself each time, so it carries on where you stopped. Settings, in the main menu: difficulty, episode, move speed (slow walk by default, walk, run), aim speed and direction, render resolution (full / medium / low). GPL-2.0, see [Doom licences](#doom-licences). **Parked only** by default: the game saves and waits while the car drives (setting *Parked only*, can be turned off). | | **Engine Config** | Live engine tweaks as tabs, starting with **Exhaust Flap**: Open the flap, Close it, hand control back to the car (OEM) or let it follow the driving mode (**Drive mode**: Sport open, Comfort / Adaptive OEM, Eco Pro closed, on every change), shown on the rear silencer with the flap's butterfly turning in the right tailpipe and the big state word. Open / Close are sent again every 15 s (*Hold*, the DME lets a tester's command go after ~20 s), and Close is handed back to the car above a set engine speed (*Close: hand back above*, 4,000 rpm by default) or without a live engine speed. **Safe by default** — the *Exhaust Flap* setting ships **Disarmed** (simulated, touches nothing); set it to **Armed** only after you have validated the command on your own car. When armed and a matching DME is detected, it drives the electric exhaust flap over the car's own diagnostic link (UDS `2F 60FD` "EL_AGK", Bosch MG1 / DME8 as used by B48 / B58 / S58 on MGU ID7; OPEN 10 %, CLOSE 90 %, OEM hands control back and the DME self-times the override in ~20 s). The command was confirmed on a real car; other DME variants are unverified, so each owner arms it themselves. **Tuned DME (experimental):** pick the tuning software the car runs in Settings (*Tuning software*: Off, BM3, MHD; ships Off, which sends nothing) and its tabs appear: **BM3** — Engine Map 1–4 and Burbles (written to the DME's memory and confirmed by read-back, only after the BM3 CustomROM is identified) and Active Sound (ASD on / off); **MHD** — Engine Map 1–4 and Max Cooling (each press counts when the DME echoes it). Other tuning software can be added (see the app's README). **xDrive (experimental, ships Off):** switches xDrive off until the next ignition cycle through the DSC's own `LMV_FUNKTION` job (issue #28). It only works with the engine off, in P, parking brake on, stationary, and needs two presses. The DSC reports AWD / RWD once the engine runs, and the ignition cycle brings xDrive back. **xDrive live** (read only, on an xDrive car or with the xDrive setting): the front / rear split, each wheel's slip, the front axle against the rear, steering wheel, yaw rate and g. | | **Ambient config** | The ambient light's colour: set one of BMW's colours by number, or let the driving mode choose (a colour each for Sport, Comfort and Eco Pro, on a plug-in hybrid Sport, Hybrid, Electric and Eco Pro, and Adaptive on cars that have it; *Leave as is* gives your own colour back). It runs from the head unit's start, so the modes work with the app closed. Only the colour is set; brightness and the light's other modes stay as they are. On the Animations tab, Turn signal glow (that side's lights blink green), Open door red and Hazard red (the whole cabin pulses red while the hazards are on) can be switched on; all are off by default. With the car locked and left, it gives the lights back and writes nothing, so the car can sleep. Only for use on private property (hidden until its setting is switched on, off by default): a Strobe tab flashes the high beam. **Police** (the default) flashes one headlight, then both, then the other (4 flashes of 80 ms, tunable: flashes a burst, flash length, order); **Strobe** flashes the high beam and fog lights; **In turn** the left and right lights; up to about 5 flashes a second, the most the head unit's diagnostic link passes. The flashes are the car's own light functions, switched on for a set time by the body controller (`LEUCHTEN_FUNKTION`, BDC / BDC_G11 / BDC_G05), so nothing runs brighter than the car makes it and nothing stays on if the app stops; for police the other LED headlight unit (FLM01 / FLE) is held at its own lights meanwhile. Cars without that job fall back to the headlight units' LED channels (never above the current the car's own lamp test uses) or the body controller's lamp outputs. A light show flashes every outside light in turn for 15 s. At most 30 s a press, then a rest at least as long, at most 2 minutes in any 10, and on FLM01 headlights it stops at 90 °C LED temperature. It needs someone in the car; Stop, switching the setting off or locking and leaving the car stops it and hands the lamps back to the car. If IterioDev's Comfort tool (behind his Ambient Light app) is running, it changes the same lights, so the app stands aside (writes nothing to the lights until Comfort is gone) and says so in red, recommending to uninstall Comfort: one ambient app at a time. | | **Transmission Config** | Experimental ZF 8HP monitor, read from the gearbox unit (EGS) over the head unit's own diagnostic link, no cable: live oil and electronics temperatures, shaft and engine speeds, gear and converter-clutch state; clutch fill-pressure and fast-fill corrections A–E with their evaluation counters; upshift / downshift / skip maps and cold upshift maps; time spent in each of 23 temperature bands; converter and engagement learning; the EGS fault memory; a browser for all 108 records it reads, and the 8HP applied-element reference. Read-only. Verified on a G22 (SGBD `0F25D0`) and read on a G20 330e's hybrid 8HP; any other EGS stops reading unless *EGS variant* is set to *Try any (unverified)*. Every page carries an EXPERIMENTAL badge. Details in [apps/zf8hp/README.md](apps/zf8hp/README.md). | **Experimental:** [Transmission Config](apps/zf8hp/README.md) (ZF 8HP) reads clutch adaptations, shift maps, temperature history and live transmission data; it is read-only, requires the verified EGS variant, has only limited G22 smoke testing (the G20 330e's hybrid 8HP is read too) and displays an EXPERIMENTAL badge. Its synthetic demo is explicit and off by default. The tune tabs of [Engine Config](apps/live_adjustments/README.md) (BM3 / MHD, which replace the former BM3 Live app) are experimental too: they send DME control / write requests once a tune is picked in Settings (*Tuning software* ships Off). Read each app's compatibility notes before use. The driving dashboards switch to a built-in demo drive on the VM or a bench unit without vehicle data after 5 seconds (launch, pull through the gears, a hard stop, corners, an engine warming up from cold). A **DEMO** badge shows when the data isn't from the car. --- ## 2. What you need > Not comfortable with root access, SSH and building? Get [iDrive 7 apps installed for you](https://idriveapps.com/): custom apps for BMW iDrive 7, by iDriveApps. **In the car** - **A BMW with the MGU head unit** (iDrive 7, "ID7"). Developed and tested on firmware `P18_23w44.2`. Other MGU versions very likely work; the installer's `check` step tells you before it changes anything. - **Root shell access to the head unit** (SSH or serial console). **This project does not provide it and cannot publish how to get it.** There are community guides for rooting MGU units; search for them. Everything below assumes you can log in as `root`. - **BMW's app SDK (`oap-sdk`), extracted from your own unit.** It's BMW's copyrighted code, so it isn't in this repository. It is inside every BMW app on your head unit, and [`kit/tools/extract_sdk.js`](kit/tools/extract_sdk.js) rebuilds it from one of them in a second (see Quick start). **On your PC** Windows, macOS or Linux. You need just **Python** and **Node.js**: no Linux, no compiler, no Docker. The GPU renderer comes **prebuilt** in the repository ([`kit/renderd/prebuilt/`](kit/renderd/prebuilt)), and the kit builder checks that it matches the renderer's source. | Tool | Needed for | Required? | |---|---|---| | **Python 3.6+** | `build.py` (packages the apps), `make_kit.py` (packs the car kit) | yes | | **Node.js 14+** | the build (draws the app icons), `extract_sdk.js`, `preview.js` | yes | | **ssh / scp** (OpenSSH) | installing on the car (`push-to-car.sh` / `push-to-car.ps1`) | yes: built into Windows 10/11, macOS and Linux | | **Docker** | recompiling the GPU renderer `mgu-renderd` yourself | only if you change the renderer's C code | | **ffmpeg**, **bash** | `make_gif.sh`: recording animations like the ones above | optional | | **Pillow** (`pip install pillow`) | `bake_fonts.py`: re-baking the fonts | optional | No npm packages: the build uses only Node's and Python's standard libraries. **Windows:** install Python from [python.org](https://www.python.org/downloads/) (tick *Add python.exe to PATH*) and Node.js LTS from [nodejs.org](https://nodejs.org/). That's all. **macOS:** `brew install python node` (Homebrew), or the installers from the same two sites. **Ubuntu / WSL:** `sudo apt install python3 nodejs openssh-client`. Node.js must be 14 or newer: Ubuntu 24.04 ships 18; on 22.04 and older the packaged one is too old, so use [nodejs.org](https://nodejs.org/) or nvm. Check (any OS, in a terminal): ```sh python3 --version # Windows: python --version node --version ``` **Changing the renderer** (`kit/renderd/src`): then you need Docker ([Docker Desktop](https://www.docker.com/products/docker-desktop/) on Windows / macOS, [Docker Engine](https://docs.docker.com/engine/install/) on Linux). The kit builder compiles it in an Ubuntu 18.04 image, so it matches the head unit's libraries (first time: ~550 MB download, a few minutes), always for x86-64 like the head unit's CPU, also on ARM machines like Apple Silicon Macs. It then updates the prebuilt copy for you to commit. If the source has changed and it can't compile it, it says so and asks before packing a kit with the older renderer. --- ## 3. Quick start ### 3.1 Get the SDK from your unit Copy the x_call app that ships in the firmware off the head unit, and extract the SDK from it: ```sh scp root@:'/usr/lib/oap-mainapp/preinstalled_apps/x_call@*.tgz' . mkdir x_call && tar xzf x_call@*.tgz -C x_call node kit/tools/extract_sdk.js x_call/javascript/app.js # writes ./oap-sdk/ ``` On Windows the same commands work in PowerShell (scp and tar are built in), with the real file name instead of `x_call@*.tgz`. You get: | Path | What it is | |---|---| | `oap-sdk/index.js`, `package.json` | the runtime the build vendors into each app (`require('oap-sdk')`) | | `oap-sdk/source/` | every SDK module as a readable file at its real path (`source/src/core/OnlineApp.js`, ...) | The firmware copy (SDK 24.10.x) has the full public API. The x_call your car may download later (`/var/opt/public/oap/oap_12204/source/javascript/app.js`) carries a newer SDK that lacks `telephony`, `appstart`, `map` and `poi`. The kit's apps don't need those, so it works too; the tool lists anything missing. `oap-sdk/` is listed in `.gitignore`. Never commit it. ### 3.2 Build ```sh python3 kit/tools/build.py # all apps, English -> dist/@.mgu python3 kit/tools/build.py redline # just one app, English python3 kit/tools/build.py --language ko # Korean -> dist/@-ko.1.mgu python3 kit/tools/build.py --language es # Spanish -> dist/@-es.1.mgu python3 kit/tools/build.py --language ru # Russian -> dist/@-ru..mgu python3 kit/tools/build.py --language zh-CN # Simplified Chinese -> dist/@-zh.cn.2.mgu python3 kit/tools/build.py --language zh-TW # Traditional Chinese -> dist/@-zh.tw.1.mgu node kit/tools/preview.js dist/redline preview wait=10 # English PC preview -> preview/*.png ``` (On Windows type `python` instead of `python3`.) English is the default and the only UI language in a default package. Every package is fixed-language: there is no **Settings → Language** setting or runtime switch, and `--languages` multilanguage subsets are not supported. Use `--language ru` with `build.py` or `make_kit.py` for a Russian build; its version has a language suffix (`dist/@-ru..mgu`). `--language zh-CN` keeps the existing fixed Chinese build behavior. Installing another language's package swaps it like an update. Every package contains all **33 HMI locale tables**, with all 256 `SID_CN_DYNAMIC` slots populated in every table. Existing Chinese resources and credit behavior stay unchanged; the small Cyrillic atlas is added only with `ru`. Russian translates every app's UI and the available complete Fault Scanner descriptions; uncatalogued diagnostic prose remains English. The Chinese database translation is included with `zh-CN`. `kit/tools/import_diagnostic_ru.py` imports a fuller Russian catalog from your own EN/RU `DiagDocDb` databases without changing the bundled English `dtc_db.pack`. `--language es` (also `es-ES`) builds Spanish: every app's UI, the Service app's dates, and the label, bold, light and num atlases with the Spanish letters added (every English glyph unchanged). Fault Scanner descriptions stay English. Guide: [Español](README.es.md). Spanish translation by Rubén Ríos ([rubenrios](https://github.com/rubenrios)). `--language zh-TW` builds Traditional Chinese with the Noto Sans TC atlas. Fault Scanner database descriptions fall back to English. Guide: [繁體中文](README.zh-TW.md). Traditional Chinese by 加速度SpeedUP ([JSD-SpeedUP](https://github.com/JSD-SpeedUP)), based on the Simplified Chinese translation by JackieZ123430. Chinese translation by 小白151 ([JackieZ123430](https://github.com/JackieZ123430), [idrive7-apps-cn](https://github.com/JackieZ123430/idrive7-apps-cn)); guides: [中文](README.zh-CN.md), [Русский](README.ru.md). The `.mgu` files contain BMW's SDK, so keep them for your own car and don't publish them. ### 3.3 Install on the car Car parked, ignition on, ideally with a battery charger connected. First pack the kit (the apps, the installer and the GPU renderer) into `dist/mgu-custom-apps.tar.gz`: ```sh deploy/make-car-kit.sh # macOS / Linux / WSL: all apps, English deploy\make-car-kit.cmd # Windows (cmd or PowerShell) python3 kit/tools/make_kit.py redline # any OS; just some apps, English python3 kit/tools/make_kit.py --language ru # Russian kit -> dist/mgu-custom-apps-ru(.tar.gz) python3 kit/tools/make_kit.py --language es # Spanish kit -> dist/mgu-custom-apps-es(.tar.gz) python3 kit/tools/make_kit.py --language zh-CN # Chinese kit -> dist/mgu-custom-apps-zh-CN(.tar.gz) python3 kit/tools/make_kit.py --language zh-TW # Traditional Chinese kit -> dist/mgu-custom-apps-zh-TW(.tar.gz) ``` (For a kit with a filename suffix, give `push-to-car.sh` the matching `KIT=dist/` and `push-to-car.ps1` `-Kit dist\.tar.gz`.) Then push it over SSH. macOS / Linux / WSL: ```sh HU=root@ PORT=22 KEY=~/.ssh/id_mgu deploy/push-to-car.sh check # read-only: checks the unit, lists what it would touch HU=root@ PORT=22 KEY=~/.ssh/id_mgu deploy/push-to-car.sh install # backup -> install -> restart the app platform HU=root@ PORT=22 KEY=~/.ssh/id_mgu deploy/push-to-car.sh restore # undo: back to the backup ``` `KEY` is the SSH private key for the unit (`chmod 600` it). Every command needs it, unless the key is already in your `~/.ssh/config` or ssh-agent. **Windows:** `deploy/push-to-car.ps1` does the same with Windows' own OpenSSH client, using the SSH key the [idrive7-8-ssh-root](https://github.com/cauliflowermossgrape/idrive7-8-ssh-root) tool writes (`data\enrollments\\id_rsa`, the unit's IP is in `connect.txt` next to it): ```powershell powershell -ExecutionPolicy Bypass -File deploy\push-to-car.ps1 check -Key \id_rsa -Ip powershell -ExecutionPolicy Bypass -File deploy\push-to-car.ps1 install -Key \id_rsa -Ip ``` It takes `dist\mgu-custom-apps.tar.gz` (or `-Kit `). No network? Copy `dist/mgu-custom-apps/` to a USB stick and on the unit run `sh deploy-car.sh check`, then `sh deploy-car.sh install`. After about 1-2 minutes the tiles appear under **Apps**. More commands on the unit (in `/var/opt/mgu-custom-apps`): ```sh sh deploy-car.sh status # installed apps, running state, hook state sh deploy-car.sh backups # list backups sh deploy-car.sh restore # back to stock (asks you to type YES) ``` > **Please share this project.** These apps are free and open source, but a lot of people are > selling them and claiming they made them. If you paid for them, you were scammed. Help spread > the word: share this repository on social media, forums and BMW groups so people can find the > free original here: > **https://github.com/cauliflowermossgrape/idrive7-apps** ### 3.4 Doom: the extra steps Doom installs like the other apps: it is in the kit unless you list only other apps. There are four differences: 1. **The build downloads the game data once.** Git doesn't keep the WAD, so the first `build.py` / `make-car-kit` run fetches Freedoom: Phase 1 0.13.0 (a 24 MB zip from the [Freedoom releases](https://github.com/freedoom/freedoom/releases/tag/v0.13.0)), checks its SHA-256, and saves `apps/doom/freedoom1.wad`. Later builds reuse it. **No internet on the build PC?** Download `freedoom-0.13.0.zip` somewhere else and put `freedoom1.wad` from it into `apps/doom/`. Any other WAD (including id's original `doom.wad`) fails the SHA-256 check. 2. **It is bigger.** The package is ~11 MB (the engine plus the game data), so the push takes a little longer. Nothing to do on your side. 3. **It needs the GPU renderer for the full screen.** The kit installs `mgu-renderd` anyway. If it isn't running, Doom falls back to a smaller picture inside the normal app area. 4. **The head unit reboots once at the end of the install, for the controller gate.** `deploy-car.sh install` sets up `mgu-inputgate.so` to load into the HMI, so the game can have the controller to itself (see [5.1](#51-what-deploy-carsh-install-does)). It loads when the head unit starts, so the install ends with a reboot: the screen goes black for about a minute, then everything comes back by itself and Doom is ready. If the HMI fails to come up with it, it is left out by itself. Rather reboot later? `NO_REBOOT=1 sh deploy-car.sh install`: it then loads at your next drive. Don't want it at all? `NO_INPUTGATE=1 sh deploy-car.sh install`. Doom then still works, but the HMI also reacts to the controller (pushing forward opens its pull-down menu). ```sh python3 kit/tools/build.py doom # -> dist/doom@.mgu (fetches the WAD the first time) deploy/make-car-kit.sh doom # just Doom in the kit (or no arguments: all apps) HU=root@ PORT=22 KEY=~/.ssh/id_mgu deploy/push-to-car.sh install ``` On the car: **Apps → Doom** opens the main menu (Play / Continue, New game, settings). Starting it the first time takes a few seconds while the head unit compiles the engine. Saves stay in the app's data folder, so they survive reinstalls of the same app, but not `restore`. ### 3.5 Back to stock `restore` stops the platform and removes every custom app, the hook and the boot drop-in. It then puts every touched file back exactly as it was in the **stock backup**, the first backup `install` ever made, which is never overwritten. Each file is verified against that backup. Finally it restarts the HMI so the removed tiles disappear without a reboot. --- ## 4. How the head unit works This is what the MGU looks like from the inside, as far as it matters for apps. Everything here was learned from a running unit. ### 4.1 Hardware | Part | Details | |---|---| | CPU | Intel Apollo Lake (x86-64), Intel GPU (i915 / Mesa, EGL + GLES2) | | OS | Linux 4.14 (`-apl`), systemd, BusyBox userland | | Storage | eMMC: read-only root filesystem + a writable `/var/opt` (apps live in `/var/opt/public`). Plus a 2.5" hard disk: one read-only partition (navigation and other data) and a writable ~90 GB share at `/var/opt/hdshare`. | | Video in | Intel IPU4 camera-capture block with six CSI-2 ports (on our unit no camera is wired to them; the camera views arrive over Ethernet, see 4.6) | | Network | One Ethernet port into the car (`socnet0`), split into VLANs for the different car domains; Wi-Fi (`wlan0`) for the phone hotspot / CarPlay | ### 4.2 Software stack ``` ┌───────────────────────────── HMI (HmiMain3D, RAMSES 3D renderer) ─────────────────────────────┐ │ BMW's screens and menus + "Remote HMI" (RHMI) screens that apps describe and fill with data │ └───────────────▲──────────────────────────────────────────────────────────▲────────────────────┘ │ SOME/IP + joynr │ SOME/IP ┌───────────────┴──────────────┐ ┌──────────────────────────────────────┴─────────────────────┐ │ OAP app platform │ │ Native services │ │ oapcontroller -> MainApp │ │ media (mediaengine, mediaapp), cameras (dasvideo, │ │ (Node.js) -> one Node │ │ icam2proxy), AVB streams, navigation, phone, diagnostics │ │ process per app │ │ gateway (TASU), provisioning, connectivity (connman) │ └───────────────┬──────────────┘ └──────────────────────────────────────┬─────────────────────┘ │ SOME/IP over Ethernet VLANs │ ┌───────────────┴────────────────────────────────────────────────────────────┴─────────────────┐ │ The rest of the car: engine and chassis data, instrument cluster, cameras, telematics (TCB) │ └───────────────────────────────────────────────────────────────────────────────────────────────┘ ``` - **SOME/IP** (vsomeip) is the main bus. Every service, in the head unit or anywhere in the car, is described in one catalog on the unit, `/etc/oap/someip/someip-interfaces.json`: interfaces, fields (with or without a getter and a change notifier), methods and events, plus their wire ids and data types. Vehicle data such as rpm, speed, temperatures and accelerations arrives as SOME/IP field notifications. - **joynr** is a higher-level RPC layer on top (BMW's cluster controller listens on ports 4242/4243). The platform uses it for app management and HMI entry points. - **The HMI** is a 3D renderer (RAMSES) with BMW's own asset database. Apps never draw directly: they describe screens with BMW's widget templates and push text, images and properties into them (see 4.4). ### 4.3 The app platform (OAP) BMW calls it the **Online Apps Platform**. It's how BMW ships its own apps (weather, news, M Laptimer, emergency call, service and battery apps, ...), and these custom apps use exactly the same mechanism. - `oapcontroller.service` starts **MainApp** (`/usr/lib/oap-mainapp`, a Node.js host running as uid 12201). MainApp installs, starts, stops and supervises every app. - **Each app is an npm-style package** (`package.json`, `manifest.json`, `permissions.json`, `rhmiData/`, `javascript/app.js`). It is installed into `/var/opt/public/oap/oap_/` and runs as **its own Linux user** (uid 12203 and up). Apps run under Node.js 8, with native add-ons for SOME/IP, certificates, codings and more. - **Registry:** `oap_12201/security/uids.txt` (uid ↔ app) and `oap_12201/data/apps/.json` (version, install source, state). - **Install sources:** BMW's app store via the backend, or the read-only preinstalled folder `/usr/lib/oap-mainapp/preinstalled_apps/`. At install MainApp **generates** the app's SOME/IP config (`someipInterfaces/*.json`) and access list (`acl.json`) from its `manifest.json` and the catalog. An app can only reach the services and fields its manifest asks for. - **Provisioning decides what's visible.** A BMW-signed file (`/var/opt/public/tm/tm_12000/data/prov/ProvSigned.xml`, pushed from the BMW backend) lists which apps and features this car may use. MainApp hides any app that isn't enabled there. The file is signed, so it can't simply be edited; this kit adds a fallback instead (see 5.2). - **Crash handling is harsh.** If an app exits unexpectedly, MainApp's `CorruptAppsHandler` wipes its data folder; the second time, it uninstalls the app. So never kill an app process by hand. To restart apps, restart the platform (`systemctl restart oapcontroller`), which stops them cleanly. - Each app gets **CPU, memory and disk limits** from `oapAppSettings` in its `package.json`. ### 4.4 How apps draw: Remote HMI (RHMI) The HMI doesn't run app code. An app ships a **description** of its screens: - `rhmiData/application.json`: the app's identity and its **entry points** (the tiles in the Apps menu: icon, title, position). - `rhmiData/uiDescriptions/ID7/application.xml` + `uiDescription.json`: screens ("states") made of components (labels, buttons, lists, checkboxes, images), each using one of BMW's **widget templates** (`LT_State_*`, `LT_Label_*`, `LT_Button_*`, ...). - At runtime the app pushes values: text, visibility, enabled state, list rows and **images**. The kit's trick for rich graphics: each app's main screen is a single large image component, and the app draws it itself. Two ways to get the drawing on screen, chosen automatically: - **The GPU render engine, 60 fps** ([`kit/renderd`](kit/renderd/README.md)). The app records its drawing commands (`kit/runtime/record.js`: rectangles, gradients, arcs, lines, glyph runs from baked font atlases, cached layers) and streams them to `mgu-renderd`, a small system service, over a Unix socket. `mgu-renderd` draws them with OpenGL ES 2 on its own compositor layer over the HMI and asks for the next frame when the compositor takes the last one, so frames are paced by the display itself. Static parts (cards, dial faces, scales) are drawn once into GPU textures. Gauges glide between values with spring smoothing. A watchdog hides an app that stops sending frames, so a hung app can never cover the HMI. - **PNG fallback, the stock way.** Without the service (or with the app setting *Renderer = Software*), the same recording is played into a pure JavaScript rasteriser (`kit/runtime/canvas.js`), encoded as PNG and handed to the HMI's image component at 4-15 fps. Same code, same look, with the HMI's own title and bar. With the renderer, apps use the whole screen (app setting *Screen layout = Full screen*, the default): ``` ┌──┬──────────────────────────────────────────────────────┬───────────────────────┐ │H │ M Vitals ENGINE THERMALS FUEL & IGN. CHASSIS SETTINGS │ HMI status strip │ header: app name, page tabs, Settings ├──┼────────────────────────────────────────────────────────────┴──────────────────┤ │ │ │ │ <│ page content, scaled up to fill │ │ │ │ │ │ │ └──┴──────────────────────────────────────────────────────────────────────────────┘ ``` - **Header** in the HMI's title strip, in the strip's own black: the app's name, its page tabs and badges (DEMO), only as wide as that. Right of it the strip is see-through, so the HMI's own status (radio station, phone signal, notifications, volume, voice, profile, clock) shows and works as usual. - **No button bar** with mgu-render (touch routed to the app): Next page / Previous page become the header's tabs, Settings its last tab, and an app's other buttons are drawn on its page. The page gets the full height. With an older renderer the kit draws a slim 48 px bar instead, each label over the HMI button underneath (`Focusable=3`, so the button the controller is on lights up). - The HMI's back arrow and home button stay visible: that column is see-through down to the bar; below it the app covers the HMI's own bar, so it doesn't show at the bottom left. HMI popups (options, warnings, calls) hide the renderer's surface while they're open. - *Screen layout = Standard* keeps the HMI's own title and 120 px bar; the renderer then only covers the image area. Buttons and the settings screens are normal RHMI widgets, so they behave like BMW's own (rotary controller, touch, back button). See [`docs/rhmi-widgets.md`](docs/rhmi-widgets.md) for the widget vocabulary, ids and update format. ### 4.5 Diagnostics The head unit is a diagnostic gateway: the SOME/IP service `com.harman.infotainment.systemfunctions.tasu.tasu.InternalTasu` sends **UDS requests** to any control unit (or to all of them via the functional address `0xDF`). Replies come back as events. BMW's own diagnostic job list on the unit uses the same requests. - Read fault codes: `0x19 02 ` (ReadDTCInformation, by status mask) - Clear fault codes: `0x14 FF FF FF` (ClearDiagnosticInformation) - Read data: `0x22 ` (e.g. `F190` = VIN) Clearing fault codes in all modules can make control units restart, and the head unit itself may reboot. ### 4.6 Media, cameras and the Drive Recorder - Audio and video between the head unit and the rest of the car run over **AVB** (audio/video bridging on Ethernet). The network chip uses a dedicated AVB driver (`igb_avb`) that hands these streams straight to BMW's stream handler, outside the normal Linux network stack. - **Camera views** (rear-view / surround view) come in as **H.264 over AVB** and are displayed by `dasvideo`. They're only streamed while a camera view is on screen. - BMW's **Drive Recorder** service (`VideoBuffer`, served by `icam2proxy`) needs **two** switches: the coding flag (Drive Recorder active) **and** BMW provisioning (`oap_drive_recorder` enabled in the signed provisioning file). Coding alone does nothing. Without both, there is no service an app could record from. ### 4.7 Connectivity The head unit has no internet route of its own. BMW's servers are reached only through the **telematics unit (TCB)** over one of the internal VLANs. If the TCB has no mobile connection (for example a US car in Europe whose eSIM doesn't work there), the head unit is offline: provisioning can't be updated and BMW's online apps don't work. The custom apps here don't need the internet. --- ## 5. How the apps get onto the unit ### 5.1 What `deploy-car.sh install` does 1. **Checks** the unit and test-builds the MainApp patch for *this* firmware. If anything is unexpected it stops before changing a file. 2. **Backs up** every file it will touch into `backups/