12-OBD-Speed: read-only UDS DID scan of the car's modules

- Log page now runs a diagnostic scan instead of CAN listening (the Fiesta's OBD
  port carries no broadcast traffic): unfiltered check, module discovery
  0x700-0x7EF (22F188, then 3E00 with 1 s timeout), all 65536 DIDs per module,
  progress in NVS, speed/voltage polled every 2 s in between
- Result (drives 2026-11-12..18): only the PCM 0x7E0 answers; 389 DIDs supported
  (logs in docs/canlog/scan, scan2)
- Reset scan button, BLE connection interval request, progress lines
- CLAUDE.md: screen-has-priority rule, web UI future idea, findings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mangavalkandClaude Opus 5.5 committed 2026-11-18 16:06:31 +01:00
1 parent 60cd7cf262
commit c9ad39c8ed
27 files changed
+15491 -249

No files matched your search

+35 -19
View File
@@ -16,9 +16,9 @@ Uses the shared board library and LVGL 9.6 (`../shared`), NimBLE-Arduino 2.5.1.
dimensions shown; not 360×360 in orange). Tap one: it is copied into the device's flash (progress shown) and
played from there, so the SD card is not needed afterwards. At boot the device checks (in the background)
whether the chosen file on the SD card changed (size/date) and re-copies it. **Rescan** re-reads the card.
- **Swipe left once more → CAN log** (temporary, to find the cruise/ACC set speed and speed-sign messages, see below).
**Start/Stop** (remembered: logging resumes by itself after power-up), **Mark**, the last frame of the three Ford
candidate IDs, and the file on the SD card. While logging, the speed page shows a red `REC <marks>` pill and
- **Swipe left once more → CAN log** (temporary: diagnostic scan to find the cruise/ACC set speed and speed limit, see below).
**Start/Stop** (remembered: logging resumes by itself after power-up), **Mark**, scan progress, **Reset scan**,
and the file on the SD card. While logging, the speed page shows a red `REC <marks>` pill and
**a tap on the speed page adds a mark** (pill flashes `MARK n`).
- **Idle** — after that time without speed data (ignition off, adapter gone) the screen goes dark, the GIF pauses and
OBD polling stops; only `ATRV` every 30 s (answered by the adapter itself, doesn't wake the car's bus).
@@ -33,34 +33,50 @@ Service `FFF0`, notifications + commands on `FFF1` (verified with the user's "OB
Init: `ATZ`, `ATE0`, `ATL0`, `ATS0`, `ATH0`, `ATSP0`, `0100`; then `010D` (speed) is polled continuously.
Serial (115200) prints status changes as `[obd] ...`.
## CAN logger (finding ACC set speed / speed sign)
Neither value is a standard OBD PID; on Fords they are broadcast CAN messages. Candidates from opendbc
(`ford_lincoln_base_pt.dbc`, made for newer Fords; **not yet confirmed on the Fiesta Mk8**):
`0x165` EngBrakeData `Veh_V_DsplyCcSet` (set speed as shown) + `CcStat_D_Actl`, `0x202` `Veh_V_RqCcSet` (0.5 km/h),
`0x3D9` IPMA_Data2 `IsaVLim_D_Rq` (speed limit, 254 = no data) + `IsaVLimUnit_D_Rq` (1 km/h, 2 mph).
## Log page: diagnostic scan (finding ACC set speed / speed sign)
Neither value is a standard OBD PID. **First test drive (2026-11-02, `docs/canlog`)**: listening on the OBD port
(ELM327 `ATMA`, ID survey with wildcard filters) saw **no broadcast frames at all**, only diagnostic replies: the
Fiesta Mk8's gateway passes only diagnostics to the OBD socket. (Broadcast candidates from opendbc for newer Fords,
for reference: `0x165` `Veh_V_DsplyCcSet`, `0x202` `Veh_V_RqCcSet`, `0x3D9` `IsaVLim_D_Rq`; the Mk7.5 Fiesta sheet in
github.com/consp/ford-can-stuff lists `0x3CD` "Traffic Recognition Data" on the infotainment bus.)
While logging, the OBD task (after `ATCSM1` silent monitoring, `ATH1`, `ATCAF0`):
1. **Survey**: listens to the ID ranges `0XX`..`7XX` (`ATCRA` with wildcards + `ATMA`, 1.3 s each); a range that
overflows the adapter (`BUFFER FULL` / 300 lines) is split into 16 smaller ones. Repeated every 10 min.
2. **Capture**: one frame of every ID found, in turn; the three candidates after every 8 others.
3. Every 2 s `ATAR` + `ATCAF1` + `010D` (speed, so the display keeps working, a bit laggy) and `ATRV`.
If the adapter can't filter by wildcard it falls back to unfiltered 2 s windows.
So the values have to be asked from the modules. While logging is on, the OBD task runs a **read-only scan**
(only UDS `22` ReadDataByIdentifier in the default session; nothing in the car is changed), progress kept in NVS
(namespace `scan`) so it continues on every drive:
1. **Unfiltered listen check** (once): 2 × 5 s `ATMA` without filter, CAF off and on.
2. **Module discovery**: `22F188` (software number) to every address 0x700..0x7EF (`ATSH` + `ATCRA` addr+8,
`ATST19` = 100 ms timeout). Logged as `D <addr> <reply>`, list as `I`. Repeated if the PCM (0x7E0) didn't answer.
3. **DID scan**: all 65536 DIDs of each module, order 0x706 (IPMA camera), 0x764 (CCM radar), 0x720 (IPC), 0x7E0 (PCM),
then the other modules found; per module the DID ranges D000-DFFF, 4000-4FFF, 0000-3FFF, 5000-CFFF, E000-FFFF.
Positive replies `S <addr> <did> <data>`, other negative responses than 0x31 `R <addr> <did> <nrc>`. A module
without service 22 (NRC 0x11) is skipped; 20 requests without a reply = module asleep: back up and wait.
The `<request>1` suffix (return after the first reply) is used when the adapter supports it.
**Probe** (once, after drive 2 found only the PCM): `3E00` TesterPresent with a 1 s timeout to every address not
found yet. DIDs are asked **3 per request** (`22 D000 D001 D002`, one CAN frame; the module returns only the
supported ones) when the module passes the test `22F1FFF188F1FE`; a hit is re-asked one DID at a time.
`E progress` every 512 DIDs (with ms/DID).
4. Every 2 s `ATSH 7DF` / `ATAR` + `010D` (speed, so the display keeps working, a bit laggy) and `ATRV`.
Page: Start/Stop (remembered), Mark, progress (module, DID, %), modules found, DIDs found, last positive reply,
**Reset scan** (starts over the next time logging runs). While logging the speed page shows `REC <marks>`; a tap on
it adds a mark.
Log: `/canlog/log_NNN.txt` (new file per session, appended every 2 s; kept in RAM while the card is missing).
Lines `<ms> <type> <data>`: `C` adapter, `P` protocol, `V` speed, `B` voltage, `M` mark, `F id data` frame,
`N id` no frame, `I` survey IDs, `E` adapter message/note. Test drive: change the set speed and pass signs, tap
for a mark each time (passenger, or only when safe).
Lines `<ms> <type> <data>`: `C` adapter, `P` protocol, `V` speed, `B` voltage, `M` mark, `D`/`I` modules,
`S`/`R` DID replies, `F` raw frame, `E` adapter message/note.
**Download over USB** (no card reader needed): serial commands `ls` and `get <file>` (115200 baud).
## Files
| File | What |
|---|---|
| `src/main.cpp` | LVGL UI (tileview: speed, adapter menu, settings, background, CAN log) |
| `src/obd_link.cpp/.h` | BLE scan, connect/reconnect, ELM327 init and speed polling, CAN logging steps (background task on core 0) |
| `src/obd_link.cpp/.h` | BLE scan, connect/reconnect, ELM327 init and speed polling, diagnostic scan steps (background task on core 0) |
| `src/font_speed_120.c` | Montserrat Medium 120 px, digits and `-`, 4 bpp (generated with `lv_font_conv`, see header) |
| `src/can_log.cpp/.h` | CAN log buffer + SD writer (background task), marks, values shown on the log page |
| `src/can_log.cpp/.h` | Log buffer + SD writer (background task), marks, info shown on the log page, serial `ls`/`get` |
| `src/sd_card.cpp/.h` | Shared, reference-counted SD_MMC mount (background store + logger) |
| `src/bg_store.cpp/.h` | Background GIF from the SD card: list `/gifs`, copy into the `bggif` flash partition (header written last), mmap for playback, change check at boot (background task) |
| `partitions.csv` | 4 MB app (no OTA) + 11.9 MB `bggif` raw area + NVS |
| `docs/canlog/` | Logs of the test drives |
| `data/bg.gif` | Built-in background (`ezgif-5-cb56986bc7.gif`, 360×360), linked into the firmware via `board_build.embed_files` |
| `sd/gifs/` | (not in git) GIFs converted with `../tools/gif_to_360.py`, ready to copy to the SD card |
@@ -0,0 +1,3 @@
# 12-OBD-Speed CAN log (t = ms since boot)
# C adapter, P protocol, V speed km/h, B battery V, M mark, F id data, N id (no frame), I survey IDs, E note
121608 E idle
@@ -0,0 +1,2 @@
# 12-OBD-Speed CAN log (t = ms since boot)
# C adapter, P protocol, V speed km/h, B battery V, M mark, F id data, N id (no frame), I survey IDs, E note
@@ -0,0 +1,4 @@
# 12-OBD-Speed CAN log (t = ms since boot)
# C adapter, P protocol, V speed km/h, B battery V, M mark, F raw line, D module found, I module list,
# S addr did data (DID supported), R addr did nrc (negative response), E note
121608 E idle
+349
View File
@@ -0,0 +1,349 @@
# 12-OBD-Speed CAN log (t = ms since boot)
# C adapter, P protocol, V speed km/h, B battery V, M mark, F raw line, D module found, I module list,
# S addr did data (DID supported), R addr did nrc (negative response), E note
4558 C OBDII ELM327 v2.1
4658 P A6
5008 E count suffix yes, scan step 0, module 0, pos 0
5258 V 0
5358 B 13.0
6008 F NO DATA
6608 F 7E8064100BE3EA813
6608 E raw check: 1 lines
7107 M 1
7544 M 2
7757 V 0
7857 B 13.0
10158 V 0
10309 B 13.0
12257 V 0
12407 B 12.3
12811 E scan reset
13360 F NO DATA
13960 F 7E8064100BE3EA813
13960 E raw check: 1 lines
14458 V 0
14608 B 13.0
16758 V 0
16858 B 12.9
18909 V 0
19010 B 12.9
21010 V 0
21110 B 12.9
23460 V 0
23560 B 12.9
25660 V 0
25760 B 12.9
27906 V 0
28006 B 12.9
30156 V 0
30256 B 12.9
32457 V 0
32557 B 12.8
34708 V 0
34808 B 12.8
36908 V 0
37008 B 12.9
38859 V 0
41010 V 0
41110 B 12.9
43360 V 0
43460 B 12.8
45456 V 0
45556 B 12.9
47557 V 0
47657 B 12.8
49857 V 0
49957 B 12.9
52058 V 0
52158 B 12.9
54309 V 0
54409 B 12.9
56359 V 0
56509 B 12.9
58359 V 0
58459 B 12.9
60659 V 0
60759 B 12.8
63010 V 0
63110 B 12.9
64960 V 0
67210 V 0
67310 B 12.9
69255 V 0
69360 B 12.9
71610 V 0
71710 B 12.8
73906 V 0
74010 B 12.9
76260 V 0
76360 B 12.9
78556 V 0
78656 B 12.9
80907 V 0
81007 B 12.9
82958 V 0
83108 B 12.9
85208 V 0
85308 B 12.9
87458 V 0
87558 B 12.9
89459 V 0
89559 B 12.8
91709 V 0
91809 B 12.9
93960 V 0
94060 B 12.8
96206 V 0
96306 B 12.9
98506 V 0
98607 B 12.9
100457 V 0
102607 V 0
102707 B 12.8
104957 V 0
105057 B 12.9
107207 V 0
107307 B 12.9
109208 V 0
109308 B 12.9
111309 V 0
111410 B 12.9
113560 V 0
113660 B 12.9
115810 V 0
115910 B 12.9
118060 V 0
118160 B 12.9
120306 V 0
120406 B 12.8
122257 D 7E0 62F1884A3142312D3134433230342D414441000000000000000000
122657 V 0
122757 B 12.9
124908 V 0
125008 B 12.9
127158 V 0
127258 B 12.8
129408 V 0
129508 B 12.9
129509 I 7E0
130309 S 7E0 D002 1FFE
130510 S 7E0 D003 80000000
130960 S 7E0 D005 00000000
131161 S 7E0 D006 00000000
131560 V 0
131660 B 12.9
133756 V 0
133910 B 12.9
135806 V 0
135906 B 12.9
136507 S 7E0 D014 00000000
136707 S 7E0 D015 87F840F8
137906 V 0
138056 B 12.9
138607 S 7E0 D01A 22554E4B4E4F574E22000000000000000000000000000000
140007 V 0
140108 B 12.9
142158 V 0
142258 B 12.9
144108 V 0
146208 V 0
146308 B 12.9
148159 V 0
150208 V 0
150308 B 12.9
152308 V 0
152408 B 12.9
154458 V 0
154558 B 12.9
156608 V 0
156708 B 12.9
158809 V 0
158909 B 12.9
160958 V 0
161059 B 12.8
162909 V 0
164959 V 1
165059 B 12.9
167058 V 3
167159 B 12.8
169207 V 6
169307 B 12.8
171308 V 9
171409 B 12.8
173406 V 15
173506 B 12.9
175506 V 19
175606 B 12.9
177610 V 18
177710 B 12.9
179758 V 15
179858 B 13.0
181856 V 13
181956 B 12.9
183958 V 15
184058 B 12.9
186106 V 19
186207 B 12.9
188208 V 21
188308 B 12.9
190309 V 22
190410 B 12.9
192456 V 20
192557 B 13.0
194560 V 16
194660 B 12.9
196658 V 17
196758 B 12.9
198807 V 20
198907 B 12.9
200756 V 23
202957 V 23
203057 B 12.9
205059 V 20
205209 B 12.9
207058 V 12
208559 S 7E0 D100 01
209158 V 5
209258 B 12.9
211308 V 0
211408 B 12.9
213407 V 6
213507 B 12.9
215506 V 15
215606 B 12.9
217609 V 25
217709 B 12.9
219707 V 31
219807 B 12.9
220610 S 7E0 D127 140E
221807 V 31
221908 B 12.9
223906 V 29
224006 B 12.9
224609 S 7E0 D134 00
225211 S 7E0 D137 00
226008 V 26
226109 B 12.9
228106 V 23
228207 B 12.9
230208 V 24
230309 B 12.9
232306 V 22
232406 B 12.9
234409 V 24
234510 B 12.9
236507 V 27
236608 B 12.9
238609 V 24
238710 B 12.9
240707 V 23
240807 B 12.9
242806 V 30
242907 B 13.0
244909 V 30
245009 B 13.0
247006 V 36
247107 B 12.9
249156 V 40
249256 B 12.9
251257 V 43
251357 B 12.9
253357 V 44
253457 B 12.9
255459 V 45
255560 B 12.9
256882 M 3
257560 V 46
257660 B 12.9
259658 V 46
259758 B 13.0
261760 V 44
261860 B 13.0
263857 V 42
263957 B 13.0
265959 V 39
266060 B 12.9
268056 V 37
268157 B 13.0
270159 V 35
270259 B 12.9
272306 V 31
272407 B 13.0
274309 V 22
274409 B 13.0
276408 V 20
276508 B 12.9
278556 V 24
278656 B 12.9
280707 V 23
280807 B 13.0
282808 V 24
282908 B 13.0
284906 V 25
285057 B 13.0
287059 V 22
287209 B 13.0
289207 V 19
289308 B 13.0
291309 V 18
291410 B 12.9
293406 V 18
293507 B 12.9
295607 V 16
295708 B 13.0
297559 V 12
299556 V 12
299656 B 12.9
301658 V 11
301758 B 12.9
303806 V 8
303906 B 12.9
305908 V 14
306008 B 12.9
308009 V 16
308109 B 13.0
310107 V 21
310207 B 12.9
312208 V 24
312308 B 13.0
314209 V 17
314359 B 13.0
316357 V 12
316457 B 12.9
318558 V 11
318658 B 12.9
320459 V 10
322657 V 11
322758 B 12.9
324758 V 10
324858 B 12.9
326856 V 9
326956 B 12.9
329009 V 8
329109 B 13.0
331107 V 7
331208 B 13.0
333206 V 9
333356 B 13.0
335457 V 6
335557 B 13.0
337356 V 4
339407 V 0
339507 B 13.0
341406 V 0
343609 V 2
343710 B 12.9
345707 V 2
345807 B 13.0
347857 V 2
347957 B 13.0
349957 V 2
350057 B 12.9
352109 V 1
352210 B 12.2
354258 V 1
354359 B 13.0
356457 V 0
356557 B 12.9
358358 V -1
358959 B 11.9
+202
View File
@@ -0,0 +1,202 @@
# 12-OBD-Speed CAN log (t = ms since boot)
# C adapter, P protocol, V speed km/h, B battery V, M mark, F raw line, D module found, I module list,
# S addr did data (DID supported), R addr did nrc (negative response), E note
3810 C OBDII ELM327 v2.1
3910 P A6
4210 E count suffix yes, scan step 2, module 0, pos 704
4410 V 0
4510 B 12.5
6710 V 0
6810 B 11.2
8859 V 3
8959 B 12.8
11061 V 4
11162 B 13.0
13010 V 3
15208 V 2
15308 B 12.9
17311 V 3
17412 B 13.0
19410 V 6
19510 B 13.0
21508 V 6
21608 B 12.9
23561 V 8
23661 B 12.9
25658 V 9
25758 B 12.9
27758 V 12
27859 B 13.0
29858 V 15
29958 B 13.0
31960 V 17
32060 B 12.9
34060 V 16
34161 B 13.0
36158 V 16
36258 B 12.9
38261 V 21
38362 B 12.9
40361 V 23
40462 B 12.9
42460 V 20
42560 B 12.9
44610 V 17
44711 B 13.0
46661 V 7
46761 B 12.9
48809 V 6
48909 B 12.9
50961 V 5
51061 B 12.9
53111 V 1
53211 B 12.9
55211 V 14
55312 B 12.9
57308 V 24
57408 B 12.9
59411 V 31
59511 B 12.9
61508 V 33
61609 B 12.9
63027 M 1
63610 V 32
63710 B 12.9
65709 V 28
65809 B 12.9
67811 V 28
67912 B 12.9
69958 V 26
70058 B 12.9
72061 V 15
72161 B 12.9
74208 V 10
74309 B 13.0
76310 V 15
76410 B 12.9
78408 V 20
78509 B 12.9
80510 V 21
80610 B 12.9
82610 V 25
82711 B 13.0
84708 V 31
84809 B 12.9
86809 V 31
86909 B 12.9
88908 V 32
89008 B 13.0
91011 V 36
91111 B 12.9
93110 V 41
93210 B 12.9
93839 M 2
94467 M 3
95259 V 41
95359 B 12.9
95389 M 4
97508 V 41
97659 B 12.9
99508 V 41
99608 B 12.9
101609 V 44
101709 B 12.9
101748 M 5
103758 V 47
103859 B 12.9
105858 V 46
105958 B 12.9
107959 V 46
108060 B 12.9
110059 V 42
110159 B 13.0
112160 V 38
112261 B 12.9
114358 V 34
114458 B 13.0
116510 V 27
116611 B 12.9
118661 V 24
118761 B 12.9
120759 V 25
120860 B 12.9
122860 V 23
122960 B 12.9
124958 V 25
125059 B 12.9
127061 V 30
127162 B 12.9
129158 V 33
129309 B 12.9
131211 V 27
131311 B 12.9
133308 V 19
133409 B 12.9
135410 V 14
135510 B 13.0
137511 V 16
137611 B 12.9
139610 V 26
139711 B 12.9
141710 V 25
141812 B 12.9
143959 V 22
144059 B 12.9
145961 V 16
146061 B 13.0
148058 V 13
148159 B 12.9
150159 V 17
150259 B 12.9
152260 V 23
152361 B 12.9
154361 V 25
154461 B 12.9
156608 V 21
156708 B 12.9
158658 V 18
158758 B 13.0
160560 V 15
162758 V 18
162859 B 12.9
164908 V 23
165008 B 12.9
167010 V 23
167110 B 12.9
169161 V 20
169261 B 13.0
171261 V 17
171361 B 13.0
173360 V 13
173460 B 13.0
175509 V 8
175610 B 13.0
177660 V 3
177761 B 13.0
179808 V 0
179909 B 13.0
181759 V 1
183958 V 2
184058 B 13.0
186061 V 3
186161 B 12.9
188211 V 2
188311 B 13.0
190361 V 0
190461 B 12.9
192458 V 2
192559 B 12.9
194608 V 0
194708 B 13.0
196560 V 2
198661 V 2
198761 B 13.0
200809 V 1
200910 B 12.9
202861 V 0
202961 B 13.0
204961 V 0
205061 B 13.0
207109 V -1
207710 B 11.9
209061 V -1
@@ -0,0 +1,4 @@
# 12-OBD-Speed CAN log (t = ms since boot)
# C adapter, P protocol, V speed km/h, B battery V, M mark, F raw line, D module found, I module list,
# S addr did data (DID supported), R addr did nrc (negative response), E note
121608 E idle
@@ -0,0 +1,4 @@
# 12-OBD-Speed CAN log (t = ms since boot)
# C adapter, P protocol, V speed km/h, B battery V, M mark, F raw line, D module found, I module list,
# S addr did data (DID supported), R addr did nrc (negative response), E note
121613 E idle
@@ -0,0 +1,4 @@
# 12-OBD-Speed CAN log (t = ms since boot)
# C adapter, P protocol, V speed km/h, B battery V, M mark, F raw line, D module found, I module list,
# S addr did data (DID supported), R addr did nrc (negative response), E note
121608 E idle
+248
View File
@@ -0,0 +1,248 @@
# 12-OBD-Speed CAN log (t = ms since boot)
# C adapter, P protocol, V speed km/h, B battery V, M mark, F raw line, D module found, I module list,
# S addr did data (DID supported), R addr did nrc (negative response), E note
3826 C OBDII ELM327 v2.1
3856 P A6
4036 E count suffix yes, scan step 2, module 0, pos 1344
4186 V 0
4216 B 12.9
6315 V 0
6345 B 12.9
8415 V 0
8445 B 12.9
10604 V 0
10634 B 12.9
12676 V 0
12706 B 12.9
14744 V 0
14774 B 12.9
16847 V 0
16877 B 12.9
19038 V 0
19068 B 12.9
21168 V 0
21198 B 12.9
23234 V 0
23264 B 12.9
25334 V 0
25364 B 12.9
27404 V 0
27434 B 12.9
29445 V 0
29475 B 12.9
31517 V 0
31547 B 12.9
33587 V 0
33617 B 12.9
35628 V 1
35658 B 12.9
37664 V 1
37694 B 12.9
39675 V 1
39705 B 12.9
41716 V 2
41746 B 12.9
43757 V 3
43787 B 12.9
45797 V 4
45827 B 12.9
47897 V 4
47927 B 12.9
50027 V 7
50057 B 12.9
50253 I probe, 0 new: 7E0
51811 E multi-DID 7E0: no (?TIMEOUT)
52201 V 11
52231 B 12.9
54167 V 17
56267 V 19
56297 B 12.9
58397 V 19
58427 B 12.9
60497 V 16
60527 B 12.9
62657 V 13
62687 B 12.9
64666 V 12
64711 B 12.9
66767 V 13
66797 B 12.9
68867 V 17
68927 B 12.9
70877 V 20
70907 B 12.9
73008 V 19
73038 B 12.9
75108 V 18
75138 B 12.9
77208 V 16
77238 B 12.9
79308 V 9
79338 B 12.9
81378 V 13
81408 B 12.9
83508 V 15
83538 B 12.9
85634 V 20
85664 B 12.9
86178 E progress 7E0 D5FF pos 1536, 11 found, 160 ms/DID
87768 V 23
87798 B 12.9
89864 V 22
89894 B 13.0
91965 V 17
91995 B 12.9
94066 V 7
94096 B 12.9
96166 V 5
96196 B 12.9
98266 V 0
98296 B 12.9
100366 V 0
100396 B 12.9
102466 V 1
102496 B 13.0
104567 V 0
104597 B 13.0
106667 V 2
106697 B 12.9
108766 V 11
108796 B 12.9
110867 V 21
110897 B 12.8
112922 V 29
112952 B 12.9
114992 V 35
115022 B 12.9
117017 V 33
117047 B 12.9
119133 V 28
119163 B 12.9
121218 V 25
121248 B 12.9
123315 V 25
123345 B 12.9
125415 V 23
125445 B 13.2
127516 V 24
127546 B 13.0
129617 V 31
129647 B 12.9
131717 V 37
131747 B 12.9
133817 V 40
133847 B 12.9
135918 V 43
135948 B 12.9
138014 V 42
138044 B 12.9
140115 V 42
140145 B 12.9
142216 V 42
142246 B 13.0
144316 V 41
144346 B 12.9
146416 V 41
146446 B 12.9
148517 V 43
148547 B 12.9
150618 V 43
150648 B 12.9
152714 V 41
152744 B 12.9
154844 V 39
154874 B 12.9
156945 V 41
156990 B 12.9
159075 V 44
159105 B 13.0
161176 V 43
161206 B 12.9
163277 V 38
163307 B 12.9
165377 V 35
165407 B 12.9
167478 V 29
167508 B 12.9
169578 V 31
169608 B 12.9
171674 V 35
171704 B 13.0
173775 V 33
173805 B 13.0
175875 V 27
175905 B 12.9
176270 E progress 7E0 D7FF pos 2048, 11 found, 175 ms/DID
177975 V 15
178005 B 13.1
180076 V 8
180106 B 13.0
182178 V 9
182208 B 12.9
184289 V 11
184319 B 12.9
186374 V 19
186404 B 12.9
188474 V 19
188504 B 12.9
190575 V 17
190605 B 12.9
192676 V 16
192706 B 12.9
194777 V 18
194807 B 12.9
196878 V 16
196908 B 13.2
198978 V 13
199008 B 13.2
201074 V 11
201104 B 12.9
203175 V 10
203205 B 12.9
205276 V 14
205306 B 12.9
207378 V 14
207408 B 12.9
209478 V 11
209508 B 13.0
211578 V 8
211608 B 12.9
213674 V 9
213704 B 13.1
215775 V 7
215805 B 13.0
217875 V 4
217905 B 12.9
219976 V 3
220006 B 13.0
222076 V 2
222106 B 12.9
224177 V 0
224207 B 12.9
226278 V 1
226308 B 12.9
228374 V 2
228404 B 13.0
230475 V 1
230505 B 13.0
232575 V 2
232605 B 13.1
234676 V 1
234706 B 13.3
236777 V 1
236807 B 12.9
238878 V 1
238908 B 12.9
240978 V 1
241008 B 12.9
243078 V 0
243108 B 12.5
243618 S 7E0 D980 ADFF9E80
245174 V 0
245204 B 12.9
247275 V 0
247305 B 13.0
249375 V 0
249405 B 13.0
251476 V 0
251506 B 13.3
+345
View File
@@ -0,0 +1,345 @@
# 12-OBD-Speed CAN log (t = ms since boot)
# C adapter, P protocol, V speed km/h, B battery V, M mark, F raw line, D module found, I module list,
# S addr did data (DID supported), R addr did nrc (negative response), E note
3266 C OBDII ELM327 v2.1
3296 P A6
3476 E count suffix yes, scan step 2, module 0, pos 2496
3627 V 0
3657 B 12.0
5218 E multi-DID 7E0: no (?TIMEOUT)
5728 V 0
5758 B 12.7
7824 V 0
7854 B 12.9
9911 V 0
9941 B 12.9
12012 V 0
12042 B 13.0
14113 V 0
14143 B 13.0
16239 V 0
16269 B 13.0
16634 E progress 7E0 D9FF pos 2560, 12 found, 25 ms/DID
18339 V 0
18369 B 13.0
20485 V 0
20515 B 12.9
22586 V 0
22616 B 12.9
24687 V 0
24717 B 12.9
26788 V 0
26818 B 13.0
28888 V 0
28918 B 12.9
30969 V 0
30999 B 12.9
33070 V 0
33100 B 12.9
35171 V 0
35201 B 13.0
37287 V 1
37317 B 12.9
39387 V 0
39417 B 12.9
41488 V 0
41518 B 12.9
43584 V 0
43614 B 12.9
45670 V 1
45700 B 12.8
47846 V 3
47876 B 12.9
49917 V 4
49947 B 12.8
52001 V 4
52031 B 13.0
54146 V 6
54176 B 12.9
56247 V 4
56277 B 12.9
58257 V 5
58287 B 12.9
60357 V 8
60387 B 12.9
62456 V 10
62486 B 12.9
64586 V 9
64616 B 12.9
66672 V 9
66702 B 12.9
68773 V 12
68803 B 12.9
70884 V 11
70914 B 12.9
72984 V 15
73014 B 12.9
75115 V 19
75145 B 12.9
77095 V 22
79195 V 20
79225 B 12.9
81295 V 17
81325 B 12.9
83395 V 15
83425 B 12.9
85494 V 12
85524 B 12.9
87594 V 10
87624 B 12.9
89694 V 7
89724 B 12.9
91794 V 5
91824 B 12.9
93924 V 8
93954 B 12.9
96084 V 14
96134 B 12.9
98095 V 21
98125 B 12.9
100195 V 26
100225 B 12.9
102295 V 29
102325 B 12.9
104395 V 29
104425 B 12.9
106259 E progress 7E0 DBFF pos 3072, 12 found, 175 ms/DID
106464 V 25
106494 B 12.9
108565 V 23
108595 B 12.9
110697 V 27
110727 B 12.9
112677 V 32
114747 V 37
114777 B 13.0
116847 V 37
116877 B 13.1
118946 V 38
118976 B 12.8
121046 V 38
121076 B 12.9
123146 V 37
123176 B 12.9
125261 V 37
125291 B 12.9
127347 V 39
127377 B 12.8
129446 V 40
129476 B 12.9
131546 V 38
131576 B 12.9
133646 V 38
133676 B 13.1
135746 V 36
135776 B 13.1
137846 V 36
137876 B 12.9
139946 V 37
139976 B 12.8
142045 V 37
142075 B 12.9
144145 V 37
144175 B 12.9
146275 V 35
146305 B 12.9
148377 V 32
148407 B 12.9
150478 V 28
150508 B 13.0
151617 S 7E0 DD00 A427F506
151768 S 7E0 DD01 021676
152574 V 23
152604 B 13.1
154675 V 20
154705 B 12.9
156776 V 23
156806 B 12.8
158877 V 23
158907 B 12.9
161008 V 22
161038 B 12.9
163104 V 22
163134 B 12.8
165204 V 27
165234 B 12.9
167305 V 30
167335 B 12.9
169406 V 27
169436 B 13.0
171506 V 19
171536 B 12.9
173606 V 12
173636 B 12.9
175706 V 15
175736 B 12.9
177807 V 10
177837 B 12.9
179907 V 9
179937 B 12.9
182007 V 10
182037 B 12.9
184107 V 11
184137 B 12.9
186206 V 14
186236 B 12.9
188307 V 14
188352 B 12.9
190407 V 12
190437 B 12.9
192508 V 13
192538 B 12.9
194604 V 12
194634 B 12.9
196198 E progress 7E0 DDFF pos 3584, 14 found, 175 ms/DID
197249 S 7E0 DE00 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2AFFFFFFFFFFFFFFFFFFFFFFFF0FFF2FFFFF2F0FF2FFFFFFFF2FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF10FFFFFFFFFFFFFF11FFFFFFFFFFFFFF12FFFFFFFFFFFFFF13FFFFFFFFFFFFFF14FFFFFFFFFFFFFF15FF0A59FFFFFFFF16FFFFFFFFFFFFFF17FFFFFFFFFFFFFF18FFFF7797FFFF00
197454 V 10
197484 B 12.9
198596 S 7E0 DE01 0707030302090E131717F4EDF1F4F8FA0107090802EEEEECF3F4F8FDFE011F180F070509090C100FF7F0EFF2F3F5F6F8F9F90403FAFAFBFBFF04070711371E22174810364250203730301130204D422020201220203431323541133137333132313114303534342020201520202031373330163445303032320017F5240901239802180106030053C200
199497 S 7E0 DE02 9EFF7F3FD11A803FC0CA7F3F0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000110000000000000012FE7F0100010100130000000000000014303534342020201520202031373330163445303032320017F5240901239802180106030053C200
199707 V 12
199737 B 12.9
201808 V 12
201838 B 12.9
203904 V 14
203934 B 13.1
206004 V 20
206034 B 13.1
208105 V 18
208135 B 12.9
210206 V 16
210236 B 12.9
212307 V 15
212337 B 12.9
214407 V 13
214437 B 12.9
216507 V 12
216537 B 12.9
218608 V 10
218638 B 12.9
220708 V 13
220738 B 13.1
222807 V 14
222837 B 13.1
224907 V 14
224937 B 12.8
227007 V 15
227037 B 12.8
229108 V 14
229138 B 12.8
230545 S 7E0 DEAC 0100010173E8414C180001D54A000075300D92910B0087FA0C4C8596824C0001A2AD00013DE40C60D24C09D9937F00001231409D054800001F4000001231000000B210B48BE445E302BE11428171B242409D12054819B4A746011300000000000000140045BD7246C20D15E6460000000000160000000000000017000000000000001800000000000000190000000000000020000000000000002100000000000000
231205 V 12
231235 B 12.8
233306 V 11
233336 B 12.9
235407 V 5
235437 B 12.8
237507 V 0
237537 B 12.9
239608 V 4
239638 B 12.8
241708 V 7
241738 B 12.9
243808 V 7
243838 B 12.9
245904 V 3
245934 B 12.8
248004 V 0
248034 B 12.8
250105 V 0
250135 B 12.8
252206 V 0
252236 B 12.8
254307 V 0
254337 B 12.8
256406 V 0
256436 B 13.0
258506 V 1
258536 B 12.8
260607 V 2
260637 B 12.9
262708 V 3
262738 B 12.9
264808 V 4
264838 B 12.8
266905 V 5
266935 B 12.8
269005 V 6
269035 B 12.8
271105 V 6
271135 B 12.8
273206 V 6
273236 B 13.1
275307 V 6
275337 B 13.1
277407 V 6
277437 B 12.9
279521 V 6
279551 B 12.9
281606 V 6
281636 B 12.7
283706 V 6
283736 B 12.8
285807 V 6
285837 B 12.8
287907 V 5
287937 B 12.8
289801 E progress 7E0 DFFF pos 4096, 18 found, 182 ms/DID
290007 V 4
290037 B 12.7
292108 V 4
292138 B 13.0
294208 V 3
294238 B 13.1
296308 V 1
296338 B 12.9
298405 V 1
298435 B 12.8
300506 V 0
300536 B 12.9
302606 V 0
302636 B 12.9
304707 V 0
304737 B 12.9
306808 V 0
306838 B 12.9
308905 V 0
308935 B 13.0
311005 V 0
311035 B 13.1
313104 V 0
313134 B 12.9
315205 V 0
315235 B 12.8
317306 V 0
317336 B 12.8
319407 V 0
319437 B 12.9
321507 V 0
321537 B 12.8
323607 V 0
323637 B 12.8
325708 V 0
325738 B 12.9
327804 V 0
327834 B 13.1
329905 V 0
329935 B 13.1
332005 V 0
332035 B 12.9
334105 V 0
334135 B 12.9
336204 V 0
336234 B 12.9
338304 V 0
338349 B 12.8
340434 V 0
340464 B 12.9
342534 V 0
342564 B 12.8
344634 V 0
344664 B 13.0
346738 V 0
346768 B 13.1
348838 V 0
348868 B 12.8
+352
View File
@@ -0,0 +1,352 @@
# 12-OBD-Speed CAN log (t = ms since boot)
# C adapter, P protocol, V speed km/h, B battery V, M mark, F raw line, D module found, I module list,
# S addr did data (DID supported), R addr did nrc (negative response), E note
3221 C OBDII ELM327 v2.1
3251 P A6
3431 E count suffix yes, scan step 2, module 0, pos 4416
3581 V 0
3612 B 12.1
5177 E multi-DID 7E0: no (?TIMEOUT)
5694 V 0
5724 B 12.9
7797 V 0
7827 B 12.9
9898 V 0
9928 B 13.0
11979 V 0
12009 B 12.9
14080 V 0
14110 B 13.0
16196 V 0
16226 B 12.9
18296 V 0
18326 B 12.9
20411 V 1
20441 B 12.9
22511 V 4
22541 B 13.0
24626 V 6
24656 B 12.9
26756 V 12
26786 B 12.9
28856 V 14
28886 B 12.9
30957 V 12
30987 B 12.9
33088 V 13
33118 B 12.9
35169 V 15
35199 B 12.9
37270 V 20
37300 B 13.0
38879 E progress 7E0 41FF pos 4608, 18 found, 69 ms/DID
39369 V 20
39399 B 12.9
41485 V 18
41515 B 12.9
43585 V 16
43615 B 12.9
45685 V 13
45715 B 12.8
47770 V 15
47800 B 13.0
49840 V 19
49870 B 12.9
51864 V 25
51894 B 12.9
53889 V 25
53919 B 13.0
55989 V 23
56019 B 13.0
58104 V 14
58134 B 12.9
60204 V 6
60234 B 12.9
62338 V 8
62368 B 12.9
64438 V 17
64468 B 12.9
66534 V 25
66564 B 12.9
68635 V 31
68665 B 12.9
70736 V 31
70766 B 12.9
72791 V 30
72821 B 13.0
74892 V 26
74922 B 13.1
77008 V 26
77038 B 12.9
79164 V 25
79194 B 12.9
81265 V 25
81295 B 12.9
83365 V 29
83395 B 12.9
85464 V 34
85494 B 12.9
87564 V 38
87594 B 12.9
89664 V 41
89694 B 12.9
91749 V 44
91779 B 13.0
93864 V 46
93894 B 12.9
95968 V 45
95998 B 12.9
98068 V 44
98098 B 12.8
100168 V 44
100198 B 12.9
102283 V 44
102313 B 12.9
104424 V 43
104454 B 12.9
106588 V 41
106618 B 12.9
108564 V 39
110619 V 38
110649 B 13.1
112735 V 38
112765 B 12.9
114866 V 35
114896 B 12.9
116996 V 25
117026 B 12.9
119097 V 12
119127 B 12.9
121198 V 8
121228 B 12.9
123298 V 6
123328 B 13.0
125394 V 9
125424 B 12.9
127495 V 13
127525 B 12.9
128490 E progress 7E0 43FF pos 5120, 18 found, 175 ms/DID
129596 V 16
129626 B 12.9
131697 V 15
131727 B 12.9
133828 V 13
133858 B 12.9
135924 V 14
135954 B 12.9
138025 V 13
138055 B 12.9
140124 V 15
140154 B 12.9
142225 V 16
142255 B 12.9
144326 V 14
144356 B 12.9
146397 V 12
146427 B 12.9
148498 V 11
148528 B 12.9
150594 V 6
150624 B 12.9
152694 V 7
152724 B 12.9
154796 V 9
154826 B 12.9
156926 V 18
156956 B 12.9
159026 V 19
159056 B 12.9
161127 V 14
161157 B 12.9
163226 V 9
163256 B 12.9
165326 V 9
165356 B 12.9
167426 V 11
167456 B 12.9
169526 V 11
169556 B 12.9
171626 V 9
171656 B 12.9
173725 V 13
173755 B 12.9
175856 V 13
175886 B 12.9
177987 V 11
178017 B 12.9
180087 V 9
180117 B 12.9
182188 V 9
182218 B 12.9
184284 V 9
184314 B 12.9
186384 V 11
186414 B 12.9
188485 V 9
188515 B 12.9
190615 V 6
190645 B 12.9
192715 V 6
192745 B 12.9
194815 V 7
194845 B 12.9
196914 V 6
196944 B 12.9
199014 V 8
199044 B 12.9
201114 V 10
201144 B 12.9
203214 V 9
203244 B 12.9
205314 V 11
205344 B 12.9
207414 V 10
207444 B 12.9
209514 V 9
209544 B 12.9
211614 V 8
211644 B 12.9
213714 V 11
213744 B 12.9
215814 V 12
215844 B 12.9
217915 V 11
217945 B 12.9
218309 E progress 7E0 45FF pos 5632, 18 found, 175 ms/DID
220014 V 10
220044 B 12.9
222114 V 8
222144 B 12.9
224214 V 6
224244 B 12.9
226314 V 4
226344 B 12.9
228415 V 3
228445 B 13.0
230514 V 2
230544 B 12.9
232614 V 4
232644 B 12.9
234714 V 2
234744 B 13.0
236814 V 1
236844 B 12.9
238944 V 1
238974 B 13.0
241044 V 0
241074 B 13.0
243145 V 0
243175 B 13.0
245246 V 0
245276 B 13.1
247347 V 1
247377 B 12.9
249477 V 0
249507 B 12.9
251577 V 4
251607 B 12.9
253618 V 5
253648 B 12.8
255718 V 5
255748 B 12.9
257818 V 4
257848 B 12.9
259918 V 3
259948 B 12.9
262018 V 2
262048 B 13.1
264117 V 2
264162 B 13.1
266218 V 1
266248 B 12.9
268318 V 0
268348 B 12.9
270418 V 1
270448 B 12.9
272518 V 1
272548 B 12.8
274617 V 1
274647 B 12.9
276717 V 1
276747 B 12.9
278817 V 0
278847 B 13.0
280917 V 0
280947 B 13.0
283017 V 0
283047 B 12.9
285118 V 1
285148 B 12.9
287217 V 1
287247 B 12.9
289317 V 0
289347 B 12.3
291417 V 0
291447 B 12.9
293517 V 1
293547 B 12.8
295618 V 0
295648 B 12.8
297717 V 0
297747 B 12.8
299817 V 0
299847 B 13.0
301917 V 1
301947 B 12.9
304017 V 1
304047 B 12.9
306118 V 0
306148 B 12.2
307862 E progress 7E0 47FF pos 6144, 18 found, 174 ms/DID
308218 V 0
308248 B 12.9
310318 V 0
310348 B 12.9
312418 V 0
312448 B 12.9
314518 V 0
314548 B 12.9
316618 V 0
316648 B 12.8
318718 V 0
318748 B 12.1
320817 V 1
320847 B 12.9
322917 V 2
322947 B 12.9
325017 V 0
325047 B 12.8
327118 V 0
327148 B 12.9
329218 V 1
329248 B 12.8
331317 V 0
331347 B 13.0
333417 V 7
333447 B 13.1
335517 V 8
335547 B 12.8
337618 V 9
337648 B 12.9
339718 V 6
339748 B 12.8
341817 V 3
341847 B 12.9
343917 V 1
343947 B 12.8
346017 V 0
346047 B 12.7
348118 V 3
348148 B 12.9
350218 V 2
350248 B 12.9
352318 V 2
352348 B 12.8
354417 V 2
354462 B 12.9
356518 V 1
356548 B 12.8
358618 V 0
358648 B 12.9
360714 V 0
360744 B 12.9
File diff suppressed because it is too large. Load diff
+698
View File
@@ -0,0 +1,698 @@
# 12-OBD-Speed CAN log (t = ms since boot)
# C adapter, P protocol, V speed km/h, B battery V, M mark, F raw line, D module found, I module list,
# S addr did data (DID supported), R addr did nrc (negative response), E note
3701 C OBDII ELM327 v2.1
3731 P A6
3911 E count suffix yes, scan step 2, module 0, pos 14976
4061 V 0
4091 B 12.1
5652 E multi-DID 7E0: no (?TIMEOUT)
6162 V 0
6222 B 13.0
8291 V 0
8321 B 13.0
10392 V 0
10422 B 12.8
12493 V 0
12523 B 12.8
14590 V 0
14636 B 12.8
15638 M 1
16691 V 0
16721 B 12.8
18839 V 0
18869 B 12.8
20832 V 0
22903 V 0
22933 B 12.9
25032 V 0
25062 B 13.0
27146 V 0
27266 B 12.7
29171 V 0
29201 B 12.7
31274 V 0
31304 B 12.8
33374 V 0
33404 B 12.7
35473 V 0
35503 B 12.8
37572 V 0
37602 B 12.8
39671 V 0
39701 B 12.8
41771 V 0
41801 B 12.8
43871 V 0
43901 B 12.9
45971 V 0
46001 B 12.8
48073 V 0
48103 B 12.7
50171 V 0
50201 B 12.7
52273 V 0
52303 B 12.8
54371 V 0
54401 B 12.8
56471 V 0
56501 B 12.8
58570 V 0
58600 B 12.8
60671 V 0
60701 B 12.8
62770 V 0
62800 B 12.8
64870 V 0
64900 B 12.8
66970 V 0
67000 B 12.8
69072 V 0
69102 B 12.8
71170 V 0
71200 B 12.8
73064 E progress 7E0 1BFF pos 15360, 203 found, 135 ms/DID
73274 V 0
73304 B 12.8
75373 V 0
75403 B 12.8
77472 V 0
77502 B 12.8
79572 V 0
79602 B 12.9
81674 V 0
81700 B 12.8
83802 V 0
83847 B 12.8
85781 V 0
87851 V 0
87881 B 12.8
89950 V 0
89980 B 12.8
92052 V 0
92082 B 12.8
94152 V 0
94182 B 12.9
96252 V 0
96282 B 12.8
98350 V 0
98380 B 12.8
100453 V 0
100483 B 12.8
102554 V 0
102584 B 12.8
104654 V 0
104684 B 12.7
106753 V 0
106783 B 12.8
108850 V 0
108880 B 12.8
110950 V 0
110980 B 12.8
113053 V 0
113083 B 12.8
115154 V 0
115184 B 12.8
117254 V 0
117284 B 12.8
119351 V 0
119381 B 12.8
121450 V 0
121480 B 12.8
123552 V 0
123582 B 12.8
125652 V 0
125682 B 12.3
127752 V 0
127782 B 12.8
129850 V 0
129880 B 12.8
131950 V 0
131980 B 12.5
134050 V 0
134080 B 12.7
136150 V 0
136180 B 12.8
138250 V 0
138280 B 12.2
140354 V 0
140384 B 12.9
142452 V 0
142482 B 12.8
144552 V 0
144582 B 12.8
146652 V 0
146682 B 12.8
148753 V 0
148783 B 12.8
150852 V 0
150882 B 12.8
152952 V 0
152982 B 12.7
155053 V 0
155083 B 12.8
157154 V 0
157184 B 12.8
159251 V 0
159281 B 12.5
161350 V 0
161380 B 12.8
162796 E progress 7E0 1DFF pos 15872, 203 found, 175 ms/DID
163092 S 7E0 1E01 00000000
163452 V 0
163482 B 12.8
163843 S 7E0 1E04 0A000000
164590 S 7E0 1E09 8000
164741 S 7E0 1E0A 0037
165042 S 7E0 1E0C 00
165193 S 7E0 1E0D 00
165344 S 7E0 1E0E 00
165550 V 0
165580 B 12.5
165792 S 7E0 1E0F 00
165943 S 7E0 1E10 00
166094 S 7E0 1E11 0283
166240 S 7E0 1E12 01
166390 S 7E0 1E13 0E78
166541 S 7E0 1E14 0066
166692 S 7E0 1E15 0F7C
166842 S 7E0 1E16 5000
166993 S 7E0 1E17 00
167143 S 7E0 1E18 00030000
167294 S 7E0 1E19 4958
167440 S 7E0 1E1A 0158
167651 V 0
167681 B 12.8
167892 S 7E0 1E1B 0000
168043 S 7E0 1E1C 029E
168193 S 7E0 1E1D 0898
169090 S 7E0 1E23 46
169751 V 0
169781 B 12.8
170142 S 7E0 1E28 00
170293 S 7E0 1E29 0000
170444 S 7E0 1E2A 0000
170590 S 7E0 1E2B 0000
170892 S 7E0 1E2D 0000
171043 S 7E0 1E2E 00
171850 V 0
171880 B 12.8
172091 S 7E0 1E33 0000
172392 S 7E0 1E35 0FF0
172543 S 7E0 1E36 0011
172694 S 7E0 1E37 0000
172991 S 7E0 1E39 80038E30
173142 S 7E0 1E3A 0067
173444 S 7E0 1E3C 0000
173590 S 7E0 1E3D 1902
173951 V 0
173981 B 12.8
175243 S 7E0 1E46 00
176051 V 0
176081 B 12.8
176591 S 7E0 1E4D 4088
177494 S 7E0 1E53 0033
177640 S 7E0 1E54 02EF
177791 S 7E0 1E55 0033
177957 S 7E0 1E56 0210
178182 V 0
178212 B 12.7
178722 S 7E0 1E59 0033
179473 S 7E0 1E5E 13
179774 S 7E0 1E60 00
180280 V 0
180310 B 12.8
182380 V 0
182410 B 12.8
184480 V 0
184510 B 12.7
186582 V 0
186612 B 12.7
188680 V 0
188710 B 12.8
190784 V 0
190814 B 12.8
192880 V 0
192910 B 12.8
194981 V 0
195011 B 12.8
197081 V 0
197111 B 12.8
199184 V 0
199214 B 12.8
201283 V 0
201313 B 12.8
203382 V 0
203412 B 12.8
205482 V 0
205512 B 12.8
206473 S 7E0 1EF8 0969
206624 S 7E0 1EF9 5F75
206774 S 7E0 1EFA 1E00
207581 V 0
207611 B 12.8
209681 V 0
209711 B 12.8
211797 V 0
211827 B 12.8
213882 V 0
213912 B 12.8
215983 V 0
216013 B 12.8
218083 V 0
218113 B 12.8
220181 V 0
220211 B 12.8
222280 V 0
222310 B 12.8
224382 V 0
224412 B 12.8
226480 V 0
226510 B 12.8
228584 V 0
228614 B 12.8
230680 V 0
230710 B 12.8
232783 V 0
232813 B 12.8
234880 V 0
234910 B 12.8
236982 V 0
237012 B 12.8
239083 V 0
239113 B 12.8
241181 V 0
241211 B 12.8
243281 V 0
243311 B 12.8
245381 V 0
245411 B 12.8
247480 V 0
247510 B 12.8
249584 V 0
249614 B 12.8
251684 V 0
251714 B 12.8
252524 E progress 7E0 1FFF pos 16384, 252 found, 175 ms/DID
253780 V 0
253810 B 12.8
255884 V 0
255914 B 12.8
257984 V 0
258014 B 12.8
259572 S 7E0 2028 2BE5
259723 S 7E0 2029 03FF
260084 V 0
260114 B 12.8
262181 V 0
262211 B 12.8
264280 V 0
264310 B 12.8
266381 V 0
266411 B 12.8
268482 V 0
268512 B 12.8
270583 V 0
270613 B 12.8
272681 V 0
272711 B 12.8
274781 V 0
274811 B 12.8
276884 V 0
276914 B 12.8
278983 V 0
279013 B 12.8
281082 V 0
281112 B 12.8
283184 V 0
283214 B 12.8
285280 V 0
285310 B 12.8
287382 V 0
287412 B 12.8
289483 V 0
289513 B 12.8
291584 V 0
291614 B 12.8
293680 V 0
293710 B 12.8
295780 V 0
295810 B 12.8
297880 V 0
297910 B 12.8
299984 V 0
300014 B 12.8
302083 V 0
302113 B 12.8
304182 V 0
304212 B 12.8
306280 V 0
306310 B 12.9
308381 V 0
308411 B 12.8
310480 V 0
310510 B 12.8
312583 V 0
312613 B 12.8
314683 V 0
314713 B 12.8
316782 V 0
316813 B 12.8
318883 V 0
318913 B 12.8
320981 V 0
321011 B 12.8
323081 V 0
323111 B 12.8
325182 V 0
325212 B 12.8
327282 V 0
327312 B 12.4
329382 V 0
329412 B 12.8
331482 V 0
331512 B 12.8
333582 V 0
333612 B 12.8
335680 V 0
335710 B 12.8
337781 V 0
337811 B 12.8
339882 V 0
339912 B 12.9
341982 V 0
342012 B 12.9
342242 E progress 7E0 21FF pos 16896, 254 found, 175 ms/DID
344080 V 0
344110 B 12.8
346184 V 0
346214 B 12.8
348282 V 0
348312 B 12.8
350383 V 0
350413 B 12.8
352482 V 0
352512 B 12.8
354584 V 0
354614 B 12.8
356684 V 0
356714 B 12.8
358783 V 0
358813 B 12.8
360899 V 0
360929 B 12.8
362999 V 0
363029 B 12.8
365009 V 0
365039 B 12.8
367108 V 0
367138 B 12.8
369190 V 0
369220 B 12.8
371291 V 0
371321 B 12.8
373390 V 0
373420 B 12.9
375490 V 0
375520 B 12.9
377607 V 0
377638 B 12.8
379707 V 0
379737 B 12.8
381805 V 0
381835 B 12.8
383905 V 0
383935 B 12.8
386009 V 0
386039 B 12.8
388108 V 0
388138 B 12.8
390194 V 0
390224 B 12.8
392294 V 0
392324 B 12.8
394390 V 0
394420 B 12.9
396505 V 0
396535 B 12.8
398608 V 0
398638 B 12.8
400705 V 0
400735 B 12.8
402809 V 0
402839 B 12.8
404908 V 0
404938 B 12.8
406931 V 0
406961 B 12.8
408986 V 0
409016 B 12.8
411013 V 0
411043 B 12.9
413157 V 0
413187 B 12.8
415256 V 0
415286 B 12.8
417356 V 0
417386 B 12.8
419456 V 0
419486 B 12.8
421558 V 0
421588 B 12.8
423656 V 0
423686 B 12.8
425755 V 0
425785 B 12.7
427858 V 0
427888 B 12.8
429880 V 0
429910 B 12.9
431399 E progress 7E0 23FF pos 17408, 254 found, 174 ms/DID
431905 V 0
431935 B 12.8
434035 V 0
434065 B 12.8
436139 V 0
436169 B 12.8
438237 V 0
438267 B 12.8
440336 V 0
440366 B 12.8
442439 V 0
442469 B 12.8
444538 V 0
444568 B 12.8
446637 V 0
446667 B 12.8
448739 V 0
448769 B 12.8
450838 V 0
450868 B 12.8
452937 V 0
452967 B 12.8
455036 V 0
455066 B 12.8
457135 V 0
457165 B 13.0
459235 V 0
459265 B 13.0
461339 V 0
461369 B 12.7
463436 V 0
463466 B 12.8
465539 V 0
465569 B 12.8
467635 V 0
467665 B 12.8
469735 V 0
469765 B 12.8
471835 V 0
471865 B 12.8
473935 V 0
473965 B 12.9
476038 V 0
476068 B 13.0
478137 V 0
478167 B 12.8
480236 V 0
480266 B 12.8
482336 V 0
482366 B 12.8
484437 V 0
484467 B 12.7
486536 V 0
486566 B 12.8
488635 V 0
488665 B 12.8
490735 V 0
490765 B 12.8
492835 V 0
492865 B 13.0
494939 V 0
494969 B 13.0
497037 V 0
497067 B 12.8
499139 V 0
499169 B 12.8
501235 V 0
501265 B 12.8
503335 V 0
503365 B 12.8
505436 V 0
505466 B 12.8
507537 V 0
507567 B 12.8
509637 V 0
509667 B 12.8
511735 V 0
511765 B 12.8
513836 V 0
513866 B 12.8
515937 V 0
515967 B 12.8
518037 V 0
518067 B 12.7
520135 V 0
520165 B 12.8
521132 E progress 7E0 25FF pos 17920, 254 found, 175 ms/DID
522236 V 0
522266 B 12.7
524339 V 0
524369 B 12.8
526438 V 0
526468 B 12.8
528537 V 0
528568 B 12.8
530637 V 0
530667 B 12.8
532739 V 0
532769 B 12.7
534835 V 0
534865 B 12.8
536939 V 0
536969 B 12.8
539039 V 0
539069 B 12.8
541135 V 0
541165 B 12.8
543236 V 0
543266 B 12.8
545338 V 0
545368 B 12.9
547437 V 0
547467 B 13.0
549536 V 0
549566 B 12.7
551638 V 0
551668 B 12.8
553735 V 0
553765 B 12.8
555835 V 0
555865 B 12.8
557938 V 0
557968 B 12.8
560037 V 0
560067 B 12.8
562137 V 0
562167 B 12.8
564235 V 0
564265 B 12.8
566336 V 0
566366 B 12.8
568436 V 0
568466 B 12.8
570536 V 0
570566 B 12.4
572638 V 0
572668 B 12.4
574739 V 0
574769 B 12.8
576835 V 0
576865 B 12.5
578935 V 0
578965 B 12.8
581036 V 0
581066 B 13.0
583136 V 0
583166 B 13.0
585235 V 0
585265 B 12.8
587339 V 0
587369 B 12.8
589438 V 0
589468 B 12.8
591535 V 0
591565 B 12.8
593639 V 0
593669 B 12.8
595739 V 0
595769 B 12.8
597835 V 0
597865 B 12.9
599937 V 0
599968 B 13.0
602038 V 0
602068 B 12.8
604138 V 0
604168 B 12.8
606237 V 0
606267 B 12.8
608336 V 0
608366 B 12.8
610435 V 0
610465 B 12.8
610831 E progress 7E0 27FF pos 18432, 254 found, 175 ms/DID
612535 V 0
612565 B 12.8
614639 V 0
614669 B 12.8
616739 V 0
616769 B 12.9
618838 V 0
618868 B 13.0
620935 V 0
620965 B 12.8
623035 V 0
623065 B 12.7
625135 V 0
625165 B 12.8
627115 V -1
627640 B 11.7
629125 V -1
629650 B 11.7
630027 E 7E0 not answering at 286D
635202 V -1
635727 B 11.8
637272 V -1
637797 B 11.6
638714 E 7E0 not answering at 286D
643874 V -1
644399 B 11.4
645883 V -1
646408 B 11.4
647306 E 7E0 not answering at 286D
652465 V -1
652990 B 11.4
654479 V -1
655004 B 11.4
655902 E 7E0 not answering at 286D
661062 V -1
661587 B 11.4
663071 V -1
663596 B 11.4
664525 E 7E0 not answering at 286D
669685 V -1
670225 B 11.4
671713 V -1
672238 B 11.4
673135 E 7E0 not answering at 286D
678295 V -1
678820 B 11.6
680308 V -1
680833 B 11.4
681775 E 7E0 not answering at 286D
686935 V -1
687460 B 11.4
688976 V -1
689501 B 11.4
690434 E 7E0 not answering at 286D
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,3 @@
# 12-OBD-Speed CAN log (t = ms since boot)
# C adapter, P protocol, V speed km/h, B battery V, M mark, F raw line, D module found, I module list,
# S addr did data (DID supported), R addr did nrc (negative response), E note
+2 -1
View File
@@ -65,7 +65,8 @@ static void open_session()
return;
}
f.print("# 12-OBD-Speed CAN log (t = ms since boot)\n"
"# C adapter, P protocol, V speed km/h, B battery V, M mark, F id data, N id (no frame), I survey IDs, E note\n");
"# C adapter, P protocol, V speed km/h, B battery V, M mark, F raw line, D module found, I module list,\n"
"# S addr did data (DID supported), R addr did nrc (negative response), E note\n");
f.close();
path = name;
written = 0;
+3 -2
View File
@@ -4,14 +4,15 @@
//
// Line format: "<ms since boot> <type> <data>"
// C adapter info P protocol (ATDPN) V speed km/h (010D) B battery V M mark number
// F <id> <data> one CAN frame (hex) N <id> no frame seen I <ids> IDs found by the survey
// F <line> raw monitor line D <addr> <reply> module found I <addrs> module list
// S <addr> <did> <data> DID supported R <addr> <did> <nrc> other negative response
// E <text> adapter message / note
#pragma once
#include <Arduino.h>
#define CANLOG_FOLDER "/canlog"
#define CANLOG_SLOTS 3 // frames shown on the log page (the Ford candidate IDs)
#define CANLOG_SLOTS 3 // info lines shown on the log page (modules, DIDs found, last reply)
void can_log_begin();
bool can_log_enabled();
+9 -5
View File
@@ -226,6 +226,7 @@ static void add_mark()
static void on_speed_tapped(lv_event_t *e) { add_mark(); }
static void on_mark_clicked(lv_event_t *e) { add_mark(); }
static void on_log_toggle_clicked(lv_event_t *e) { can_log_set_enabled(!can_log_enabled()); }
static void on_scan_reset_clicked(lv_event_t *e) { obd_scan_reset(); }
// ---------- speed page ----------
static void build_speed_tile()
@@ -460,10 +461,12 @@ static void build_log_tile()
lv_label_set_text(log_phase_label, "");
lv_obj_align(log_phase_label, LV_ALIGN_TOP_MID, 0, 68);
// last frame of the Ford candidate IDs
// scan info: modules found, DIDs found, last positive reply
log_frames_label = lv_label_create(tile_log);
lv_obj_set_size(log_frames_label, 290, 66);
lv_label_set_long_mode(log_frames_label, LV_LABEL_LONG_MODE_DOTS);
lv_obj_set_style_text_color(log_frames_label, COLOR_TEXT, 0);
lv_obj_set_style_text_font(log_frames_label, &lv_font_montserrat_16, 0);
lv_obj_set_style_text_font(log_frames_label, &lv_font_montserrat_14, 0);
lv_obj_set_style_text_align(log_frames_label, LV_TEXT_ALIGN_CENTER, 0);
lv_label_set_text(log_frames_label, "");
lv_obj_align(log_frames_label, LV_ALIGN_TOP_MID, 0, 94);
@@ -487,7 +490,8 @@ static void build_log_tile()
lv_label_set_text(hint, "While logging: tap the speed page\nto add a mark (sign passed,\nset speed changed). Log files in\n" CANLOG_FOLDER " on the SD card.");
lv_obj_align(hint, LV_ALIGN_TOP_MID, 0, 208);
make_button(tile_log, "Done", 0, 296, 110, on_done_clicked);
make_button(tile_log, "Reset scan", -56, 296, 104, on_scan_reset_clicked);
make_button(tile_log, "Done", 56, 296, 92, on_done_clicked);
}
static void build_ui()
@@ -627,12 +631,12 @@ static void update_log()
set_label(log_toggle_label, on ? "Stop" : "Start");
set_label(log_status_label, can_log_status() + (on ? " marks " + String(can_log_marks()) : String()));
set_label(log_phase_label, on ? can_log_phase() : String());
static const char *names[CANLOG_SLOTS] = {"165 set", "202 acc", "3D9 sign"};
String frames;
for (int i = 0; i < CANLOG_SLOTS; i++)
{
String f = can_log_frame(i);
frames += String(names[i]) + " " + (f.length() ? f : String("-")) + (i < CANLOG_SLOTS - 1 ? "\n" : "");
if (f.length())
frames += (frames.length() ? "\n" : "") + f;
}
set_label(log_frames_label, frames);
}
+470 -217
View File
@@ -12,13 +12,7 @@
#define VOLTAGE_INTERVAL_MS 2000 // ATRV while driving
#define IDLE_VOLTAGE_INTERVAL_MS 30000 // ATRV while idle (adapter-internal, doesn't wake the car's bus)
#define WAKE_VOLTAGE 13.2f // above this the alternator is charging: engine running
#define LOG_OBD_INTERVAL_MS 2000 // speed while logging (between monitor windows)
#define LOG_SURVEY_MS 1300 // per ID range; > 1 s so slow (1 Hz) messages are seen
#define LOG_SURVEY_MAX_LINES 300 // more in one window: split the range
#define LOG_CAPTURE_MS 1300 // waiting for one frame of an ID
#define LOG_RAW_MS 2000
#define LOG_RESURVEY_MS (10 * 60 * 1000)
#define LOG_TARGET_EVERY 8 // the candidate IDs after every 8 others
#define LOG_OBD_INTERVAL_MS 2000 // speed while scanning (between requests)
// ---------- shared state (protected by `mtx`) ----------
static SemaphoreHandle_t mtx;
@@ -46,17 +40,8 @@ static NimBLERemoteCharacteristic *chr_write = nullptr, *chr_notify = nullptr;
static Preferences prefs;
static uint32_t next_attempt = 0, next_voltage = 0;
static int fails = 0;
static bool scan_ready = false; // diagnostic scan set up on this connection (see below)
// CAN logging (see can_log.h), worker-owned
enum class LogMode
{
Off, // not logging (or not set up since the last connect)
Survey, // finding the IDs on the bus, range by range
Capture, // one frame of every known ID in turn
Raw, // adapter can't filter by wildcard: unfiltered monitor windows
NoCan, // not a CAN car: only speed/voltage are logged
};
static LogMode log_mode = LogMode::Off;
static void lock() { xSemaphoreTake(mtx, portMAX_DELAY); }
static void unlock() { xSemaphoreGive(mtx); }
@@ -261,12 +246,12 @@ static void disconnect()
if (client && client->isConnected())
client->disconnect();
speed_kmh = -1;
if (log_mode != LogMode::Off)
if (scan_ready)
{
can_log_line("E disconnected");
can_log_set_phase("Adapter not connected");
}
log_mode = LogMode::Off; // ATZ on reconnect resets the adapter: set up again
scan_ready = false; // ATZ on reconnect resets the adapter: set up again
}
// Finds the ELM UART characteristics: service FFF0 (verified: FFF1 notify + write), else any notify+write pair
@@ -326,6 +311,7 @@ static bool connect_and_init()
set_status("Adapter not found");
return false;
}
client->updateConnParams(6, 12, 0, 400); // 7.5-15 ms interval (the scan sends thousands of requests)
if (!find_characteristics() || !chr_notify->subscribe(chr_notify->canNotify(), on_notify))
{
set_status("Not an ELM adapter?");
@@ -391,181 +377,485 @@ static void poll_speed()
}
}
// ---------- CAN logging ----------
// Ford candidates from opendbc (ford_lincoln_base_pt.dbc, newer Fords - to be confirmed on the Fiesta Mk8):
// 0x165 EngBrakeData: Veh_V_DsplyCcSet (cruise set speed as shown), 0x202: Veh_V_RqCcSet (ACC set speed),
// 0x3D9 IPMA_Data2: IsaVLim_D_Rq (speed limit from the camera)
static const uint16_t LOG_TARGETS[CANLOG_SLOTS] = {0x165, 0x202, 0x3D9};
static std::vector<String> survey_queue; // ID patterns still to listen to ("3XX", "3DX", "3D9")
static std::vector<uint16_t> log_ids; // all IDs seen, sorted
static size_t capture_index = 0;
static uint32_t capture_count = 0;
static uint32_t next_log_obd = 0, next_survey = 0;
static bool exact_filter = false; // adapter supports ATCRA hhh
static int id_digits = 3; // 11-bit IDs; 29-bit in Raw mode
static bool caf_on = true; // CAN auto formatting (ISO-TP), the adapter's default
// ---------- diagnostic scan (while logging is on, see can_log.h) ----------
// The Fiesta Mk8's OBD port only carries diagnostic traffic (gateway; first test drive, docs/canlog), so the
// cruise set speed and the speed limit have to be asked from the modules. Only UDS ReadDataByIdentifier (0x22)
// in the default session is used: read-only, nothing in the car is changed. Steps (progress kept in NVS "scan"):
// 1. unfiltered monitor check, once: is there really no broadcast traffic?
// 2. module discovery: 22 F188 (software number) to every address 0x700..0x7EF, reply on address + 8
// 3. DID scan of the modules, most promising first; every positive reply is logged with its data
enum class ScanStep : uint8_t
{
RawCheck,
Discover,
Dids,
Done,
};
// Ford: IPMA (camera, speed signs), CCM (radar, ACC), IPC (cluster), PCM; other modules found come after these
static const uint16_t SCAN_PRIORITY[] = {0x706, 0x764, 0x720, 0x7E0};
// order in which the DID space is walked: likely Ford live-data ranges first
static const uint16_t SCAN_SEGMENTS[][2] = {
{0xD000, 0xDFFF}, {0x4000, 0x4FFF}, {0x0000, 0x3FFF}, {0x5000, 0xCFFF}, {0xE000, 0xFFFF}};
static bool scan_loaded = false; // progress read from NVS
static ScanStep scan_step = ScanStep::RawCheck;
static std::vector<uint16_t> scan_modules; // discovered, in scan order
static uint32_t scan_module = 0; // index into scan_modules
static uint32_t scan_pos = 0; // discovery: address; DID scan: position in the walk (0..65535)
static uint32_t scan_found = 0; // positive replies in the current module
static uint32_t scan_unsaved = 0;
static int scan_silent = 0; // consecutive requests without any reply
static uint16_t current_header = 0x7DF;
static uint32_t next_scan_obd = 0;
static bool count_suffix = false; // adapter understands "<request>1" (return after the first reply)
static bool caf_on = true; // CAN auto formatting (ISO-TP), the adapter's default
static volatile bool req_scan_reset = false;
static bool scan_probed = false; // second module search done (NVS)
static uint16_t probe_addr = 0; // 0 = not started on this connection
static int probe_new = 0;
static int multi_did = 0; // 0 = not tested, 1 = several DIDs per request work, 2 = one at a time
static uint16_t multi_module = 0; // module multi_did was tested on
static uint32_t progress_ms = 0;
// Monitoring wants the raw frames (CAF off), OBD requests need CAF on (adds/strips the ISO-TP byte)
static String hex3(uint16_t v)
{
char b[4];
snprintf(b, sizeof(b), "%03X", v);
return b;
}
static String hex4(uint16_t v)
{
char b[5];
snprintf(b, sizeof(b), "%04X", v);
return b;
}
// Monitoring wants the raw frames (CAF off), requests need CAF on (adds/strips the ISO-TP bytes)
static void set_caf(bool on)
{
if (on != caf_on && elm_command(on ? "ATCAF1" : "ATCAF0", 1500).length())
caf_on = on;
}
// "3D9FE00000000000" (ATH1, ATS0) -> id "3D9", data "FE00000000000000"
static bool parse_frame(String line, String &id, String &data)
static uint16_t did_at(uint32_t pos)
{
line.replace(" ", "");
if (line.length() < (unsigned)id_digits || (line.length() - id_digits) % 2)
return false;
for (unsigned i = 0; i < line.length(); i++)
if (!isxdigit((unsigned char)line[i]))
return false;
line.toUpperCase();
id = line.substring(0, id_digits);
data = line.substring(id_digits);
return true;
}
static void note_id(uint16_t id)
{
auto it = std::lower_bound(log_ids.begin(), log_ids.end(), id);
if (it == log_ids.end() || *it != id)
log_ids.insert(it, id);
}
// Logs the received lines: frames (at most `per_id` per ID, 0 = all) and adapter messages
static void log_lines(const std::vector<String> &lines, int per_id, bool *overflow)
{
std::vector<std::pair<String, int>> counts;
for (const String &line : lines)
for (auto &seg : SCAN_SEGMENTS)
{
String id, data;
if (!parse_frame(line, id, data))
{
if (line.indexOf("BUFFER FULL") >= 0 && overflow)
*overflow = true;
can_log_line("E " + line);
continue;
}
if (id_digits == 3)
note_id((uint16_t)strtol(id.c_str(), nullptr, 16));
int n = 0;
for (auto &c : counts)
if (c.first == id)
n = ++c.second;
if (n == 0)
counts.push_back({id, n = 1});
if (per_id == 0 || n <= per_id)
can_log_line("F " + id + " " + data);
for (int s = 0; s < CANLOG_SLOTS; s++)
if (id_digits == 3 && strtol(id.c_str(), nullptr, 16) == LOG_TARGETS[s])
can_log_set_frame(s, data);
uint32_t len = seg[1] - seg[0] + 1;
if (pos < len)
return seg[0] + pos;
pos -= len;
}
return 0xFFFF;
}
static String id_hex(uint16_t id)
static void scan_save()
{
char b[4];
snprintf(b, sizeof(b), "%03X", id);
return b;
Preferences p;
p.begin("scan", false);
p.putUChar("step", (uint8_t)scan_step);
p.putBytes("mods", scan_modules.data(), scan_modules.size() * sizeof(uint16_t));
p.putUInt("mod", scan_module);
p.putUInt("pos", scan_pos);
p.putUInt("found", scan_found);
p.putBool("probed", scan_probed);
p.end();
scan_unsaved = 0;
}
// Waits for one frame of `id`
static void capture_id(uint16_t id)
static void scan_load()
{
if (elm_command("ATCRA " + id_hex(id), 1500).length() == 0)
return note_no_reply();
std::vector<String> lines;
if (!elm_monitor(LOG_CAPTURE_MS, 1, lines))
return note_no_reply();
Preferences p;
p.begin("scan", true);
scan_step = (ScanStep)p.getUChar("step", (uint8_t)ScanStep::RawCheck);
scan_modules.resize(p.getBytesLength("mods") / sizeof(uint16_t));
if (scan_modules.size())
p.getBytes("mods", scan_modules.data(), scan_modules.size() * sizeof(uint16_t));
scan_module = p.getUInt("mod", 0);
scan_pos = p.getUInt("pos", 0);
scan_found = p.getUInt("found", 0);
scan_probed = p.getBool("probed", false);
p.end();
if (scan_step > ScanStep::Done)
scan_step = ScanStep::RawCheck;
scan_loaded = true;
}
static void scan_reset()
{
scan_step = ScanStep::RawCheck;
scan_modules.clear();
scan_module = scan_pos = scan_found = 0;
scan_probed = false;
scan_save();
can_log_line("E scan reset");
}
// Header (request address) + receive filter (reply address = request + 8); 0x7DF = default OBD broadcast
static void use_header(uint16_t addr)
{
if (addr == current_header)
return;
elm_command("ATSH " + hex3(addr), 1500);
elm_command(addr == 0x7DF ? String("ATAR") : "ATCRA " + hex3(addr + 8), 1500);
current_header = addr;
}
// Reply without spaces / multi-frame line numbers: "62D00012", "7F2231", "" = nothing, else adapter text
static String clean_reply(const String &reply)
{
String out;
int start = 0;
int line_no = 0;
while (start <= (int)reply.length())
{
int nl = reply.indexOf('\n', start);
if (nl < 0)
nl = reply.length();
String line = reply.substring(start, nl);
start = nl + 1;
line.replace(" ", "");
line.trim();
if (!line.length())
continue;
if (line.length() > 2 && line[1] == ':')
line = line.substring(2); // "0:62D0..." multi-frame part
else if (line_no == 0 && line.length() == 3 && reply.indexOf(':') >= 0)
continue; // multi-frame byte count "014"
out += line;
line_no++;
}
out.toUpperCase();
return out;
}
static String scan_request(uint16_t addr, const String &req)
{
use_header(addr);
String r = elm_command(count_suffix ? req + "1" : req, 1500);
if (r.length() == 0)
{
note_no_reply();
return "?TIMEOUT";
}
fails = 0;
if (lines.empty())
can_log_line("N " + id_hex(id));
log_lines(lines, 0, nullptr);
r = clean_reply(r);
if (r.indexOf("7F" + req.substring(0, 2) + "78") >= 0)
{
vTaskDelay(pdMS_TO_TICKS(300)); // "response pending": let the late reply pass (next command clears it)
}
return r;
}
// Listens to one ID range ("3XX"); a range too busy for the adapter is split into 16 smaller ones
static void survey_range(const String &pattern)
static bool is_reply(const String &r, const String &req)
{
if (elm_command("ATCRA " + pattern, 1500).length() == 0)
return note_no_reply();
std::vector<String> lines;
if (!elm_monitor(LOG_SURVEY_MS, LOG_SURVEY_MAX_LINES, lines))
return note_no_reply();
fails = 0;
bool overflow = (int)lines.size() >= LOG_SURVEY_MAX_LINES;
log_lines(lines, 2, &overflow);
int x = pattern.indexOf('X');
if (overflow && x >= 0)
for (int d = 0; d < 16; d++)
{
String child = pattern;
child.setCharAt(x, "0123456789ABCDEF"[d]);
survey_queue.push_back(child);
}
return r.startsWith(String("6") + req.substring(1, 2)) || r.startsWith("7F" + req.substring(0, 2));
}
static void start_survey()
{
survey_queue.clear();
for (int i = 0; i < 8; i++)
survey_queue.push_back(String(i) + "XX");
log_mode = LogMode::Survey;
}
// Called once per connection while logging is on: checks the protocol and what the adapter can filter
static void log_setup()
// Called once per connection while logging is on
static void scan_setup()
{
if (!scan_loaded)
scan_load();
can_log_line("C " + (saved_name.length() ? saved_name : saved_addr) + " " + elm_command("ATI", 1500));
String dp = elm_command("ATDPN", 1500); // "A6" = auto, ISO 15765-4 CAN 11 bit 500 kbit
can_log_line("P " + dp);
char p = dp.length() ? dp[dp.length() - 1] : '?';
next_log_obd = 0;
caf_on = true; // adapter was just reset (ATZ)
if (p < '6' || p > '9')
{
log_mode = LogMode::NoCan;
can_log_set_phase("Not a CAN protocol (" + dp + ")");
return;
}
// silent monitoring: the adapter never acknowledges or disturbs frames on the bus
can_log_line("E ATCSM1 " + elm_command("ATCSM1", 1500));
elm_command("ATH1", 1500); // IDs in front of the data
id_digits = (p == '7' || p == '9') ? 8 : 3;
exact_filter = id_digits == 3 && elm_command("ATCRA 3D9", 1500).indexOf('?') < 0;
bool wildcard = exact_filter && elm_command("ATCRA 7XX", 1500).indexOf('?') < 0;
elm_command("ATAR", 1500);
if (wildcard)
{
start_survey();
}
else
{
log_mode = LogMode::Raw;
can_log_line(String("E no wildcard filter") + (exact_filter ? "" : ", no ID filter") + ": unfiltered");
}
caf_on = true; // adapter was just reset (ATZ)
current_header = 0x7DF;
elm_command("ATST19", 1500); // reply timeout 100 ms (default 200): modules answer within a few ms
String r = elm_command("01001", 1500);
count_suffix = r.indexOf("4100") >= 0 || r.indexOf("41 00") >= 0;
can_log_line(String("E count suffix ") + (count_suffix ? "yes" : "no") + ", scan step " + (int)scan_step +
", module " + scan_module + ", pos " + scan_pos);
next_scan_obd = 0;
probe_addr = 0;
multi_module = 0;
progress_ms = millis();
scan_ready = true;
}
static void log_stop()
static void scan_stop()
{
set_caf(true);
elm_command("ATAR", 1500);
elm_command("ATH0", 1500);
log_mode = LogMode::Off;
use_header(0x7DF);
elm_command("ATST32", 1500);
scan_ready = false;
can_log_set_phase("");
}
// One unit of logging work (one ID range / one ID / one raw window), with speed + voltage every 2 s
static void scan_raw_check()
{
can_log_set_phase("Listening (no filter)");
int frames = 0;
for (int caf = 0; caf < 2; caf++)
{
set_caf(caf == 1);
elm_command("ATH1", 1500);
std::vector<String> lines;
bool ok = elm_monitor(5000, 200, lines);
elm_command("ATH0", 1500);
for (const String &l : lines)
{
can_log_line(String("F ") + l);
if (l.indexOf("NO DATA") < 0)
frames++;
}
if (!ok)
return note_no_reply();
}
set_caf(true);
can_log_line("E raw check: " + String(frames) + " lines");
scan_step = ScanStep::Discover;
scan_pos = 0x700;
scan_save();
}
static void scan_discover_step()
{
if (scan_pos == 0x700)
scan_modules.clear();
if (scan_pos == 0x7DF) // functional (broadcast) address
scan_pos++;
if (scan_pos > 0x7EF)
{
bool pcm = std::find(scan_modules.begin(), scan_modules.end(), 0x7E0) != scan_modules.end();
String list;
for (uint16_t m : scan_modules)
list += " " + hex3(m);
can_log_line("I" + list);
if (!pcm)
{
// not even the engine computer answered: ignition off? try again later
can_log_line("E discovery found no PCM, again");
scan_pos = 0x700;
vTaskDelay(pdMS_TO_TICKS(2000));
return;
}
// scan order: the promising modules first, then the rest
std::vector<uint16_t> order;
for (uint16_t p : SCAN_PRIORITY)
if (std::find(scan_modules.begin(), scan_modules.end(), p) != scan_modules.end())
order.push_back(p);
for (uint16_t m : scan_modules)
if (std::find(order.begin(), order.end(), m) == order.end())
order.push_back(m);
scan_modules = order;
scan_step = ScanStep::Dids;
scan_module = scan_pos = scan_found = 0;
scan_save();
return;
}
uint16_t addr = scan_pos;
can_log_set_phase("Finding modules " + hex3(addr) + ", " + String(scan_modules.size()) + " found");
String r = scan_request(addr, "22F188");
if (r == "?TIMEOUT")
return;
if (is_reply(r, "22F188"))
{
scan_modules.push_back(addr);
can_log_line("D " + hex3(addr) + " " + r);
}
else if (r.length() && r != "NODATA")
can_log_line("E " + hex3(addr) + " " + r);
scan_pos++;
}
// Second module search (test drive 2 found only the PCM with 22F188 and a 100 ms timeout): TesterPresent (3E00,
// single-frame reply) with a 1 s timeout to every address not known yet. Runs once (NVS "probed").
static void scan_probe_step()
{
if (probe_addr == 0)
{
probe_addr = 0x700;
probe_new = 0;
elm_command("ATSTFF", 1500); // ~1 s
}
while (probe_addr == 0x7DF ||
std::find(scan_modules.begin(), scan_modules.end(), probe_addr) != scan_modules.end())
probe_addr++;
if (probe_addr > 0x7EF)
{
elm_command("ATST19", 1500);
String list;
for (uint16_t m : scan_modules)
list += " " + hex3(m);
can_log_line("I probe, " + String(probe_new) + " new:" + list);
if (probe_new)
{
// promising modules first again; the PCM scan starts over (it had only just begun)
std::vector<uint16_t> order;
for (uint16_t p : SCAN_PRIORITY)
if (std::find(scan_modules.begin(), scan_modules.end(), p) != scan_modules.end())
order.push_back(p);
for (uint16_t m : scan_modules)
if (std::find(order.begin(), order.end(), m) == order.end())
order.push_back(m);
if (order[0] != scan_modules[scan_module < scan_modules.size() ? scan_module : 0])
scan_module = scan_pos = scan_found = 0;
scan_modules = order;
}
scan_probed = true;
scan_save();
return;
}
uint16_t addr = probe_addr;
can_log_set_phase("Probing modules " + hex3(addr) + " (1 s timeout)");
String r = scan_request(addr, "3E00");
if (r == "?TIMEOUT")
return;
if (r.startsWith("7E") || r.startsWith("7F3E"))
{
String id = scan_request(addr, "22F188");
can_log_line("D " + hex3(addr) + " 3E:" + r + " F188:" + id);
scan_modules.push_back(addr);
probe_new++;
}
else if (r.length() && r != "NODATA")
can_log_line("E " + hex3(addr) + " 3E00 " + r);
probe_addr++;
}
// Does the module answer a request with several DIDs (ISO 14229: only the supported ones are returned)?
// F1FF / F1FE are practically never used, F188 always is (the module was found with it).
static void scan_test_multi(uint16_t mod)
{
String r = scan_request(mod, "22F1FFF188F1FE");
multi_did = r.startsWith("62F188") ? 1 : 2;
can_log_line("E multi-DID " + hex3(mod) + ": " + (multi_did == 1 ? "yes" : "no") + " (" + r.substring(0, 12) + ")");
multi_module = mod;
}
// Logs one DID's reply; returns false if the module looks gone (no reply)
static bool scan_single(uint16_t mod, uint16_t did)
{
String r = scan_request(mod, "22" + hex4(did));
if (r.startsWith("62" + hex4(did)))
{
scan_found++;
String data = r.substring(6);
can_log_line("S " + hex3(mod) + " " + hex4(did) + " " + data);
can_log_set_frame(2, "Last: " + hex3(mod) + " " + hex4(did) + " = " + data.substring(0, 16));
}
else if (r.startsWith("7F22"))
{
String nrc = r.substring(4, 6);
if (nrc != "31") // 31 = not supported; others (33 security, 22 conditions...) are worth knowing
can_log_line("R " + hex3(mod) + " " + hex4(did) + " " + nrc);
}
else if (r == "NODATA" || r.length() == 0)
return false;
else if (r != "?TIMEOUT")
can_log_line("E " + hex3(mod) + " " + hex4(did) + " " + r);
return true;
}
static void scan_did_step()
{
if (scan_module >= scan_modules.size())
{
scan_step = ScanStep::Done;
scan_save();
can_log_line("E scan done");
return;
}
uint16_t mod = scan_modules[scan_module];
if (scan_pos >= 0x10000)
{
can_log_line("E module " + hex3(mod) + " done, " + String(scan_found) + " DIDs");
scan_module++;
scan_pos = scan_found = 0;
scan_save();
return;
}
if (multi_module != mod)
scan_test_multi(mod);
// up to 3 DIDs per request (fits one CAN frame); a hit is then asked one by one
int n = multi_did == 1 ? (int)std::min<uint32_t>(3, 0x10000 - scan_pos) : 1;
uint16_t dids[3];
String req = "22";
for (int i = 0; i < n; i++)
{
dids[i] = did_at(scan_pos + i);
req += hex4(dids[i]);
}
bool answered = true;
if (n == 1)
{
answered = scan_single(mod, dids[0]);
}
else
{
String r = scan_request(mod, req);
if (r == "?TIMEOUT")
return;
if (r == "NODATA" || r.length() == 0)
answered = false;
else if (r.startsWith("7F2231"))
; // none of them supported
else if (r.startsWith("7F2213") || r.startsWith("7F2212"))
{
can_log_line("E multi-DID refused at " + hex4(dids[0]) + ", single from now on");
multi_did = 2;
return;
}
else
for (int i = 0; i < n; i++)
scan_single(mod, dids[i]);
}
if (!answered)
{
if (++scan_silent >= 20)
{
// module stopped answering (ignition off / asleep): go back and wait
can_log_line("E " + hex3(mod) + " not answering at " + hex4(dids[0]));
scan_pos = scan_pos >= 19u * n ? scan_pos - 19 * n : 0;
scan_silent = 0;
vTaskDelay(pdMS_TO_TICKS(5000));
return;
}
}
else
scan_silent = 0;
uint32_t before = scan_pos;
scan_pos += n;
scan_unsaved += n;
if (scan_unsaved >= 64)
scan_save();
if ((before >> 6) != (scan_pos >> 6))
{
char ph[64];
snprintf(ph, sizeof(ph), "Scan %03X (%u/%u) %04X %.1f %%", mod, (unsigned)scan_module + 1,
(unsigned)scan_modules.size(), dids[0], scan_pos * 100.0f / 65536);
can_log_set_phase(ph);
can_log_set_frame(1, "Found in " + hex3(mod) + ": " + String(scan_found));
}
if ((before >> 9) != (scan_pos >> 9))
{
// progress line every 512 DIDs, with the rate
uint32_t now = millis();
can_log_line("E progress " + hex3(mod) + " " + hex4(dids[0]) + " pos " + String(scan_pos) + ", " +
String(scan_found) + " found, " + String((now - progress_ms) / 512) + " ms/DID");
progress_ms = now;
}
}
// One unit of scan work (one request), with speed + voltage every 2 s
static void log_step()
{
if (log_mode == LogMode::Off)
log_setup();
if ((int32_t)(millis() - next_log_obd) >= 0)
if (req_scan_reset)
{
next_log_obd = millis() + LOG_OBD_INTERVAL_MS;
elm_command("ATAR", 1500); // the ID filter would hide the ECU's reply
set_caf(true);
req_scan_reset = false;
if (!scan_loaded)
scan_load();
scan_reset();
}
if (!scan_ready)
scan_setup();
if ((int32_t)(millis() - next_scan_obd) >= 0)
{
next_scan_obd = millis() + LOG_OBD_INTERVAL_MS;
use_header(0x7DF);
poll_speed();
if ((int32_t)(millis() - next_voltage) >= 0)
{
@@ -573,69 +863,30 @@ static void log_step()
read_voltage();
can_log_line("B " + String(voltage, 1));
}
String mods;
for (uint16_t m : scan_modules)
mods += " " + hex3(m);
can_log_set_frame(0, "Modules:" + (mods.length() ? mods : String(" -")));
return;
}
if (!client->isConnected() || !chr_write)
return;
if (log_mode != LogMode::NoCan)
set_caf(false);
switch (log_mode)
switch (scan_step)
{
case LogMode::Survey:
if (survey_queue.empty())
{
String ids;
for (uint16_t id : log_ids)
ids += " " + id_hex(id);
can_log_line("I" + ids);
log_mode = LogMode::Capture;
next_survey = millis() + LOG_RESURVEY_MS;
break;
}
{
String pattern = survey_queue.front();
survey_queue.erase(survey_queue.begin());
can_log_set_phase("Survey " + pattern + ": " + log_ids.size() + " IDs, " + survey_queue.size() + " ranges left");
survey_range(pattern);
}
case ScanStep::RawCheck:
scan_raw_check();
break;
case LogMode::Capture:
if ((int32_t)(millis() - next_survey) >= 0)
{
start_survey(); // now and then look for IDs that were quiet before
break;
}
if (capture_count++ % (LOG_TARGET_EVERY + 1) == 0 || log_ids.empty())
{
for (uint16_t t : LOG_TARGETS)
capture_id(t);
}
case ScanStep::Discover:
scan_discover_step();
break;
case ScanStep::Dids:
if (!scan_probed)
scan_probe_step();
else
{
uint16_t id = log_ids[capture_index++ % log_ids.size()];
if (std::find(std::begin(LOG_TARGETS), std::end(LOG_TARGETS), id) == std::end(LOG_TARGETS))
capture_id(id);
}
can_log_set_phase("Capturing " + String(log_ids.size()) + " IDs");
scan_did_step();
break;
case LogMode::Raw:
{
can_log_set_phase("Unfiltered (adapter can't filter)");
std::vector<String> lines;
if (!elm_monitor(LOG_RAW_MS, LOG_SURVEY_MAX_LINES, lines))
return note_no_reply();
fails = 0;
log_lines(lines, 0, nullptr);
if (exact_filter)
{
for (uint16_t t : LOG_TARGETS)
capture_id(t);
elm_command("ATAR", 1500);
}
break;
}
default: // NoCan: only speed and voltage
default:
can_log_set_phase("Scan finished");
vTaskDelay(pdMS_TO_TICKS(100));
break;
}
@@ -756,14 +1007,14 @@ static void worker_task(void *)
continue;
}
// CAN logging on: monitor windows with speed/voltage in between
// logging on: diagnostic scan with speed/voltage in between
if (can_log_enabled())
{
log_step();
continue;
}
if (log_mode != LogMode::Off)
log_stop();
if (scan_ready)
scan_stop();
if ((int32_t)(millis() - next_voltage) >= 0)
{
@@ -839,3 +1090,5 @@ void obd_select_device(const ObdDevInfo &dev)
}
void obd_forget_device() { req_forget = true; }
void obd_scan_reset() { req_scan_reset = true; }
+4
View File
@@ -38,6 +38,10 @@ void obd_wake();
String obd_saved_name(); // "" if none
String obd_saved_address();
// While logging is on (can_log.h) the link runs a read-only diagnostic scan of the car's modules;
// its progress survives restarts. This starts it over (applied the next time logging runs).
void obd_scan_reset();
// Menu: scan for adapters while the menu is open
void obd_scan_enable(bool on);
bool obd_get_devices(std::vector<ObdDevInfo> &out, uint32_t &version);
+36 -5
View File
@@ -7,6 +7,10 @@ Goal: write a **new custom program** for this device.
- Before starting any task, **ask questions first** and make sure requirements are clearly understood.
- While working, **describe what is being done** at each step.
- Keep this file updated with new findings.
- **The screen always has priority** (user, 2026-11-12): the GIF animation and the speed updates etc. must stay
smooth. Background work (BLE/OBD polling, scans, logging, SD, a future WiFi/web UI) must never make the display
stutter or lag — measure FPS before/after when adding load, and give up features/RAM elsewhere first.
(Accepted exception for now: the temporary diagnostic scan slows speed updates to ~2 s; user OK'd 2026-11-08.)
- The folder is a **git repo** (local only, no remote). Commit `9ee85bf` = original kit snapshot before any cleanup.
## Hardware summary
@@ -80,7 +84,7 @@ Display color format is `RGB565_SWAPPED` (ST77916 byte order, set in `lv_conf.h`
| `2-Program Example/Demo_Arduino` | **Vendor only:** `library/` (3 libs), `lv_conf.h` (vendor original), `sd/` (SD listing example; its lv_conf.h has FATFS edits), `docs/` (setup screenshots + compile instructions). The vendor's original LVGL demo sketch no longer exists unmodified. |
| `tools` | `gif_to_360.py` — converts GIFs to 360×360 for the device (Pillow; scale to cover + center crop, keeps frame timing) |
| `shared` | **Shared code for all JC3636W518 projects:** `jc3636w518.ini` (PlatformIO base config), `include/lv_conf.h` (LVGL 9.6), `lib/JC3636W518` (board library). See its `README.md` |
| `12-OBD-Speed` | (+ CAN logger page, 2026-11-02, see "User's car") **The new program — working in the car (2026-10-23):** speed from the ELM327 over BLE as big number + arc gauge on a GIF background, battery-voltage arc in the bottom gap, idle/screen-off mode (both **verified by the user**); swipe left for the adapter menu (scan, select → remembered in NVS, auto-reconnect every 3 s), again for settings (rotation, idle/screen-off timeout), again for the background (GIF from SD `/gifs` copied into an 11.9 MB raw flash partition, own `partitions.csv`). See its `README.md` |
| `12-OBD-Speed` | (+ log page: CAN logger / diagnostic DID scan, 2026-11, see "User's car") **The new program — working in the car (2026-10-23):** speed from the ELM327 over BLE as big number + arc gauge on a GIF background, battery-voltage arc in the bottom gap, idle/screen-off mode (both **verified by the user**); swipe left for the adapter menu (scan, select → remembered in NVS, auto-reconnect every 3 s), again for settings (rotation, idle/screen-off timeout), again for the background (GIF from SD `/gifs` copied into an 11.9 MB raw flash partition, own `partitions.csv`). See its `README.md` |
| `13-Dash-Mount` | **3D-printed dashboard holder** (OpenSCAD, 2026-10-23; **base printed 2026-10-24, user: "perfect"**): snap-in cup with lip over the bezel + USB-C opening on the side, detent tilt hinge (36 face teeth = 10° steps, M3×20 bolt + captive nut + printed knob), flat foot for VHB tape. ASA. User's choices: adhesive base, detent hinge, M3, cable exits sideways, only a USB-C opening needed. OpenSCAD is installed (`C:\Program Files\OpenSCAD\openscad.exe`, use from bash for `-D part="..."` quoting). See its `README.md` |
| `10-GIF-Tests` | **GIF playback experiments** (was `10-OBD-Display-2024`): `display_gif_embedded`, `display_gif_sd`, `assets/gifs`. The 2024 bridge/ELMulator/WiFi speed sketch, the broken LVGL 9 archive and the BLE scanner tool (`11-BLE-Scanner`: on-screen scan, GATT listing, ELM test, LittleFS log) were removed 2026-10-23 — all in git history |
| `3-Specification` | Spec sheet (factory firmware features, interface photo) |
@@ -111,12 +115,35 @@ AliExpress "ELM327 Mini V2.1 Bluetooth OBD **Dual Mode** 5.1" — dual mode = Bl
**Ford Fiesta Mk8, 2018 (pre-facelift), EcoBoost, automatic, EU**, radar ACC; dashboard shows speed signs (traffic sign recognition).
User wants (2026-11-02) ACC set speed + speed-limit sign on the puck. Choices: no direct CAN wiring (option C rejected),
FORScan possible but not preferred, over-limit warning = a setting (tolerance), items hidden when no data.
Plan: first a **CAN logger test drive** (built 2026-11-02 in `12-OBD-Speed`, last page; not yet flashed/tested) to see
whether the OBD port (HS-CAN, pins 6/14) carries the messages and the clone can keep up in `ATMA` mode.
**Test drive 1 (2026-11-02, CAN logger, `12-OBD-Speed/docs/canlog`): NO broadcast frames on the OBD port** - every
`ATMA` window (wildcard-filtered survey 0XX..7XX) answered `NO DATA`, only diagnostic replies come through: the gateway
passes only diagnostics. Adapter accepted `ATCSM1`, `ATCRA` with wildcards, protocol `A6`.
User does **not** want to use FORScan (2026-11-08). Next: **read-only UDS 0x22 DID scan** built into the log page
(2026-11-08, flashed, not yet run in the car): unfiltered listen check, module discovery 0x700-0x7EF, then all DIDs of
0x706/0x764/0x720/0x7E0 + others, progress in NVS, runs during normal drives (user OK'd slower speed updates).
Online search (2026-11-08): no published DIDs for Fiesta TSR / cruise set speed; FORScan forum TSR threads are about
enabling TSR (IPMA write-protected); github.com/consp/ford-can-stuff has a Mk7.5 Fiesta broadcast-ID sheet (`0x3CD`
Traffic Recognition Data on I-CAN) - broadcast only, not usable through the gateway.
Candidate IDs from opendbc `ford_lincoln_base_pt.dbc` (newer Fords, only ~40 % of the file read verbatim — re-check bits):
`0x165` `Veh_V_DsplyCcSet` 23|8 (+ `CcStat_D_Actl` 10|3), `0x202` `Veh_V_RqCcSet` 32|9 ×0.5 km/h,
`0x3D9` IPMA_Data2 `IsaVLim_D_Rq` 7|8 (254 = no data), `IsaVLimUnit_D_Rq` 15|2 (1 kph, 2 mph), cycle 1 s / on change.
Fallback if not on the OBD bus: UDS mode 22 requests to the camera module (IPMA) like FORScan.
**Test drive 2 (2026-11-12, DID scan, `12-OBD-Speed/docs/canlog/scan`)**: unfiltered `ATMA` = nothing (gateway confirmed).
Discovery (22F188, 100 ms timeout) found **only the PCM 0x7E0** (`F188` = `JB2B-14C204-ADA`); 0x706/0x764/0x720 silent.
PCM DIDs found in D000-D2BF: D002 1FFE, D003 80000000, D005/D006/D014 0, D015 87F840F8, D01A "UNKNOWN", D100 01,
D127 140E, D134 00, D137 00. Scan rate only ~200 ms per DID (BLE + clone), PCM answers NRC 31 for unsupported.
The PCM is promising anyway: per opendbc it *receives* `IsaVLim_D_Rq` (speed limit) and it runs the cruise control.
Firmware after drive 2: probe again with `3E00` + 1 s timeout (once, NVS `probed`), 3 DIDs per request
(single CAN frame, hits re-asked one by one; tested per module with `22F1FFF188F1FE`), BLE interval 7.5-15 ms requested,
`E progress` line every 512 DIDs with ms/DID. Flashed, not yet driven.
## Future ideas (not started)
- **Web UI hosted by the puck** (user's idea, 2026-11-12): WiFi access point / web server on the puck showing all the
advanced data it can gather (OBD PIDs, the module/DID scan results, battery voltage history, ...) and maybe
**maintenance advice** based on the data. Don't build yet — wait until the user asks.
Notes for later: WiFi + BLE run together on the ESP32-S3 (shared radio, coexistence), but WiFi needs roughly
40-60 KB more internal RAM; 12-OBD-Speed has only ~23 KB free (see Internal RAM gotcha), so the draw buffers would
probably have to shrink or move to PSRAM — only if the display stays smooth (screen has priority, see working
agreement). Data/history could live on the SD card.
## Gotchas / observations
- **LVGL 8 GIF bug (patched locally, only relevant if LVGL 8 is used again):** LVGL 8.3.11 `gifdec.c` (`gd_open_gif`) filled the canvas *opaque* with the GIF's background color. GIFs with a transparent background (e.g. `loligod.gif`, bg = RGB 28,29,49) showed that dark gray except where "restore to background" frames had cleared to transparent (→ screen black). **Patched** in the vendor copy `2-Program Example/Demo_Arduino/library/lvgl/src/extra/libs/gif/gifdec.c`: initial canvas alpha 0x00 (marked `LOCAL PATCH`). Re-apply if LVGL is ever replaced/upgraded.
@@ -141,6 +168,10 @@ Fallback if not on the OBD bus: UDS mode 22 requests to the camera module (IPMA)
- Big fonts: generate with `npx lv_font_conv` (Node 22 installed) from `lvgl/scripts/generators/built_in_font/Montserrat-Medium.ttf`; `-DLV_LVGL_H_INCLUDE_SIMPLE` (in shared ini) makes the generated `#include` work.
- **GIF size after converting**: upscaling with LANCZOS can make a GIF ~3x bigger (7.2 MB source 498x298 -> 24.9 MB), because blended pixels plus per-frame palettes with dithering break the delta compression. Nearest-neighbour scaling gave 7.2 MB and looked as good. `tools/gif_to_360.py` retries with sharp scaling automatically when the result exceeds 11.5 MB. `--crop-x 0..1` moves the crop of wide GIFs (0 = left, 0.5 = center); `3d2c218d...gif` is converted with `--crop-x 0.36` (character is mostly left; best visible share inside the circle at 0.3-0.4).
- Binary assets (GIFs): `board_build.embed_files = data/x.gif` → `extern const uint8_t x_start[] asm("_binary_data_x_gif_start")` (no huge C arrays).
- Python edit scripts: never pass C strings containing `\n` through a bash heredoc into Python — it turned into a real line break twice; write the script with the Write tool instead.
- Python edit scripts: never pass C strings containing `\n` through a bash heredoc into Python (happened 4 times now, also with `<<'EOF'`) — it turned into a real line break twice; write the script with the Write tool instead.
- Serial output from the background task (core 0) is often lost, not only right after reset; don't rely on it as proof. Serial output right after a reset can be lost/garbled (USB-CDC re-enumeration, prints from two cores interleave) — don't conclude a task isn't running from a missing early line.
- **Internal RAM in 12-OBD-Speed** (2026-11-02): draw buffers 115 KB + UI 23 KB + NimBLE 58 KB left only ~10 KB, SD mounts
failed with `ESP_ERR_NO_MEM` (0x101, `sdmmc_read_blocks failed (257)`, DMA largest block 788 B) - looks like a card fault but isn't.
Fix: `heap_caps_malloc_extmem_enable(64)` at the start of `setup()` -> ~23 KB free, 13.8 KB DMA block.
- The black screen after pressing Start (2026-11-02) was the normal idle screen-off (2 min after boot without speed data), not a crash.
- `Preferences` prints `nvs_open failed: NOT_FOUND` the first time a namespace is read before it was written — harmless.