Files
ESP32-S3-Touch-LCD-5B/wiki/sources/dwr-335d-torque-pids.md
T
julian 974082cb3e Add diag console probe (OBD-II mode 01/09 on 0x7DF); wiki: diagnostic polling, two sources
Firmware:
- CANDriver::transmit(): the single sanctioned transmit path (single-shot,
  echoed as CANTX lines, TX_FAILED alert counted); CAN-task warnings now take
  the serial lock
- DiagProbe module: `diag pids` supported-PID bitmap scan, `diag pid <hex>`,
  `diag vin`, `diag ecu`, `diag status`; ISO-TP reassembly with flow control;
  one request in flight, refused for 3 s after any foreign tester frame
- Console dispatch chained via Tunables::setExtraCommandHandler()
- CLAUDE.md and docs/UART_PROTOCOL.md updated

Wiki:
- New page obd-diagnostic-polling (broadcast vs polled, 0x6F1->0x612 addressing,
  Route A generic OBD PID table, Route B, test-day procedure, firmware probe)
- New sources: google-ai-dde7m57-pids (clipping, unverified, 0x612 direction
  contradicted), dwr-335d-torque-pids (thread + raw/BMW 335d.csv decoded)
- Clippings/ folder added to the schema (Obsidian Web Clipper, treated as raw/)
- bmw-m57n-engine, can-bus-integration, open-questions, index, log updated
2026-09-21 19:51:49 +02:00

65 lines
5.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
type: source
tags: [obd, j1979, pid, diesel, m57, dde7, polling, torque-app]
updated: 2026-09-21
---
# DWR — "Extended BMW 335d PIDs for Torque" (e90post/6post thread + CSV)
Raw: `raw/BMW 335d.csv` (DWR's attachment, 2017 revision) and `Clippings/Extended BMW 335d PIDs for Torque.md` (page 1 of the thread, posts 1–22, clipped 2026-09-21). Thread: <https://6post.com/forums/showthread.php?p=17790638> (e90post t=1118429, 238 posts, 2015–). Author DWR, 2009 335d (E90, **M57N2 on DDE7.3 / EDC17CP09**, US market), a serious logger (Testo user).
## Summary
A custom-PID file for the Torque Pro Android app that fixes the app's wrong scalings for a diesel and adds the parameters DWR wanted to log: boost, exhaust manifold pressure, air mass, fuel flow, three exhaust temperatures, DPF pressure, NOx, intake/charge/ambient temperatures. **All of them are generic SAE J1979 mode `01` PIDs** — DWR says so himself in post 21 ("These are generic OBDII PIDs… The mode is always 1, the next 2 characters are the PID, A,B,C,D are the bytes") and points people who want *non-standard* values to Testo instead. Header `Auto` = Torque's default functional request (`0x7DF`, reply on `0x7E8`). Nothing here is BMW-proprietary; nothing here is a passively broadcast frame.
Two versions exist and differ:
| | Post #2 (2015-04-22) | `raw/BMW 335d.csv` (post #1 attachment, edited 2017-11-20) |
|---|---|---|
| Boost scaling (PID 70 bytes D–E) | ×0.296 (empirical, "one of two correction factors") | ×**0.3125** — the J1979 value (0.03125 kPa/bit = 0.3125 hPa/bit) |
| Lambda / AFR (PID 24) | AFR ×0.00044225 | Lambda ×0.0000305 (written as `000031`, a typo for `0.0000305`) |
| Fuel flow (PID 5E) | ×5.64 lb/hr — wrong | ×**0.0938** lb/hr — correct (0.05 L/h/bit × 0.85 kg/L × 2.2046) |
| Extra rows | — | Baro (33), DPF pressure (7A), drive pressure (derived), EGR temp (6B), NOx pre/post SCR (83), H2O/meth target (derived from 5E) |
Use the CSV; the 2017 revision is the corrected one. One residual typo: EGT post-DOC has `+33` where the other rows have `+32`.
## The PID table (source: `raw/BMW 335d.csv`, decoded)
Mode `01` throughout; letters are reply data bytes after the PID echo, J1979 order. Scalings below are DWR's, converted to SI where his were imperial.
| PID | J1979 name | Bytes used | Value | Notes |
|---|---|---|---|---|
| `05` | Coolant temp | A | A − 40 °C | not in his file (Torque has it built in) — listed for completeness |
| `0B` | Intake manifold absolute pressure | A | A kPa | **1 byte, caps at 255 kPa abs** — a boosting M57N exceeds that; the reason DWR used PID 70 instead |
| `0C` | Engine rpm | A,B | (A·256+B)/4 | built in |
| `0F` | Intake air temp (at MAF) | A | A − 40 °C | in file |
| `10` | MAF | A,B | (A·256+B)/100 g/s | in file (×0.132276 → lb/min) |
| `24` | O2 sensor 1 lambda | A,B | (A·256+B)/32768 λ | in file; lambda for a diesel, not AFR |
| `33` | Barometric pressure | A | A kPa | in file |
| `46` | Ambient air temp | A | A − 40 °C | in file |
| `5E` | Engine fuel rate | A,B | (A·256+B)×0.05 L/h | in file (→ lb/hr ×0.0938) |
| `6B` | EGR temperature | C | C − 40 °C | in file ("exhaust recirculation temperature") |
| `70` | Boost pressure control | D,E | (D·256+E)×0.03125 kPa **actual** (B,C = commanded) | in file: (hPa − 1000)/1000×14.5 → psi gauge. Matches an analog gauge within a few psi (post 5/6; sensor location differs) |
| `73` | Exhaust pressure bank 1 | B,C | (B·256+C)×0.01 kPa | in file |
| `77` | Charge air cooler temp | B | B − 40 °C | in file |
| `78` | EGT bank 1 | B,C / D,E / F,G | (n)/10 − 40 °C, sensors 1–3 | in file: pre-DOC, post-DOC (pre-DPF), pre-SCR |
| `7A` | DPF differential pressure | B,C | (B·256+C)×0.01 kPa | in file |
| `83` | NOx sensor | B,C / D,E | ×0.032044 − 100 ppm | in file; scaling looks empirical `(unverified)` |
## What this means for our project
- **These PIDs are ECU-agnostic by design** — if the DDE in the Patrol answers generic OBD-II over CAN at all, the basic ones (`05`, `0B`, `0C`, `0F`, `10`, `33`, `46`) need no BMW knowledge. That makes the mode-01 route the **cheapest first experiment** for polled values, ahead of any BMW `0x6F1`/`0x612` reverse-engineering. → [[obd-diagnostic-polling]]
- **But the source car is not ours.** A 2009 US 335d (DDE7.3, EDC17, full US OBD-II, DPF/SCR) supports the whole list. Our donor is an E60/E61 M57N on a DDE6/EDC16 `(unverified)`: (a) the diesel-specific PIDs `70`/`73`/`78`/`7A`/`83` were added to J1979 in 2007+ revisions and an EDC16 almost certainly lacks them; (b) an early E60 served EOBD over **K-line**, not CAN — whether our DDE answers `0x7DF` on the PT-CAN is an open test; (c) with no DPF/SCR on the M57N several rows are meaningless anyway.
- **The one query that answers all of it**: `01 00` (then `01 20`, `01 40`, `01 60`) returns the supported-PID bitmaps. One round trip on `0x7DF` tells us whether mode 01 works on this bus and exactly which PIDs the DDE offers. Procedure added to [[obd-diagnostic-polling]].
- Boost via PID `0B` clips at 255 kPa absolute; if `70` is unsupported, real boost needs the BMW route.
- DWR's Testo-parameter list (his post 175 in the "Testo" thread, German→English) is the pointer for non-standard DDE values — not clipped yet; sourcing wishlist.
## Relevance to open questions
- **#7** (non-broadcast values): adds the generic route as a concrete, low-risk first test with expected byte layouts. Does not answer whether our DDE supports it.
- **#2** (DDE variant): indirectly — which PIDs the DDE reports supporting is itself a fingerprint of the ECU generation.
## Related
[[obd-diagnostic-polling]] · [[google-ai-dde7m57-pids]] · [[listen-and-send-pid-arduino]] · [[can-id-candidates]] · [[open-questions]]