Compare commits

..
7 Commits
Author SHA1 Message Date
mangavalkandClaude Opus 5.5 970f6a3d64 12-OBD-Speed: watch mode for the unknown PCM DIDs
- After the DID scan, the log page reads the 327 PCM DIDs of unknown meaning
  round after round and logs every change ("W did data"), 3 per request if
  the PCM allows it (reply split with the lengths from the scan)
- tools/make_watch_dids.py generates src/watch_dids.h from the scan logs
- README/CLAUDE.md: scan results, test-drive plan, git remote

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 16:18:52 +01:00
mangavalkandClaude Opus 5.5 c9ad39c8ed 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>
2026-11-18 16:06:31 +01:00
mangavalkandClaude Opus 5.5 60cd7cf262 12-OBD-Speed: CAN logger page, shared SD mount, more PSRAM
- CAN log page: ELM327 monitor-mode survey/capture of broadcast frames with marks,
  written to /canlog on the SD card; serial "ls"/"get" commands to download logs
- sd_card: reference-counted SD_MMC mount shared by bg_store and the logger
- heap_caps_malloc_extmem_enable(64): internal RAM was down to ~10 KB, SD mounts
  failed with ESP_ERR_NO_MEM (DMA); now ~23 KB free, 13.8 KB DMA block
- docs/canlog: first test drive (Fiesta Mk8 2018) - no broadcast frames on the
  OBD port, only diagnostic replies (gateway)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 19:14:07 +01:00
mangavalkandClaude Opus 5.5 21012adbec gif_to_360: --crop-x option for the horizontal crop position
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 17:31:05 +02:00
mangavalkandClaude Opus 5.5 b2f6a52902 gif_to_360: retry with sharp scaling when too large; add new GIF
Smooth upscaling blends pixels and dithers per-frame palettes, which
breaks GIF delta compression (7.2 MB source -> 24.9 MB). Nearest-
neighbour scaling keeps it at 7.2 MB, under the 11.5 MB flash limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 17:29:18 +02:00
mangavalkandClaude Opus 5.5 15b4ef5cef 13-Dash-Mount: dashboard holder (OpenSCAD + STLs), base printed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 17:27:42 +02:00
mangavalkandClaude Opus 5.5 c22b98de76 Board library: fix 1 px offset in mirrored rotations
The panel's row mirror (MY) puts the image one line off, which left a
stray line at the edge when starting at 270 degrees. setRotation() now
sets a 1 px gap on the axis MY mirrors, and scr_lvgl_init() clears the
whole GRAM at rotation 0 so no random power-on pixels can show.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 17:08:02 +02:00
48 changed files with 81490 additions and 58 deletions

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 MiB

+51 -2
View File
@@ -16,6 +16,10 @@ 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 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) 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. 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: 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 - **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). OBD polling stops; only `ATRV` every 30 s (answered by the adapter itself, doesn't wake the car's bus).
Wakes on a touch (the touch is swallowed) or by itself when the voltage rises above 13.2 V (engine started). Wakes on a touch (the touch is swallowed) or by itself when the voltage rises above 13.2 V (engine started).
@@ -29,14 +33,59 @@ 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. Init: `ATZ`, `ATE0`, `ATL0`, `ATS0`, `ATH0`, `ATSP0`, `0100`; then `010D` (speed) is polled continuously.
Serial (115200) prints status changes as `[obd] ...`. Serial (115200) prints status changes as `[obd] ...`.
## 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.)
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`.
5. **Watch** (once the scan is done): the 327 PCM DIDs of unknown meaning in `src/watch_dids.h` (generated by
`../tools/make_watch_dids.py` from the scan logs; leaves out F1xx identification, F4xx = mode 01 copies, DExx
tables, D01A text, DD00 clock, DD01 odometer) are read round after round; every change is logged as
`W <did> <data>`, each round as `E round N done, s, changes`. 3 DIDs per request if the PCM allows it
(tested with `22D100D134D137`), the reply is split with the lengths from the scan.
**Scan result (2026-11-12..18, logs `docs/canlog/scan`, `scan2`)**: only the PCM 0x7E0 answers (also with `3E00` and a 1 s
timeout); **389 supported DIDs**, ~175 ms per request, the multi-DID test `22F1FFF188F1FE` timed out (single requests).
Known: F190 VIN, F188 `JB2B-14C204-ADA`, DD01 odometer (0x021676 = 136 822 km), F4xx = mode 01 PIDs.
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, `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 ## Files
| File | What | | File | What |
|---|---| |---|---|
| `src/main.cpp` | LVGL UI (tileview: speed page + menu page) | | `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 (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/font_speed_120.c` | Montserrat Medium 120 px, digits and `-`, 4 bpp (generated with `lv_font_conv`, see header) |
| `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) | | `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 | | `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` | | `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 | | `sd/gifs/` | (not in git) GIFs converted with `../tools/gif_to_360.py`, ready to copy to the SD card |
+2
View File
@@ -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
+3
View File
@@ -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
71136 M 1
+353
View File
@@ -0,0 +1,353 @@
# 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
7304 C OBDII ELM327 v2.1
7404 P A6
7504 E ATCSM1 OK
8305 V 0
8455 B 13.0
8905 E NO DATA
10505 E NO DATA
11105 V 0
11205 B 12.9
11655 E NO DATA
13206 E NO DATA
13856 V 0
13956 B 13.0
14406 E NO DATA
14869 M 1
15956 E NO DATA
16556 V 0
16656 B 13.0
17106 E NO DATA
18657 E NO DATA
19257 V 0
19357 B 13.0
19457 I
19803 E NO DATA
21404 E NO DATA
22954 E NO DATA
23555 V 0
23655 B 12.9
24106 E NO DATA
25656 E NO DATA
27256 E NO DATA
27956 V 0
28056 B 13.1
28506 E NO DATA
30057 E NO DATA
31607 E NO DATA
32207 V 0
32307 B 12.9
32757 E NO DATA
34357 E NO DATA
35957 E NO DATA
36553 V 1
36653 B 12.9
37153 E NO DATA
38753 E NO DATA
40354 E NO DATA
40954 V 3
41054 B 12.9
41506 E NO DATA
43057 E NO DATA
44657 E NO DATA
45357 V 5
45507 B 12.9
45957 E NO DATA
47507 E NO DATA
49057 E NO DATA
49707 V 9
49857 B 12.9
50307 E NO DATA
51903 E NO DATA
53503 E NO DATA
54155 V 8
54206 B 12.9
54357 E OK
54707 E NO DATA
56307 E NO DATA
57153 V 6
57253 B 12.9
57855 E NO DATA
59556 E NO DATA
61106 E NO DATA
61706 V 11
61806 B 12.9
62256 E NO DATA
63856 E NO DATA
65406 E NO DATA
66056 V 24
66156 B 12.9
66607 E NO DATA
68153 E NO DATA
69703 E NO DATA
70305 V 31
70405 B 12.9
70856 E NO DATA
72406 E NO DATA
73956 E NO DATA
74556 V 32
74656 B 12.9
75106 E NO DATA
76657 E NO DATA
78207 E NO DATA
78807 V 33
78907 B 12.9
79357 E NO DATA
80907 E NO DATA
82453 E NO DATA
83053 V 31
83153 B 12.9
83603 E NO DATA
85153 E NO DATA
86703 E NO DATA
87303 V 36
87403 B 12.9
87853 E NO DATA
89403 E NO DATA
90953 E NO DATA
91554 V 38
91654 B 12.9
92106 E NO DATA
93657 E NO DATA
95207 E NO DATA
95807 V 34
96007 B 12.9
96454 E NO DATA
98004 E NO DATA
99654 E NO DATA
100355 V 24
100505 B 12.9
100955 E NO DATA
102506 E NO DATA
104057 E NO DATA
104654 V 34
104754 B 12.9
105204 E NO DATA
106755 E NO DATA
108306 E NO DATA
108906 V 41
109006 B 12.9
117817 E disconnected
123303 C OBDII ELM327 v2.1
123403 P A6
123503 E ATCSM1 OK
124203 V 46
124303 B 12.9
124755 E NO DATA
126305 E NO DATA
126906 V 45
127006 B 12.9
127456 E NO DATA
129006 E NO DATA
129607 V 43
129757 B 12.9
130207 E NO DATA
131757 E NO DATA
132357 V 41
132457 B 12.9
132907 E NO DATA
134457 E NO DATA
135057 V 39
135157 B 12.9
135303 I
135604 E NO DATA
137154 E NO DATA
138704 E NO DATA
139304 V 22
139404 B 12.9
139854 E NO DATA
141423 M 2
141454 E NO DATA
143004 E NO DATA
143605 V 7
143705 B 13.0
144155 E NO DATA
145706 E NO DATA
147256 E NO DATA
147856 V 28
147956 B 12.9
148407 E NO DATA
149957 E NO DATA
151507 E NO DATA
152107 V 43
152207 B 12.9
152657 E NO DATA
154207 E NO DATA
155753 E NO DATA
156353 V 51
156453 B 13.0
156904 E NO DATA
158455 E NO DATA
160005 E NO DATA
160605 V 51
160705 B 12.9
161155 E NO DATA
162705 E NO DATA
164255 E NO DATA
164856 V 53
164956 B 12.9
165407 E NO DATA
166953 E NO DATA
168508 E NO DATA
169103 V 46
169253 B 12.9
169703 E NO DATA
171254 E NO DATA
172805 E NO DATA
173406 V 19
173506 B 12.9
173956 E NO DATA
175506 E NO DATA
177056 E NO DATA
177656 V 3
177756 B 12.9
178206 E NO DATA
179806 E NO DATA
181357 E NO DATA
181957 V 8
182057 B 12.9
182507 E NO DATA
184057 E NO DATA
185603 E NO DATA
186203 V 31
186304 B 12.9
186756 E NO DATA
188307 E NO DATA
189857 E NO DATA
190457 V 45
190557 B 13.0
191007 E NO DATA
192603 E NO DATA
194154 E NO DATA
194754 V 49
194854 B 12.9
195304 E NO DATA
196855 E NO DATA
198406 E NO DATA
199006 V 49
199106 B 12.9
199556 E NO DATA
201106 E NO DATA
202656 E NO DATA
203257 V 50
203357 B 12.9
203807 E NO DATA
205353 E NO DATA
206903 E NO DATA
207504 V 50
207604 B 12.9
208054 E NO DATA
209604 E NO DATA
211155 E NO DATA
211755 V 50
211855 B 12.9
212305 E NO DATA
213855 E NO DATA
215405 E NO DATA
216005 V 50
216105 B 12.9
216555 E NO DATA
218105 E NO DATA
219656 E NO DATA
220256 V 49
220356 B 12.9
220806 E NO DATA
222357 E NO DATA
223903 E NO DATA
224503 V 51
224603 B 12.9
225055 E NO DATA
226655 E NO DATA
228206 E NO DATA
228806 V 46
228906 B 12.9
229356 E NO DATA
230906 E NO DATA
232456 E NO DATA
233057 V 24
233157 B 12.9
233603 E NO DATA
235153 E NO DATA
236703 E NO DATA
237303 V 5
237403 B 12.9
237853 E NO DATA
239403 E NO DATA
240953 E NO DATA
241553 V 0
241653 B 12.9
242103 E NO DATA
243653 E NO DATA
245203 E NO DATA
245804 V 0
245904 B 12.9
246355 E NO DATA
247906 E NO DATA
249456 E NO DATA
250056 V 16
250156 B 13.0
250606 E NO DATA
252156 E NO DATA
253706 E NO DATA
254307 V 37
254407 B 12.9
254857 E NO DATA
256407 E NO DATA
257957 E NO DATA
258557 V 47
258657 B 13.0
259107 E NO DATA
260653 E NO DATA
262203 E NO DATA
262805 V 45
262905 B 12.9
263356 E NO DATA
264906 E NO DATA
266456 E NO DATA
267056 V 44
267156 B 13.0
267607 E NO DATA
269157 E NO DATA
270707 E NO DATA
271307 V 45
271457 B 12.9
271907 E NO DATA
273457 E NO DATA
275007 E NO DATA
275607 V 48
275707 B 12.9
276157 E NO DATA
277757 E NO DATA
279307 E NO DATA
279907 V 47
280007 B 12.9
280457 E NO DATA
282007 E NO DATA
283557 E NO DATA
284157 V 32
284257 B 13.0
284707 E NO DATA
286457 E NO DATA
288003 E NO DATA
288653 V 12
288753 B 13.0
289255 E NO DATA
290805 E NO DATA
292355 E NO DATA
292956 V 13
293056 B 13.0
293507 E NO DATA
295057 E NO DATA
296607 E NO DATA
297257 V 8
297357 B 13.0
297804 E NO DATA
299404 E NO DATA
301054 E NO DATA
301705 V 3
301805 B 13.0
302255 E NO DATA
303805 E NO DATA
305355 E NO DATA
305906 V -1
+210
View File
@@ -0,0 +1,210 @@
# 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
7003 C OBDII ELM327 v2.1
7153 P A6
7303 E ATCSM1 OK
8253 V 0
8354 B 13.0
8804 E NO DATA
10504 E NO DATA
11205 V 4
11455 B 12.9
12006 E NO DATA
13806 E NO DATA
14457 V 5
14557 B 13.0
15007 E NO DATA
16557 E NO DATA
17157 V 5
17357 B 13.0
19257 E NO DATA
19907 V 6
20057 B 13.0
20507 E NO DATA
20507 I
22157 E NO DATA
23757 E NO DATA
25503 E NO DATA
26208 V 7
26253 B 13.0
26508 E OK
26908 E OK
26908 E >NO DATA
27053 E OK
28604 E NO DATA
30204 E NO DATA
31755 E NO DATA
32355 V 6
32455 B 12.9
32956 E NO DATA
34506 E NO DATA
36106 E NO DATA
36706 V 23
36806 B 13.0
37356 E NO DATA
38956 E NO DATA
40506 E NO DATA
41106 V 41
41206 B 12.9
41657 E NO DATA
43207 E NO DATA
44753 E NO DATA
45353 V 41
45454 B 12.9
45904 E NO DATA
47455 E NO DATA
49005 E NO DATA
49605 V 34
49705 B 12.9
50156 E NO DATA
51706 E NO DATA
53256 E NO DATA
53857 V 28
53957 B 12.9
54457 E NO DATA
54607 N 202
56157 E NO DATA
56753 V 33
56854 B 12.9
57304 E NO DATA
58904 E NO DATA
60455 E NO DATA
61055 V 36
61155 B 12.9
61606 E NO DATA
63256 E NO DATA
64807 E NO DATA
65407 V 40
65557 B 12.9
66007 E NO DATA
67557 E NO DATA
69153 E NO DATA
69753 V 43
69903 B 12.9
70354 E NO DATA
71904 E NO DATA
73504 E NO DATA
74255 V 43
74355 B 12.9
74856 E NO DATA
76456 E NO DATA
78106 E NO DATA
78756 V 42
78856 B 12.9
79306 E NO DATA
80856 E NO DATA
82406 E NO DATA
83006 V 40
83106 B 12.9
83556 E NO DATA
85107 E NO DATA
86653 E NO DATA
87253 V 35
87403 B 12.9
87853 E NO DATA
89454 E NO DATA
91004 E NO DATA
91605 V 26
91705 B 12.9
92156 E NO DATA
93706 E NO DATA
95256 E NO DATA
95856 V 6
95956 B 12.9
96406 E NO DATA
97957 E NO DATA
99507 E NO DATA
100103 V 0
100203 B 12.9
100653 E NO DATA
102254 E NO DATA
103854 E NO DATA
104505 V 15
104705 B 12.9
105156 E NO DATA
106706 E NO DATA
108256 E NO DATA
108857 V 32
108957 B 12.9
109507 E NO DATA
111057 E NO DATA
112603 E NO DATA
113203 V 42
113303 B 13.0
113754 E NO DATA
115354 E NO DATA
116904 E NO DATA
117556 V 42
117656 B 12.9
118107 E NO DATA
119657 E NO DATA
121257 E NO DATA
121907 V 39
122007 B 12.9
122457 E NO DATA
124057 E NO DATA
125603 E NO DATA
126253 V 34
126353 B 12.9
126803 E NO DATA
128353 E NO DATA
129953 E NO DATA
130653 V 29
130753 B 12.9
131204 E NO DATA
132904 E NO DATA
134554 E NO DATA
135155 V 21
135255 B 13.0
135705 E NO DATA
137255 E NO DATA
138856 E NO DATA
139556 V 16
139656 B 12.9
140156 E NO DATA
141756 E NO DATA
143306 E NO DATA
144006 V 10
144106 B 12.9
144556 E NO DATA
146156 E NO DATA
147706 E NO DATA
148306 V 12
148456 B 12.9
148956 E NO DATA
150506 E NO DATA
152156 E NO DATA
152806 V 3
152906 B 12.9
153357 E NO DATA
154907 E NO DATA
156453 E NO DATA
157153 V 4
157353 B 12.9
157804 E NO DATA
159404 E NO DATA
161005 E NO DATA
161606 V 0
161756 B 12.8
162207 E NO DATA
163807 E NO DATA
165503 E NO DATA
166204 V 1
166404 B 12.9
168455 E NO DATA
170106 E NO DATA
171706 E NO DATA
172306 V 0
172506 B 12.9
173007 E NO DATA
174653 E NO DATA
176204 E NO DATA
176804 V 0
176904 B 12.9
177355 E NO DATA
178905 E NO DATA
180455 E NO DATA
181055 V 0
181205 B 12.9
181656 E NO DATA
183206 E NO DATA
+473
View File
@@ -0,0 +1,473 @@
# 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
7103 C OBDII ELM327 v2.1
7203 P A6
7303 E ATCSM1 OK
8003 V 0
8103 B 12.9
8555 E NO DATA
10155 E NO DATA
10755 V 0
10855 B 12.9
11405 E NO DATA
12956 E NO DATA
13556 V 0
13656 B 12.9
14156 E NO DATA
15706 E NO DATA
16306 V 0
16406 B 12.9
16856 E NO DATA
18406 E NO DATA
19006 V 0
19106 B 12.9
19206 I
19606 E NO DATA
21156 E NO DATA
22706 E NO DATA
23356 V 1
23506 B 12.9
23957 E NO DATA
25557 E NO DATA
27107 E NO DATA
27753 V 4
27853 B 12.9
28354 E NO DATA
29904 E NO DATA
31505 E NO DATA
32106 V 5
32206 B 12.7
32656 E NO DATA
34206 E NO DATA
35757 E NO DATA
36357 V 7
36457 B 12.9
36903 E NO DATA
38453 E NO DATA
40053 E NO DATA
40703 V 14
40803 B 12.9
41303 E NO DATA
42853 E NO DATA
44404 E NO DATA
45204 V 11
45304 B 12.9
45804 E NO DATA
47354 E NO DATA
48954 E NO DATA
49555 V 22
49655 B 12.9
50106 E NO DATA
51657 E NO DATA
53353 E NO DATA
53954 V 32
54054 B 12.9
54505 E NO DATA
56055 E NO DATA
57605 E NO DATA
58205 V 35
58305 B 12.9
58805 E NO DATA
60405 E NO DATA
61955 E NO DATA
62555 V 42
62655 B 12.9
63106 E NO DATA
64656 E NO DATA
66207 E NO DATA
66807 V 46
66907 B 12.9
67357 E NO DATA
68903 E NO DATA
70453 E NO DATA
71053 V 37
71153 B 12.9
71603 E NO DATA
73154 E NO DATA
74855 E NO DATA
75455 V 30
75555 B 12.8
76055 E NO DATA
77656 E NO DATA
79206 E NO DATA
79906 V 23
80106 B 12.9
80657 E NO DATA
82207 E NO DATA
83753 E NO DATA
84353 V 37
84453 B 12.9
84903 E NO DATA
86454 E NO DATA
88005 E NO DATA
88606 V 45
88706 B 12.9
89156 E NO DATA
90706 E NO DATA
92256 E NO DATA
92856 V 49
92956 B 12.9
93406 E NO DATA
94956 E NO DATA
96506 E NO DATA
97106 V 51
97206 B 12.8
97656 E NO DATA
99206 E NO DATA
100756 E NO DATA
101356 V 51
101456 B 12.9
101906 E NO DATA
103456 E NO DATA
105006 E NO DATA
105606 V 51
105706 B 12.9
106153 E NO DATA
107703 E NO DATA
109253 E NO DATA
109853 V 50
109953 B 12.8
110405 E NO DATA
111955 E NO DATA
113505 E NO DATA
114105 V 50
114205 B 12.9
114655 E NO DATA
116205 E NO DATA
117755 E NO DATA
118355 V 50
118455 B 12.9
118906 E NO DATA
120457 E NO DATA
122007 E NO DATA
122607 V 50
122707 B 12.9
123154 E NO DATA
124704 E NO DATA
126254 E NO DATA
126854 V 50
126954 B 12.9
127404 E NO DATA
128954 E NO DATA
130505 E NO DATA
131106 V 50
131206 B 12.9
140012 E disconnected
145303 C OBDII ELM327 v2.1
145403 P A6
145503 E ATCSM1 OK
146203 V 50
146303 B 12.9
146753 E NO DATA
148303 E NO DATA
148904 V 50
149004 B 12.8
149454 E NO DATA
151005 E NO DATA
151605 V 50
151705 B 12.9
152155 E NO DATA
153705 E NO DATA
154306 V 51
154406 B 12.8
154857 E NO DATA
156407 E NO DATA
157007 V 50
157157 B 12.9
157257 I
157607 E NO DATA
159157 E NO DATA
160753 E NO DATA
161353 V 50
161453 B 12.9
161905 E NO DATA
163456 E NO DATA
165006 E NO DATA
165606 V 50
165706 B 12.9
166156 E NO DATA
167707 E NO DATA
169253 E NO DATA
169854 V 50
169954 B 12.9
170405 E NO DATA
171955 E NO DATA
173506 E NO DATA
174106 V 51
174206 B 12.8
174657 E NO DATA
176203 E NO DATA
177753 E NO DATA
178453 V 48
178553 B 12.9
179003 E NO DATA
180654 E NO DATA
182354 E NO DATA
182954 V 32
183104 B 12.9
183604 E NO DATA
183755 E OK
185356 E NO DATA
185957 V 10
186057 B 12.9
186507 E NO DATA
188057 E NO DATA
189757 E NO DATA
190403 V 2
190503 B 12.9
190953 E NO DATA
192503 E NO DATA
194053 E NO DATA
194653 V 24
194803 B 12.8
195254 E NO DATA
196805 E NO DATA
198355 E NO DATA
198955 V 41
199055 B 12.8
199506 E NO DATA
201057 E NO DATA
202607 E NO DATA
203207 V 44
203307 B 12.9
203754 E NO DATA
205304 E NO DATA
206854 E NO DATA
207454 V 46
207554 B 12.9
208004 E NO DATA
209555 E NO DATA
211105 E NO DATA
211705 V 44
211805 B 12.9
212256 E NO DATA
213806 E NO DATA
215356 E NO DATA
215956 V 37
216056 B 12.9
216506 E NO DATA
218106 E NO DATA
219706 E NO DATA
220306 V 29
220406 B 12.9
220856 E NO DATA
222406 E NO DATA
223957 E NO DATA
224557 V 37
224657 B 12.9
225103 E NO DATA
226653 E NO DATA
228203 E NO DATA
228803 V 41
228903 B 12.9
229353 E NO DATA
230903 E NO DATA
232453 E NO DATA
233054 V 41
233154 B 12.9
233606 E NO DATA
235156 E NO DATA
236706 E NO DATA
237306 V 41
237406 B 12.9
237856 E NO DATA
239407 E NO DATA
240957 E NO DATA
241557 V 38
241657 B 12.9
242107 E NO DATA
243657 E NO DATA
245207 E NO DATA
245804 V 38
245904 B 12.9
246355 E NO DATA
247905 E NO DATA
249455 E NO DATA
250056 V 37
250156 B 12.9
250606 E NO DATA
252156 E NO DATA
253707 E NO DATA
254307 V 37
254407 B 12.8
254854 E NO DATA
256405 E NO DATA
257955 E NO DATA
258605 V 38
258705 B 12.9
259155 E NO DATA
260705 E NO DATA
262255 E NO DATA
262905 V 39
263005 B 12.8
263456 E NO DATA
265006 E NO DATA
266556 E NO DATA
267156 V 40
267256 B 12.9
267707 E NO DATA
269257 E NO DATA
270803 E NO DATA
271403 V 41
271503 B 12.9
271954 E NO DATA
273505 E NO DATA
275055 E NO DATA
275655 V 42
275755 B 12.9
276206 E NO DATA
277757 E NO DATA
279303 E NO DATA
279904 V 45
280004 B 12.9
280454 E NO DATA
282004 E NO DATA
283555 E NO DATA
284155 V 47
284255 B 12.9
284705 E NO DATA
286255 E NO DATA
287805 E NO DATA
288406 V 45
288506 B 12.9
288956 E NO DATA
290506 E NO DATA
292056 E NO DATA
292656 V 43
292756 B 12.9
293203 E NO DATA
294804 E NO DATA
296354 E NO DATA
297005 V 37
297105 B 12.9
297555 E NO DATA
299105 E NO DATA
300755 E NO DATA
301355 V 31
301505 B 12.9
301955 E NO DATA
303505 E NO DATA
305055 E NO DATA
305656 V 34
305756 B 12.9
306206 E NO DATA
307756 E NO DATA
309306 E NO DATA
309906 V 39
310006 B 12.9
310507 E NO DATA
312053 E NO DATA
313603 E NO DATA
314203 V 34
314303 B 12.9
314754 E NO DATA
316304 E NO DATA
317854 E NO DATA
318454 V 35
318554 B 12.9
319006 E NO DATA
320556 E NO DATA
322106 E NO DATA
322706 V 41
322806 B 12.9
323256 E NO DATA
324807 E NO DATA
326353 E NO DATA
327004 V 39
327104 B 12.9
327555 E NO DATA
329106 E NO DATA
330656 E NO DATA
331256 V 22
331356 B 12.9
331807 E NO DATA
333407 E NO DATA
335053 E NO DATA
335653 V 13
335753 B 12.9
337953 E NO DATA
339503 E NO DATA
341053 E NO DATA
341654 V 10
341754 B 12.9
342254 E NO DATA
343904 E NO DATA
345654 E NO DATA
346404 V 17
346554 B 12.9
347004 E NO DATA
348554 E NO DATA
350155 E NO DATA
350855 V 13
350905 B 12.9
351105 E NG...
351105 E OK
351556 E NO DATA
353156 E NO DATA
353856 V 19
354056 B 12.9
354503 E NO DATA
356053 E NO DATA
357603 E NO DATA
358203 V 20
358303 B 12.9
358754 E NO DATA
360354 E NO DATA
361904 E NO DATA
362554 V 16
362654 B 12.9
363104 E NO DATA
364704 E NO DATA
366255 E NO DATA
366856 V 12
367006 B 12.9
367456 E NO DATA
369007 E NO DATA
370657 E NO DATA
371458 V -1
372104 B 12.9
372654 E NO DATA
374205 E NO DATA
375756 E NO DATA
376457 V 12
376607 B 12.9
377053 E NO DATA
378703 E NO DATA
380303 E NO DATA
380903 V 12
381003 B 12.9
381453 E NO DATA
383004 E NO DATA
384554 E NO DATA
385204 V 12
385304 B 12.9
385754 E NO DATA
387304 E NO DATA
388954 E NO DATA
389655 V 6
389755 B 12.9
390355 E NO DATA
392005 E NO DATA
393855 E NO DATA
394455 V 0
394555 B 12.5
395006 E NO DATA
396556 E NO DATA
398207 E NO DATA
398857 V 3
398957 B 12.9
399407 E NO DATA
401007 E NO DATA
402707 E NO DATA
403407 V 1
403657 B 12.8
404105 E NO DATA
405806 E NO DATA
407506 E NO DATA
408206 V -1
408806 B 12.9
409306 E NO DATA
410907 E NO DATA
412553 E NO DATA
413153 V 0
413303 B 12.9
+3
View File
@@ -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
124606 E idle
+2
View File
@@ -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,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
+4 -9
View File
@@ -5,7 +5,7 @@
#include <SD_MMC.h> #include <SD_MMC.h>
#include <esp_partition.h> #include <esp_partition.h>
#include "pincfg.h" #include "sd_card.h"
#define BG_MAGIC 0x46494742 // "BGIF" #define BG_MAGIC 0x46494742 // "BGIF"
#define BG_DATA_OFFSET 4096 // header in the first sector, GIF data after it #define BG_DATA_OFFSET 4096 // header in the first sector, GIF data after it
@@ -78,14 +78,9 @@ static void unmap_partition()
map_valid = false; map_valid = false;
} }
// ---------- SD card ---------- // ---------- SD card (shared with the CAN logger) ----------
static bool sd_mount() static bool sd_mount() { return sd_acquire(); }
{ static void sd_unmount() { sd_release(); }
SD_MMC.setPins(SD_MMC_CLK_PIN, SD_MMC_CMD_PIN, SD_MMC_D0_PIN, SD_MMC_D1_PIN, SD_MMC_D2_PIN, SD_MMC_D3_PIN);
return SD_MMC.begin() && SD_MMC.cardType() != CARD_NONE;
}
static void sd_unmount() { SD_MMC.end(); }
static void do_list() static void do_list()
{ {
+291
View File
@@ -0,0 +1,291 @@
#include "can_log.h"
#include <FS.h>
#include <Preferences.h>
#include <SD_MMC.h>
#include "sd_card.h"
#define FLUSH_INTERVAL_MS 2000
#define SD_RETRY_MS 10000
#define MAX_BUFFER (256 * 1024) // kept in RAM while the SD card is missing; beyond that lines are dropped
// ---------- shared state (protected by `mtx`) ----------
static SemaphoreHandle_t mtx;
static volatile bool enabled = false;
static String buffer;
static uint32_t dropped = 0;
static int marks = 0;
static String status = "Off";
static String phase;
static String frames[CANLOG_SLOTS];
// ---------- writer-owned ----------
static bool file_open = false;
static String path;
static uint32_t written = 0;
static void lock() { xSemaphoreTake(mtx, portMAX_DELAY); }
static void unlock() { xSemaphoreGive(mtx); }
static void set_status(const String &s)
{
lock();
status = s;
unlock();
}
static void update_status()
{
set_status(path.substring(path.lastIndexOf('/') + 1) + " " + String((written + 512) / 1024) + " KB" +
(dropped ? " dropped " + String(dropped) : String()));
}
// New file /canlog/log_NNN.txt with a header describing the format
static void open_session()
{
if (!sd_acquire())
{
set_status("SD card not found");
return;
}
SD_MMC.mkdir(CANLOG_FOLDER);
char name[40];
for (int i = 1; i <= 999; i++)
{
snprintf(name, sizeof(name), CANLOG_FOLDER "/log_%03d.txt", i);
if (!SD_MMC.exists(name))
break;
}
File f = SD_MMC.open(name, FILE_WRITE);
if (!f)
{
set_status("Can't create log file");
sd_release();
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 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;
file_open = true;
Serial.println("[log] " + path);
update_status();
}
static void flush()
{
lock();
String chunk = std::move(buffer);
buffer = String();
unlock();
if (chunk.length() == 0)
return;
File f = SD_MMC.open(path, FILE_APPEND);
size_t n = f ? f.print(chunk) : 0;
if (f)
f.close();
if (n != chunk.length())
{
// card gone or full: start over with a new file once it works again
file_open = false;
sd_release();
set_status("SD write failed");
return;
}
written += n;
update_status();
}
static void writer_task(void *)
{
uint32_t next_try = 0;
for (;;)
{
vTaskDelay(pdMS_TO_TICKS(FLUSH_INTERVAL_MS));
if (enabled && !file_open && (int32_t)(millis() - next_try) >= 0)
{
open_session();
next_try = millis() + SD_RETRY_MS;
}
if (file_open)
flush();
if (!enabled && file_open)
{
file_open = false;
sd_release();
set_status("Stopped, saved " + path.substring(path.lastIndexOf('/') + 1));
}
}
}
// ---------- public API ----------
void can_log_begin()
{
mtx = xSemaphoreCreateMutex();
Preferences p;
p.begin("canlog", true);
enabled = p.getBool("on", false);
p.end();
if (enabled)
status = "Waiting for SD card";
xTaskCreatePinnedToCore(writer_task, "can_log", 6144, nullptr, 1, nullptr, 0);
}
bool can_log_enabled() { return enabled; }
void can_log_set_enabled(bool on)
{
if (on == enabled)
return;
Preferences p;
p.begin("canlog", false);
p.putBool("on", on);
p.end();
lock();
if (on)
{
marks = 0;
dropped = 0;
status = "Waiting for SD card";
}
else if (!file_open)
{
buffer = ""; // never got a file: nothing to save
status = "Off";
}
unlock();
enabled = on;
}
void can_log_line(const String &text)
{
if (!enabled)
return;
String line = String(millis()) + " " + text + "\n";
lock();
if (buffer.length() + line.length() <= MAX_BUFFER)
buffer += line;
else
dropped++;
unlock();
}
int can_log_mark()
{
lock();
int n = ++marks;
unlock();
can_log_line("M " + String(n));
Serial.printf("[log] mark %d\n", n);
return n;
}
int can_log_marks()
{
lock();
int n = marks;
unlock();
return n;
}
String can_log_status()
{
lock();
String s = status;
unlock();
return s;
}
static void serial_command(String cmd)
{
cmd.trim();
if (cmd != "ls" && !cmd.startsWith("get "))
return;
if (!sd_acquire())
{
Serial.println("<<<ERROR SD card not found>>>");
return;
}
if (cmd == "ls")
{
Serial.println("<<<LS>>>");
File dir = SD_MMC.open(CANLOG_FOLDER);
if (dir && dir.isDirectory())
for (File f = dir.openNextFile(); f; f = dir.openNextFile())
Serial.printf("%s %u\n", f.name(), (unsigned)f.size());
Serial.println("<<<END>>>");
}
else
{
String name = cmd.substring(4);
name.trim();
File f = SD_MMC.open(String(CANLOG_FOLDER) + "/" + name);
if (!f)
Serial.println("<<<ERROR not found>>>");
else
{
Serial.printf("<<<BEGIN %s %u>>>\n", name.c_str(), (unsigned)f.size());
static uint8_t buf[1024];
int n;
while ((n = f.read(buf, sizeof(buf))) > 0)
Serial.write(buf, n);
f.close();
Serial.println("\n<<<END>>>");
}
}
sd_release();
}
void can_log_serial_poll()
{
static String line;
while (Serial.available())
{
char c = Serial.read();
if (c == '\n' || c == '\r')
{
if (line.length())
serial_command(line);
line = "";
}
else if (line.length() < 80)
line += c;
}
}
void can_log_set_phase(const String &s)
{
lock();
phase = s;
unlock();
}
String can_log_phase()
{
lock();
String s = phase;
unlock();
return s;
}
void can_log_set_frame(int slot, const String &s)
{
if (slot < 0 || slot >= CANLOG_SLOTS)
return;
lock();
frames[slot] = s;
unlock();
}
String can_log_frame(int slot)
{
if (slot < 0 || slot >= CANLOG_SLOTS)
return String();
lock();
String s = frames[slot];
unlock();
return s;
}
+34
View File
@@ -0,0 +1,34 @@
// CAN logger, to find the Ford cruise/ACC set speed and speed-sign messages: the OBD task records broadcast
// CAN frames (ELM327 monitor mode), speed and voltage; the UI adds marks. Lines are appended to
// /canlog/log_NNN.txt on the SD card every 2 s (new file per session). All functions are thread-safe.
//
// 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 <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 // info lines shown on the log page (modules, DIDs found, last reply)
void can_log_begin();
bool can_log_enabled();
void can_log_set_enabled(bool on); // remembered in NVS
void can_log_line(const String &text); // adds the timestamp; ignored while logging is off
int can_log_mark(); // logs a mark, returns its number
int can_log_marks();
String can_log_status(); // file + size, or what is wrong
// Serial commands for reading the logs on the PC (call from loop()):
// "ls" -> one line per file in /canlog: "<name> <size>"
// "get <name>" -> "<<<BEGIN <name> <size>>>>", the file, "<<<END>>>"
void can_log_serial_poll();
// Shown on the log page, set by the OBD task
void can_log_set_phase(const String &s);
String can_log_phase();
void can_log_set_frame(int slot, const String &s);
String can_log_frame(int slot);
+136 -2
View File
@@ -4,11 +4,14 @@
// background page (built-in GIF or one from /gifs on the SD card, copied into flash). // background page (built-in GIF or one from /gifs on the SD card, copied into flash).
// Battery voltage is shown as a small arc in the bottom gap; after a while without speed data the // Battery voltage is shown as a small arc in the bottom gap; after a while without speed data the
// screen goes dark (idle) and wakes on touch or when the engine starts. // screen goes dark (idle) and wakes on touch or when the engine starts.
// Last page: CAN logger (to find the cruise set speed / speed-sign messages); while logging, a tap on
// the speed page adds a mark.
#include <Arduino.h> #include <Arduino.h>
#include <Preferences.h> #include <Preferences.h>
#include "jc3636w518.h" #include "jc3636w518.h"
#include "obd_link.h" #include "obd_link.h"
#include "bg_store.h" #include "bg_store.h"
#include "can_log.h"
#define SPEED_MAX 200 #define SPEED_MAX 200
#define VOLT_MIN_X10 110 // voltage arc range 11.0 .. 15.0 V #define VOLT_MIN_X10 110 // voltage arc range 11.0 .. 15.0 V
@@ -28,7 +31,9 @@ static const lv_color_t COLOR_ARC = lv_color_hex(0x00C8FF);
static const lv_color_t COLOR_OBD = lv_color_hex(0x4CD964); static const lv_color_t COLOR_OBD = lv_color_hex(0x4CD964);
static const lv_color_t COLOR_PANEL = lv_color_hex(0x161C22); static const lv_color_t COLOR_PANEL = lv_color_hex(0x161C22);
static lv_obj_t *tileview, *tile_speed, *tile_menu, *tile_settings, *tile_bg; static lv_obj_t *tileview, *tile_speed, *tile_menu, *tile_settings, *tile_bg, *tile_log;
static lv_obj_t *rec_label, *log_status_label, *log_phase_label, *log_frames_label, *log_toggle_label;
static uint32_t mark_shown_until = 0;
static lv_obj_t *bg_status_label, *bg_list; static lv_obj_t *bg_status_label, *bg_list;
static std::vector<BgFile> bg_files; static std::vector<BgFile> bg_files;
static uint32_t bg_list_version = 0, bg_source_version = 0; static uint32_t bg_list_version = 0, bg_source_version = 0;
@@ -209,6 +214,20 @@ static void on_bg_rescan_clicked(lv_event_t *e)
bg_request_list(); bg_request_list();
} }
// ---------- CAN log ----------
static void add_mark()
{
if (!can_log_enabled())
return;
can_log_mark();
mark_shown_until = millis() + 1500;
}
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 ---------- // ---------- speed page ----------
static void build_speed_tile() static void build_speed_tile()
{ {
@@ -289,6 +308,19 @@ static void build_speed_tile()
lv_obj_set_style_pad_ver(status_label, 3, 0); lv_obj_set_style_pad_ver(status_label, 3, 0);
lv_label_set_text(status_label, ""); lv_label_set_text(status_label, "");
lv_obj_align(status_label, LV_ALIGN_CENTER, 0, 100); lv_obj_align(status_label, LV_ALIGN_CENTER, 0, 100);
// shown while the CAN logger runs; a tap on the page adds a mark
rec_label = lv_label_create(tile_speed);
lv_obj_set_style_text_font(rec_label, &lv_font_montserrat_16, 0);
lv_obj_set_style_text_color(rec_label, COLOR_TEXT, 0);
lv_obj_set_style_bg_color(rec_label, lv_color_hex(0xFF3B30), 0);
lv_obj_set_style_bg_opa(rec_label, LV_OPA_80, 0);
lv_obj_set_style_radius(rec_label, 12, 0);
lv_obj_set_style_pad_hor(rec_label, 10, 0);
lv_obj_set_style_pad_ver(rec_label, 3, 0);
lv_obj_align(rec_label, LV_ALIGN_TOP_MID, 0, 44);
lv_obj_add_flag(rec_label, LV_OBJ_FLAG_HIDDEN);
lv_obj_add_event_cb(tile_speed, on_speed_tapped, LV_EVENT_SHORT_CLICKED, NULL);
} }
// ---------- menu page ---------- // ---------- menu page ----------
@@ -405,6 +437,63 @@ static void build_bg_tile()
make_button(tile_bg, "Done", 50, 296, 92, on_done_clicked); make_button(tile_bg, "Done", 50, 296, 92, on_done_clicked);
} }
static void build_log_tile()
{
lv_obj_t *title = lv_label_create(tile_log);
lv_obj_set_style_text_font(title, &lv_font_montserrat_20, 0);
lv_obj_set_style_text_color(title, COLOR_TEXT, 0);
lv_label_set_text(title, "CAN log");
lv_obj_align(title, LV_ALIGN_TOP_MID, 0, 20);
log_status_label = lv_label_create(tile_log);
lv_obj_set_style_text_color(log_status_label, COLOR_TEXT, 0);
lv_obj_set_width(log_status_label, 260);
lv_label_set_long_mode(log_status_label, LV_LABEL_LONG_MODE_DOTS);
lv_obj_set_style_text_align(log_status_label, LV_TEXT_ALIGN_CENTER, 0);
lv_label_set_text(log_status_label, "");
lv_obj_align(log_status_label, LV_ALIGN_TOP_MID, 0, 48);
log_phase_label = lv_label_create(tile_log);
lv_obj_set_style_text_color(log_phase_label, COLOR_DIM, 0);
lv_obj_set_width(log_phase_label, 290);
lv_label_set_long_mode(log_phase_label, LV_LABEL_LONG_MODE_DOTS);
lv_obj_set_style_text_align(log_phase_label, LV_TEXT_ALIGN_CENTER, 0);
lv_label_set_text(log_phase_label, "");
lv_obj_align(log_phase_label, LV_ALIGN_TOP_MID, 0, 68);
// 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_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);
lv_obj_t *toggle = make_button(tile_log, "", -62, 164, 112, on_log_toggle_clicked);
log_toggle_label = lv_obj_get_child(toggle, 0);
lv_obj_t *mark = lv_button_create(tile_log);
lv_obj_set_size(mark, 112, 34);
lv_obj_align(mark, LV_ALIGN_TOP_MID, 62, 164);
lv_obj_set_style_bg_color(mark, lv_color_hex(0xFF9500), 0);
lv_obj_add_event_cb(mark, on_mark_clicked, LV_EVENT_CLICKED, NULL);
lv_obj_t *l = lv_label_create(mark);
lv_label_set_text(l, "Mark");
lv_obj_set_style_text_font(l, &lv_font_montserrat_16, 0);
lv_obj_center(l);
lv_obj_t *hint = lv_label_create(tile_log);
lv_obj_set_style_text_color(hint, COLOR_DIM, 0);
lv_obj_set_style_text_align(hint, LV_TEXT_ALIGN_CENTER, 0);
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, "Reset scan", -56, 296, 104, on_scan_reset_clicked);
make_button(tile_log, "Done", 56, 296, 92, on_done_clicked);
}
static void build_ui() static void build_ui()
{ {
lv_obj_set_style_bg_color(lv_screen_active(), lv_color_hex(0x000000), 0); lv_obj_set_style_bg_color(lv_screen_active(), lv_color_hex(0x000000), 0);
@@ -414,12 +503,14 @@ static void build_ui()
tile_speed = lv_tileview_add_tile(tileview, 0, 0, LV_DIR_RIGHT); tile_speed = lv_tileview_add_tile(tileview, 0, 0, LV_DIR_RIGHT);
tile_menu = lv_tileview_add_tile(tileview, 1, 0, (lv_dir_t)(LV_DIR_LEFT | LV_DIR_RIGHT)); tile_menu = lv_tileview_add_tile(tileview, 1, 0, (lv_dir_t)(LV_DIR_LEFT | LV_DIR_RIGHT));
tile_settings = lv_tileview_add_tile(tileview, 2, 0, (lv_dir_t)(LV_DIR_LEFT | LV_DIR_RIGHT)); tile_settings = lv_tileview_add_tile(tileview, 2, 0, (lv_dir_t)(LV_DIR_LEFT | LV_DIR_RIGHT));
tile_bg = lv_tileview_add_tile(tileview, 3, 0, LV_DIR_LEFT); tile_bg = lv_tileview_add_tile(tileview, 3, 0, (lv_dir_t)(LV_DIR_LEFT | LV_DIR_RIGHT));
tile_log = lv_tileview_add_tile(tileview, 4, 0, LV_DIR_LEFT);
lv_obj_add_event_cb(tileview, on_tile_changed, LV_EVENT_VALUE_CHANGED, NULL); lv_obj_add_event_cb(tileview, on_tile_changed, LV_EVENT_VALUE_CHANGED, NULL);
build_speed_tile(); build_speed_tile();
build_menu_tile(); build_menu_tile();
build_settings_tile(); build_settings_tile();
build_bg_tile(); build_bg_tile();
build_log_tile();
idle_overlay = lv_obj_create(lv_layer_top()); idle_overlay = lv_obj_create(lv_layer_top());
lv_obj_remove_style_all(idle_overlay); lv_obj_remove_style_all(idle_overlay);
@@ -513,6 +604,43 @@ static void update_speed()
} }
} }
static void set_label(lv_obj_t *label, const String &text)
{
if (text != lv_label_get_text(label))
lv_label_set_text(label, text.c_str());
}
static void update_log()
{
bool on = can_log_enabled();
if (on == lv_obj_has_flag(rec_label, LV_OBJ_FLAG_HIDDEN))
{
if (on)
lv_obj_remove_flag(rec_label, LV_OBJ_FLAG_HIDDEN);
else
lv_obj_add_flag(rec_label, LV_OBJ_FLAG_HIDDEN);
}
if (on)
{
bool flash = (int32_t)(millis() - mark_shown_until) < 0;
set_label(rec_label, flash ? "MARK " + String(can_log_marks()) : "REC " + String(can_log_marks()));
lv_obj_set_style_bg_color(rec_label, flash ? lv_color_hex(0xFF9500) : lv_color_hex(0xFF3B30), 0);
}
if (lv_tileview_get_tile_active(tileview) != tile_log)
return;
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());
String frames;
for (int i = 0; i < CANLOG_SLOTS; i++)
{
String f = can_log_frame(i);
if (f.length())
frames += (frames.length() ? "\n" : "") + f;
}
set_label(log_frames_label, frames);
}
static lv_obj_t *add_bg_item(const String &text, lv_color_t color, int idx) static lv_obj_t *add_bg_item(const String &text, lv_color_t color, int idx)
{ {
lv_obj_t *btn = lv_list_add_button(bg_list, NULL, text.c_str()); lv_obj_t *btn = lv_list_add_button(bg_list, NULL, text.c_str());
@@ -630,10 +758,14 @@ void setup()
{ {
delay(200); delay(200);
Serial.begin(115200); Serial.begin(115200);
// internal RAM is tight (draw buffers + BLE); put even small malloc blocks (LVGL objects, Strings) into
// PSRAM so the SD driver keeps enough DMA-capable memory. Explicit heap_caps allocations are not affected.
heap_caps_malloc_extmem_enable(64);
scr_lvgl_init(); scr_lvgl_init();
setRotation(load_rotation()); setRotation(load_rotation());
build_ui(); build_ui();
obd_set_idle_timeout(load_idle_minutes()); obd_set_idle_timeout(load_idle_minutes());
can_log_begin();
obd_begin(); obd_begin();
bg_begin(); bg_begin();
apply_background(); apply_background();
@@ -657,9 +789,11 @@ void loop()
update_voltage(); update_voltage();
update_idle(); update_idle();
update_bg_source(); update_bg_source();
update_log();
if (lv_tileview_get_tile_active(tileview) == tile_bg) if (lv_tileview_get_tile_active(tileview) == tile_bg)
update_bg_page(); update_bg_page();
} }
can_log_serial_poll();
if (now - last_menu >= 500 && menu_visible()) if (now - last_menu >= 500 && menu_visible())
{ {
last_menu = now; last_menu = now;
+725 -33
View File
@@ -2,6 +2,10 @@
#include <NimBLEDevice.h> #include <NimBLEDevice.h>
#include <Preferences.h> #include <Preferences.h>
#include <algorithm>
#include "can_log.h"
#include "watch_dids.h"
#define RETRY_DELAY_MS 3000 #define RETRY_DELAY_MS 3000
#define IDLE_RETRY_DELAY_MS 30000 #define IDLE_RETRY_DELAY_MS 30000
@@ -9,6 +13,7 @@
#define VOLTAGE_INTERVAL_MS 2000 // ATRV while driving #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 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 WAKE_VOLTAGE 13.2f // above this the alternator is charging: engine running
#define LOG_OBD_INTERVAL_MS 2000 // speed while scanning (between requests)
// ---------- shared state (protected by `mtx`) ---------- // ---------- shared state (protected by `mtx`) ----------
static SemaphoreHandle_t mtx; static SemaphoreHandle_t mtx;
@@ -34,6 +39,10 @@ static ObdDevInfo req_dev;
static NimBLEClient *client = nullptr; static NimBLEClient *client = nullptr;
static NimBLERemoteCharacteristic *chr_write = nullptr, *chr_notify = nullptr; static NimBLERemoteCharacteristic *chr_write = nullptr, *chr_notify = nullptr;
static Preferences prefs; 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)
static void lock() { xSemaphoreTake(mtx, portMAX_DELAY); } static void lock() { xSemaphoreTake(mtx, portMAX_DELAY); }
static void unlock() { xSemaphoreGive(mtx); } static void unlock() { xSemaphoreGive(mtx); }
@@ -122,14 +131,20 @@ static void on_notify(NimBLERemoteCharacteristic *c, uint8_t *data, size_t len,
unlock(); unlock();
} }
static bool elm_write(const String &s)
{
if (!chr_write) // dropped meanwhile (adapter not answering)
return false;
return chr_write->writeValue((const uint8_t *)s.c_str(), s.length(), !chr_write->canWriteNoResponse());
}
// Sends a command, waits for the '>' prompt. Returns the reply without prompt/CR, or "" on timeout. // Sends a command, waits for the '>' prompt. Returns the reply without prompt/CR, or "" on timeout.
static String elm_command(const char *cmd, uint32_t timeout_ms) static String elm_command(const char *cmd, uint32_t timeout_ms)
{ {
lock(); lock();
elm_rx = ""; elm_rx = "";
unlock(); unlock();
String line = String(cmd) + "\r"; if (!elm_write(String(cmd) + "\r"))
if (!chr_write->writeValue((const uint8_t *)line.c_str(), line.length(), !chr_write->canWriteNoResponse()))
return ""; return "";
uint32_t t0 = millis(); uint32_t t0 = millis();
String rx; String rx;
@@ -152,6 +167,51 @@ static String elm_command(const char *cmd, uint32_t timeout_ms)
return ""; return "";
} }
static String elm_command(const String &cmd, uint32_t timeout_ms) { return elm_command(cmd.c_str(), timeout_ms); }
// Monitor mode (ATMA) with the current CAN filter: collects received lines until `max_lines` arrived or `ms`
// passed, then stops it with a CR. Returns false if the adapter never came back with a prompt.
static bool elm_monitor(uint32_t ms, int max_lines, std::vector<String> &lines)
{
lines.clear();
lock();
elm_rx = "";
unlock();
if (!elm_write("ATMA\r"))
return false;
bool prompt = false, stop_sent = false;
uint32_t t0 = millis(), t_stop = 0;
for (;;)
{
lock();
int cr;
while ((cr = elm_rx.indexOf('\r')) >= 0)
{
String line = elm_rx.substring(0, cr);
elm_rx.remove(0, cr + 1);
line.trim();
if (line.length() && line != "STOPPED")
lines.push_back(line);
}
prompt = elm_rx.indexOf('>') >= 0; // monitoring ended (stopped by us, BUFFER FULL, error)
unlock();
if (prompt)
return true;
if (!client->isConnected())
return false;
if (!stop_sent && (millis() - t0 >= ms || (int)lines.size() >= max_lines))
{
if (!elm_write("\r"))
return false;
stop_sent = true;
t_stop = millis();
}
if (stop_sent && millis() - t_stop > 1500)
return false;
vTaskDelay(pdMS_TO_TICKS(5));
}
}
// "410D3C" (spaces/headers removed by ATS0/ATH0; multiple ECUs possible) -> 60 // "410D3C" (spaces/headers removed by ATS0/ATH0; multiple ECUs possible) -> 60
static int parse_speed(String reply) static int parse_speed(String reply)
{ {
@@ -187,6 +247,12 @@ static void disconnect()
if (client && client->isConnected()) if (client && client->isConnected())
client->disconnect(); client->disconnect();
speed_kmh = -1; speed_kmh = -1;
if (scan_ready)
{
can_log_line("E disconnected");
can_log_set_phase("Adapter not connected");
}
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 // Finds the ELM UART characteristics: service FFF0 (verified: FFF1 notify + write), else any notify+write pair
@@ -246,6 +312,7 @@ static bool connect_and_init()
set_status("Adapter not found"); set_status("Adapter not found");
return false; 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)) if (!find_characteristics() || !chr_notify->subscribe(chr_notify->canNotify(), on_notify))
{ {
set_status("Not an ELM adapter?"); set_status("Not an ELM adapter?");
@@ -271,6 +338,648 @@ static bool connect_and_init()
return true; return true;
} }
// ---------- speed polling ----------
// Counts a missing prompt; after a few the adapter is considered hung and the link is dropped.
static void note_no_reply()
{
if (++fails >= POLL_FAIL_LIMIT)
{
set_status("Adapter not answering");
disconnect();
next_attempt = millis() + RETRY_DELAY_MS;
}
}
static void poll_speed()
{
String reply = elm_command("010D", 1500);
int v = parse_speed(reply);
speed_kmh = v;
can_log_line("V " + String(v));
if (v >= 0)
{
fails = 0;
last_data_ms = millis();
set_status(saved_name.length() ? saved_name : saved_addr);
}
else if (reply.length() == 0)
{
// no prompt at all: adapter hung or link dead
note_no_reply();
}
else
{
// "NO DATA", "UNABLE TO CONNECT", "STOPPED"...: ignition off or ECU busy
fails = 0;
String r = reply;
r.replace("\n", " ");
set_status(r.substring(0, 24));
vTaskDelay(pdMS_TO_TICKS(500));
}
}
// ---------- 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 int watch_multi = 0; // watch mode: 0 = not tested (per connection), 1 = 3 per request, 2 = single
static uint32_t progress_ms = 0;
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;
}
static uint16_t did_at(uint32_t pos)
{
for (auto &seg : SCAN_SEGMENTS)
{
uint32_t len = seg[1] - seg[0] + 1;
if (pos < len)
return seg[0] + pos;
pos -= len;
}
return 0xFFFF;
}
static void scan_save()
{
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;
}
static void scan_load()
{
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;
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;
}
static bool is_reply(const String &r, const String &req)
{
return r.startsWith(String("6") + req.substring(1, 2)) || r.startsWith("7F" + req.substring(0, 2));
}
// 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);
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;
watch_multi = 0;
progress_ms = millis();
scan_ready = true;
}
static void scan_stop()
{
use_header(0x7DF);
elm_command("ATST32", 1500);
scan_ready = false;
can_log_set_phase("");
}
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;
}
}
// ---------- watch (after the scan): read the unknown PCM DIDs over and over, log every change ----------
// To find the cruise set speed / speed limit: values that only change when the set speed is changed or a
// sign is passed (marks). Up to 3 DIDs per request when the PCM allows it; the reply is split with the
// lengths known from the scan. Log: "W <did> <data>" on every change, "E round ..." per round.
static std::vector<String> watch_last; // last value per WATCH_DIDS entry
static uint32_t watch_index = 0, watch_round = 0, watch_round_start = 0, watch_changes = 0;
static void watch_record(int i, const String &data)
{
if (data == watch_last[i])
return;
watch_last[i] = data;
watch_changes++;
can_log_line("W " + hex4(WATCH_DIDS[i].did) + " " + data);
if (watch_round > 0)
can_log_set_frame(2, "Changed: " + hex4(WATCH_DIDS[i].did) + " = " + data.substring(0, 16));
}
// Reads WATCH_DIDS[i..i+n-1] in one request; false if the reply couldn't be split (then ask one by one)
static bool watch_read(int i, int n, bool &answered)
{
String req = "22";
for (int k = 0; k < n; k++)
req += hex4(WATCH_DIDS[i + k].did);
String r = scan_request(0x7E0, req);
answered = r != "NODATA" && r.length() && r != "?TIMEOUT";
if (!r.startsWith("62"))
return n == 1; // single: nothing more to try; several: retry one by one
int pos = 2;
for (int k = 0; k < n; k++)
{
int len = WATCH_DIDS[i + k].len * 2;
if (r.substring(pos, pos + 4) != hex4(WATCH_DIDS[i + k].did) || (int)r.length() < pos + 4 + len)
return false;
watch_record(i + k, r.substring(pos + 4, pos + 4 + len));
pos += 4 + len;
}
return true;
}
static void watch_step()
{
if (watch_last.empty())
watch_last.resize(WATCH_COUNT);
if (watch_multi == 0)
{
// three 1-byte DIDs: reply "62D10001D13400D13700" if the PCM handles several per request
String r = scan_request(0x7E0, "22D100D134D137");
watch_multi = (r.startsWith("62D100") && r.indexOf("D137") > 0) ? 1 : 2;
can_log_line("E watch multi-DID: " + String(watch_multi == 1 ? "yes" : "no") + " (" + r.substring(0, 24) + ")");
watch_round_start = millis();
}
if (watch_index >= WATCH_COUNT)
{
uint32_t ms = millis() - watch_round_start;
can_log_line("E round " + String(watch_round) + " done, " + String(ms / 1000) + " s, " + String(watch_changes) +
" changes");
can_log_set_frame(1, "Round " + String(watch_round + 1) + ", last " + String(ms / 1000) + " s");
watch_round++;
watch_index = 0;
watch_changes = 0;
watch_round_start = millis();
}
int n = watch_multi == 1 ? std::min<int>(3, WATCH_COUNT - watch_index) : 1;
bool answered;
if (!watch_read(watch_index, n, answered))
for (int k = 0; k < n; k++)
watch_read(watch_index + k, 1, answered);
if (!answered)
{
if (++scan_silent >= 20)
{
scan_silent = 0;
can_log_line("E 7E0 not answering (watch)");
vTaskDelay(pdMS_TO_TICKS(5000));
return;
}
}
else
scan_silent = 0;
watch_index += n;
if ((watch_index & 0x1F) < (uint32_t)n)
can_log_set_phase("Watching PCM: round " + String(watch_round) + ", " + String(watch_index) + "/" +
String(WATCH_COUNT));
}
// One unit of scan work (one request), with speed + voltage every 2 s
static void log_step()
{
if (req_scan_reset)
{
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)
{
next_voltage = millis() + VOLTAGE_INTERVAL_MS;
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;
switch (scan_step)
{
case ScanStep::RawCheck:
scan_raw_check();
break;
case ScanStep::Discover:
scan_discover_step();
break;
case ScanStep::Dids:
if (!scan_probed)
scan_probe_step();
else
scan_did_step();
break;
default: // scan finished: watch the unknown DIDs
watch_step();
break;
}
}
// ---------- worker task ---------- // ---------- worker task ----------
static void load_saved() static void load_saved()
{ {
@@ -283,9 +992,6 @@ static void load_saved()
static void worker_task(void *) static void worker_task(void *)
{ {
uint32_t next_attempt = 0;
uint32_t next_voltage = 0;
int fails = 0;
last_data_ms = millis(); last_data_ms = millis();
for (;;) for (;;)
{ {
@@ -304,6 +1010,7 @@ static void worker_task(void *)
idle = true; idle = true;
speed_kmh = -1; speed_kmh = -1;
Serial.println("[obd] idle"); Serial.println("[obd] idle");
can_log_line("E idle");
} }
// requests from the UI // requests from the UI
@@ -381,12 +1088,22 @@ static void worker_task(void *)
idle = false; idle = false;
last_data_ms = millis(); last_data_ms = millis();
Serial.printf("[obd] wake (%.1f V)\n", voltage); Serial.printf("[obd] wake (%.1f V)\n", voltage);
can_log_line("E wake " + String(voltage, 1) + " V");
} }
} }
vTaskDelay(pdMS_TO_TICKS(100)); vTaskDelay(pdMS_TO_TICKS(100));
continue; continue;
} }
// logging on: diagnostic scan with speed/voltage in between
if (can_log_enabled())
{
log_step();
continue;
}
if (scan_ready)
scan_stop();
if ((int32_t)(millis() - next_voltage) >= 0) if ((int32_t)(millis() - next_voltage) >= 0)
{ {
next_voltage = millis() + VOLTAGE_INTERVAL_MS; next_voltage = millis() + VOLTAGE_INTERVAL_MS;
@@ -394,34 +1111,7 @@ static void worker_task(void *)
} }
// connected: poll the vehicle speed // connected: poll the vehicle speed
String reply = elm_command("010D", 1500); poll_speed();
int v = parse_speed(reply);
speed_kmh = v;
if (v >= 0)
{
fails = 0;
last_data_ms = millis();
set_status(saved_name.length() ? saved_name : saved_addr);
}
else if (reply.length() == 0)
{
// no prompt at all: adapter hung or link dead
if (++fails >= POLL_FAIL_LIMIT)
{
set_status("Adapter not answering");
disconnect();
next_attempt = millis() + RETRY_DELAY_MS;
}
}
else
{
// "NO DATA", "UNABLE TO CONNECT", "STOPPED"...: ignition off or ECU busy
fails = 0;
String r = reply;
r.replace("\n", " ");
set_status(r.substring(0, 24));
vTaskDelay(pdMS_TO_TICKS(500));
}
} }
} }
@@ -488,3 +1178,5 @@ void obd_select_device(const ObdDevInfo &dev)
} }
void obd_forget_device() { req_forget = true; } 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_name(); // "" if none
String obd_saved_address(); 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 // Menu: scan for adapters while the menu is open
void obd_scan_enable(bool on); void obd_scan_enable(bool on);
bool obd_get_devices(std::vector<ObdDevInfo> &out, uint32_t &version); bool obd_get_devices(std::vector<ObdDevInfo> &out, uint32_t &version);
+42
View File
@@ -0,0 +1,42 @@
#include "sd_card.h"
#include <Arduino.h>
#include <SD_MMC.h>
#include "pincfg.h"
static int users = 0;
static SemaphoreHandle_t mutex()
{
static SemaphoreHandle_t m = xSemaphoreCreateMutex();
return m;
}
bool sd_acquire()
{
xSemaphoreTake(mutex(), portMAX_DELAY);
bool ok = true;
if (users == 0)
{
SD_MMC.setPins(SD_MMC_CLK_PIN, SD_MMC_CMD_PIN, SD_MMC_D0_PIN, SD_MMC_D1_PIN, SD_MMC_D2_PIN, SD_MMC_D3_PIN);
ok = SD_MMC.begin() && SD_MMC.cardType() != CARD_NONE;
if (!ok)
SD_MMC.end();
Serial.printf("[sd] mount %s, internal free %u largest %u, dma free %u largest %u\n", ok ? "ok" : "FAILED",
heap_caps_get_free_size(MALLOC_CAP_INTERNAL), heap_caps_get_largest_free_block(MALLOC_CAP_INTERNAL),
heap_caps_get_free_size(MALLOC_CAP_DMA), heap_caps_get_largest_free_block(MALLOC_CAP_DMA));
}
if (ok)
users++;
xSemaphoreGive(mutex());
return ok;
}
void sd_release()
{
xSemaphoreTake(mutex(), portMAX_DELAY);
if (users > 0 && --users == 0)
SD_MMC.end();
xSemaphoreGive(mutex());
}
+6
View File
@@ -0,0 +1,6 @@
// Shared SD card mount (SD_MMC, 4-bit), reference-counted so the background store and the CAN logger
// can use the card at the same time. Thread-safe.
#pragma once
bool sd_acquire(); // mounts the card on first use; false if there is no (working) card
void sd_release(); // unmounts when the last user is done
+69
View File
@@ -0,0 +1,69 @@
// Generated by tools/make_watch_dids.py from the DID scan logs (docs/canlog) - do not edit.
// PCM (0x7E0) DIDs with unknown meaning that are watched for changes: 327 of 389 supported.
#pragma once
#include <stdint.h>
struct WatchDid
{
uint16_t did;
uint8_t len; // reply data bytes (from the scan)
};
static const WatchDid WATCH_DIDS[] = {
{0x0117, 1}, {0x0118, 2}, {0x0119, 1}, {0x0202, 1}, {0x0300, 4}, {0x0301, 2},
{0x0302, 4}, {0x0303, 4}, {0x0304, 2}, {0x0307, 2}, {0x0308, 2}, {0x0309, 1},
{0x030A, 2}, {0x030B, 1}, {0x0310, 1}, {0x0311, 1}, {0x0315, 2}, {0x0316, 2},
{0x0317, 2}, {0x0318, 2}, {0x0319, 2}, {0x031A, 2}, {0x031B, 2}, {0x031E, 2},
{0x0320, 1}, {0x0324, 2}, {0x032B, 1}, {0x0334, 2}, {0x0338, 2}, {0x033C, 2},
{0x033E, 2}, {0x033F, 2}, {0x0345, 4}, {0x0348, 2}, {0x034E, 2}, {0x0353, 2},
{0x0355, 2}, {0x0356, 2}, {0x0357, 2}, {0x035A, 2}, {0x035D, 4}, {0x035F, 2},
{0x0371, 4}, {0x0382, 1}, {0x0388, 1}, {0x0389, 4}, {0x038A, 1}, {0x038E, 2},
{0x038F, 2}, {0x0390, 4}, {0x0391, 4}, {0x0393, 2}, {0x0394, 4}, {0x03A0, 2},
{0x03A1, 1}, {0x03A7, 1}, {0x03A8, 4}, {0x03A9, 4}, {0x03AA, 4}, {0x03AC, 2},
{0x03AD, 4}, {0x03AF, 1}, {0x03B1, 2}, {0x03B3, 1}, {0x03B5, 2}, {0x03BA, 2},
{0x03BB, 2}, {0x03BC, 2}, {0x03BD, 2}, {0x03C0, 1}, {0x03C7, 2}, {0x03C9, 2},
{0x03CA, 1}, {0x03CD, 1}, {0x03CF, 1}, {0x03D1, 2}, {0x03D3, 2}, {0x03D4, 2},
{0x03D7, 2}, {0x03D8, 2}, {0x03D9, 2}, {0x03DA, 2}, {0x03DC, 2}, {0x03E8, 2},
{0x03EC, 2}, {0x03EF, 2}, {0x03FD, 2}, {0x0403, 2}, {0x0409, 1}, {0x0414, 4},
{0x0416, 4}, {0x0418, 2}, {0x0427, 1}, {0x0429, 2}, {0x045C, 4}, {0x0461, 2},
{0x0462, 2}, {0x0464, 1}, {0x0465, 1}, {0x0466, 2}, {0x046D, 2}, {0x046F, 1},
{0x0470, 1}, {0x0474, 1}, {0x04A9, 4}, {0x04F7, 2}, {0x051B, 2}, {0x0546, 4},
{0x0547, 1}, {0x054B, 1}, {0x054F, 2}, {0x0551, 2}, {0x0552, 2}, {0x0554, 2},
{0x057D, 1}, {0x057E, 1}, {0x0580, 1}, {0x0590, 4}, {0x0591, 4}, {0x0594, 2},
{0x0598, 2}, {0x0599, 1}, {0x059A, 1}, {0x05AB, 2}, {0x05AC, 1}, {0x05AD, 1},
{0x05AE, 1}, {0x05B7, 4}, {0x05B8, 2}, {0x05BB, 4}, {0x05CB, 1}, {0x05E1, 4},
{0x05E2, 1}, {0x05E3, 1}, {0x05E4, 1}, {0x05E5, 4}, {0x05E6, 4}, {0x05E7, 4},
{0x05E8, 4}, {0x05E9, 4}, {0x05FB, 4}, {0x05FC, 2}, {0x05FD, 2}, {0x061B, 2},
{0x0629, 2}, {0x062A, 2}, {0x062E, 2}, {0x062F, 1}, {0x0630, 1}, {0x0639, 2},
{0x063B, 2}, {0x063C, 2}, {0x063D, 2}, {0x063E, 2}, {0x0651, 1}, {0x0654, 1},
{0x0655, 2}, {0x0700, 4}, {0x0703, 4}, {0x0707, 1}, {0x0914, 2}, {0x0915, 2},
{0x0917, 2}, {0x0918, 2}, {0x091A, 2}, {0x091B, 1}, {0x093C, 2}, {0x099B, 2},
{0x09CD, 1}, {0x1126, 1}, {0x1166, 2}, {0x1167, 2}, {0x116B, 2}, {0x1279, 2},
{0x1505, 2}, {0x16D3, 2}, {0x16D4, 2}, {0x16D7, 2}, {0x16D8, 1}, {0x16DC, 2},
{0x1E01, 4}, {0x1E04, 4}, {0x1E09, 2}, {0x1E0A, 2}, {0x1E0C, 1}, {0x1E0D, 1},
{0x1E0E, 1}, {0x1E0F, 1}, {0x1E10, 1}, {0x1E11, 2}, {0x1E12, 1}, {0x1E13, 2},
{0x1E14, 2}, {0x1E15, 2}, {0x1E16, 2}, {0x1E17, 1}, {0x1E18, 4}, {0x1E19, 2},
{0x1E1A, 2}, {0x1E1B, 2}, {0x1E1C, 2}, {0x1E1D, 2}, {0x1E23, 1}, {0x1E28, 1},
{0x1E29, 2}, {0x1E2A, 2}, {0x1E2B, 2}, {0x1E2D, 2}, {0x1E2E, 1}, {0x1E33, 2},
{0x1E35, 2}, {0x1E36, 2}, {0x1E37, 2}, {0x1E39, 4}, {0x1E3A, 2}, {0x1E3C, 2},
{0x1E3D, 2}, {0x1E46, 1}, {0x1E4D, 2}, {0x1E53, 2}, {0x1E54, 2}, {0x1E55, 2},
{0x1E56, 2}, {0x1E59, 2}, {0x1E5E, 1}, {0x1E60, 1}, {0x1EF8, 2}, {0x1EF9, 2},
{0x1EFA, 2}, {0x2028, 2}, {0x2029, 2}, {0x2872, 2}, {0x2873, 2}, {0x2874, 1},
{0x2B00, 4}, {0x3B40, 4}, {0x9800, 2}, {0x9801, 4}, {0x9863, 1}, {0x9864, 2},
{0x986B, 4}, {0xA45F, 4}, {0xC011, 4}, {0xC012, 4}, {0xC1A3, 4}, {0xD002, 2},
{0xD003, 4}, {0xD005, 4}, {0xD006, 4}, {0xD014, 4}, {0xD015, 4}, {0xD100, 1},
{0xD127, 2}, {0xD134, 1}, {0xD137, 1}, {0xD980, 4}, {0xFD00, 2}, {0xFD01, 2},
{0xFD02, 2}, {0xFD03, 2}, {0xFD04, 2}, {0xFD05, 2}, {0xFD06, 2}, {0xFD07, 2},
{0xFD08, 2}, {0xFD09, 2}, {0xFD0A, 2}, {0xFD0B, 2}, {0xFD0C, 2}, {0xFD0D, 2},
{0xFD10, 2}, {0xFD11, 2}, {0xFD12, 2}, {0xFD13, 2}, {0xFD14, 2}, {0xFD15, 2},
{0xFD16, 2}, {0xFD17, 4}, {0xFD18, 4}, {0xFD19, 2}, {0xFD1A, 2}, {0xFD1B, 2},
{0xFD1C, 2}, {0xFD1D, 2}, {0xFD1E, 2}, {0xFD1F, 2}, {0xFD20, 2}, {0xFD21, 2},
{0xFD22, 2}, {0xFD23, 2}, {0xFD24, 2}, {0xFD25, 2}, {0xFD26, 2}, {0xFD27, 2},
{0xFD28, 2}, {0xFD29, 2}, {0xFD2A, 2}, {0xFD2B, 2}, {0xFD2C, 2}, {0xFD2D, 2},
{0xFD2E, 2}, {0xFD2F, 1}, {0xFD33, 2}, {0xFD34, 2}, {0xFD35, 2}, {0xFD36, 2},
{0xFD37, 2}, {0xFD38, 2}, {0xFD39, 4}, {0xFD3A, 4}, {0xFD40, 2}, {0xFD41, 2},
{0xFD4A, 2}, {0xFD4B, 2}, {0xFD4C, 2}, {0xFD4D, 2}, {0xFD5D, 2}, {0xFD5E, 2},
{0xFD5F, 2}, {0xFD60, 2}, {0xFD61, 2}, {0xFD62, 1}, {0xFD63, 2}, {0xFD64, 4},
{0xFD66, 4}, {0xFE24, 2}, {0xFE25, 2},
};
static const uint16_t WATCH_COUNT = sizeof(WATCH_DIDS) / sizeof(WATCH_DIDS[0]);
+37
View File
@@ -0,0 +1,37 @@
# 13-Dash-Mount
Dashboard holder for the JC3636W518 puck (used with `12-OBD-Speed`).
Source: `dash_mount.scad` (OpenSCAD, all dimensions are parameters at the top). Ready STLs in `stl/`.
**Status (2026-10-24):** base printed and fits perfectly.
## Parts
| Part | Print orientation | Notes |
|---|---|---|
| `cup.stl` | back on the bed | Snap-in cup: 0.9 mm lip over the bezel, flex slots, USB-C opening on the right (`usb_angle`), push-out hole in the back, hinge knuckle with detent teeth below the bottom edge |
| `base.stl` | foot on the bed | Flat foot 40 × 46 mm for VHB tape, two hinge ears with teeth, captive M3 nut pocket in the right ear |
| `knob.stl` | flat on the bed | Holds the M3 socket head (press it in warm, or glue it) |
No supports needed. ASA (dashboard heat), 0.2 mm layers, 4 perimeters (hinge strength), 30 % infill, brim/enclosure as usual for ASA.
## Hardware
- M3 × 20 socket head bolt, M3 nut
- 3M VHB / double-sided foam tape for the foot
## Assembly
1. Press the bolt head into the knob (heat the head with a soldering iron, or add a drop of CA glue).
2. Push the M3 nut into the hex pocket on the outside of the right ear.
3. Put the cup's knuckle between the ears, then push the bolt through from the left and screw it into the nut.
4. Snap the puck in with its USB-C port at the opening. The image orientation is set with the rotation setting in 12-OBD-Speed.
## Adjusting the angle
Loosen the knob about one turn, which lets the ears spring apart so the teeth clear. Set the angle and tighten again.
The teeth lock in **10° steps** (`teeth = 36`). The cup can tilt from about −30° (forward) to +80° (leaning back) without touching the base (checked in OpenSCAD).
## Tuning
- **Measure your puck** with calipers and set `puck_d` / `puck_h`. `fit` (0.3 mm diametral) is the clearance.
- Snap too tight or too loose: change `lip` (0.9) or `fit`.
- Finer steps: raise `teeth` (e.g. 48 → 7.5°), but the teeth get small and print worse. 24 gives 15° steps and is the most robust option.
- Teeth too hard to clear when loosened: increase `ear_spread`. If they don't lock firmly, decrease it.
- Cable out on the left instead: `usb_angle = 180`.
- `part = "assembly"` with `tilt` previews the mounted holder (snapped to a detent).
+218
View File
@@ -0,0 +1,218 @@
// Dashboard holder for the JC3636W518 round display (12-OBD-Speed)
//
// Three printed parts + M3x20 bolt + M3 nut + VHB tape:
// cup - snap-in holder for the 58 x 11 mm puck, hinge knuckle at its bottom edge
// base - flat foot (VHB tape) with two hinge ears, captive M3 nut in the right ear
// knob - thumb knob that holds the M3 bolt head
//
// Angle adjustment: the knuckle and both ears carry radial face teeth (detents).
// Loosen the knob ~1 turn -> the ears spring apart and the cup turns freely,
// set the angle, tighten -> the teeth lock (360/teeth degrees per step).
//
// Print in ASA (dashboard heat). Orientation is already correct for every part:
// cup : back on the bed (lip up) base : foot on the bed knob : flat on the bed
//
// Set `part` to "cup", "base" or "knob" and export each STL (F6, then F7).
part = "assembly"; // [assembly, cup, base, knob, print]
tilt = 30; // assembly preview only: lean back from vertical (deg)
/* [Puck] */
puck_d = 58.0; // metal case diameter
puck_h = 11.0; // case thickness
glass_d = 55.0; // cover glass diameter (lip must stay outside it)
/* [Cup] */
fit = 0.3; // diametral clearance puck <-> cup
wall_t = 2.0; // cup side wall
floor_t = 2.0; // cup back
lip = 0.9; // how far the snap lip reaches over the bezel (radial)
lip_t = 1.2; // lip thickness
push_d = 36; // hole in the back to push the puck out (0 = none)
slots = 8; // flex slots in the wall (make the snap easier)
slot_w = 1.2;
usb_angle = 0; // USB-C opening: 0 = right, 180 = left (seen from the front)
usb_w = 13; // opening width (USB-C plug overmold ~12 mm)
/* [Hinge] */
teeth = 36; // detent teeth -> 360/teeth degrees per click
tooth_h = 0.6; // tooth height
tooth_r_in = 5.0; // inner radius of the tooth ring
hinge_r = 9.0; // knuckle / ear disc radius (= outer radius of the teeth)
knuckle_w = 8.0; // knuckle width (between the ears)
ear_t = 4.0; // ear thickness
ear_spread = 0.8; // extra gap per side as printed, so the teeth clear when loose
bolt_d = 3.4; // M3 clearance hole
nut_af = 5.7; // M3 nut across flats + clearance
nut_h = 2.6; // nut pocket depth
/* [Base] */
foot_w = 40; // across the car (x)
foot_l = 46; // front-back (y)
foot_t = 4;
foot_r = 6; // corner radius
/* [Knob] */
knob_d = 20;
knob_floor = 2.5; // plastic between bolt head and ear
head_d = 5.4; // M3 socket head pocket (slightly tight: press in warm, or glue)
head_h = 3.2;
$fn = 96;
eps = 0.01;
// ---------- derived ----------
cup_id = puck_d + fit;
cup_od = cup_id + 2 * wall_t;
cup_h = floor_t + puck_h + 0.2 + lip_t;
hinge_z = cup_h / 2; // knuckle axis height in the cup frame
k_off = hinge_r + 1.5; // cup outer wall -> hinge axis (ears clear the cup)
hinge_y = -(cup_od / 2 + k_off); // knuckle axis position in the cup frame
ear_in = knuckle_w / 2 + tooth_h + ear_spread; // inner face of an ear (as printed)
axis_h = foot_t + hinge_r + 1; // hinge axis above the dashboard
pitch = 360 / teeth;
grip = 2 * ear_t + knuckle_w + 2 * tooth_h; // clamped stack when tight
echo(str("Bolt: M3 x ", ceil(grip + knob_floor), " or a bit longer (M3x20 for defaults)"));
echo(str("Detent step: ", pitch, " deg"));
assert(cup_id - 2 * lip > glass_d, "lip would cover the glass");
// ---------- detent teeth ----------
// One radial tooth in the XY plane, along +x, pointing +z.
module tooth(r0, r1, h) {
a = pitch / 2 * 1.03; // neighbours overlap a little (shared edges are non-manifold)
polyhedron(
points = [[r0 * cos(-a), r0 * sin(-a), -eps], [r0 * cos(a), r0 * sin(a), -eps], [r0, 0, h],
[r1 * cos(-a), r1 * sin(-a), -eps], [r1 * cos(a), r1 * sin(a), -eps], [r1, 0, h]],
faces = [[0, 1, 2], [3, 5, 4], [0, 3, 4, 1], [1, 4, 5, 2], [0, 2, 5, 3]]);
}
// Tooth ring on the plane x = 0 around the x axis, pointing toward +x (dir = 1) or -x
// (dir = -1). `phase` is the angle of tooth 0 in the YZ plane, measured from +y toward +z.
module tooth_ring(dir, phase) {
for (i = [0 : teeth - 1]) {
al = phase + i * pitch;
if (dir > 0) rotate([0, 90, 0]) rotate([0, 0, al + 90]) tooth(tooth_r_in, hinge_r - 0.3, tooth_h);
else rotate([0, -90, 0]) rotate([0, 0, 90 - al]) tooth(tooth_r_in, hinge_r - 0.3, tooth_h);
}
}
// ---------- cup ----------
module knuckle() { // in the cup frame
translate([0, hinge_y, hinge_z]) {
rotate([0, 90, 0]) cylinder(r = hinge_r, h = knuckle_w, center = true);
// phase chosen so the teeth mesh with the ears when `tilt` is a multiple of `pitch`
for (s = [-1, 1]) translate([s * knuckle_w / 2, 0, 0]) tooth_ring(s, pitch / 2 - 90);
}
// bridge from the disc to the cup wall
translate([-knuckle_w / 2, hinge_y, 0]) cube([knuckle_w, -hinge_y - cup_id / 2 + 1, cup_h]);
}
module cup() {
difference() {
union() {
cylinder(d = cup_od, h = cup_h);
intersection() {
knuckle();
translate([-50, -100, 0]) cube([100, 100, cup_h]); // keep it flat on the bed
}
}
// puck pocket
translate([0, 0, floor_t]) cylinder(d = cup_id, h = puck_h + 0.2);
// lip opening with a lead-in chamfer
translate([0, 0, floor_t + puck_h + 0.2 - eps])
cylinder(d1 = cup_id - 2 * lip, d2 = cup_id - 2 * lip + 2 * lip_t * 0.8, h = lip_t + 2 * eps);
// push-out hole
if (push_d > 0) translate([0, 0, -eps]) cylinder(d = push_d, h = floor_t + 2 * eps);
// USB-C opening, full wall height above the floor
rotate([0, 0, usb_angle]) translate([cup_id / 2 - 1, -usb_w / 2, floor_t])
cube([wall_t + 2, usb_w, cup_h]);
// flex slots (skip the ones near the hinge and the USB opening)
for (i = [0 : slots - 1]) {
a = 360 / slots * (i + 0.5);
if (adist(a, 270) > 30 && adist(a, usb_angle) > 25)
rotate([0, 0, a]) translate([cup_id / 2 - 1, -slot_w / 2, floor_t + 2])
cube([wall_t + 2, slot_w, cup_h]);
}
// bolt hole
translate([0, hinge_y, hinge_z]) rotate([0, 90, 0]) cylinder(d = bolt_d, h = 40, center = true, $fn = 32);
}
}
function adist(a, b) = let(d = abs((a - b) % 360)) min(d, 360 - d);
// ---------- base ----------
module rounded_plate(w, l, t, r) {
hull() for (x = [-1, 1], y = [-1, 1])
translate([x * (w / 2 - r), y * (l / 2 - r), 0]) {
cylinder(r = r, h = t - 1);
cylinder(r = r - 1, h = t); // 1 mm top chamfer
}
}
module ear() { // +x ear, inner face at x = ear_in
translate([ear_in, 0, 0]) rotate([90, 0, 90]) linear_extrude(ear_t)
hull() {
translate([0, axis_h]) circle(r = hinge_r);
translate([-hinge_r + 1, 0]) square([2 * hinge_r - 2, foot_t]);
}
translate([ear_in, 0, axis_h]) tooth_ring(-1, 0);
}
module base() {
difference() {
union() {
rounded_plate(foot_w, foot_l, foot_t, foot_r);
ear();
mirror([1, 0, 0]) ear();
}
translate([0, 0, axis_h]) rotate([0, 90, 0]) cylinder(d = bolt_d, h = 60, center = true, $fn = 32);
// captive nut, right ear, from the outside (vertex up: prints without support)
translate([ear_in + ear_t - nut_h, 0, axis_h]) rotate([0, 90, 0])
cylinder(d = nut_af / cos(30), h = nut_h + 1, $fn = 6);
}
}
// ---------- knob ----------
module knob() {
h = knob_floor + head_h + 0.5;
difference() {
cylinder(d = knob_d, h = h);
for (i = [0 : 7]) rotate([0, 0, i * 45]) translate([knob_d / 2 + 1.2, 0, -eps])
cylinder(r = 2.5, h = h + 2 * eps); // grip scallops
translate([0, 0, -eps]) cylinder(d = bolt_d, h = h + 2 * eps, $fn = 32);
translate([0, 0, knob_floor]) cylinder(d = head_d, h = h, $fn = 48);
translate([0, 0, h - 0.6]) cylinder(d1 = knob_d - 6, d2 = knob_d - 4.8, h = 0.6 + eps);
}
}
// ---------- dummy puck (preview only) ----------
module puck() {
color("silver") cylinder(d = puck_d, h = puck_h);
color("black") translate([0, 0, puck_h - 0.1]) cylinder(d = glass_d, h = 0.2);
}
// ---------- layout ----------
module cup_placed(t) {
translate([0, 0, axis_h]) rotate([-t, 0, 0]) rotate([90, 0, 0])
translate([0, -hinge_y, -hinge_z]) children();
}
if (part == "cup") cup();
else if (part == "base") base();
else if (part == "knob") knob();
else if (part == "print") {
cup();
translate([cup_od / 2 + foot_w / 2 + 8, 0, 0]) base();
translate([cup_od / 2 + foot_w + knob_d / 2 + 14, 0, 0]) knob();
}
else {
t = round(tilt / pitch) * pitch; // snap preview to a detent
color("dimgray") base();
cup_placed(t) {
color("orange", 0.9) cup();
translate([0, 0, floor_t + 0.1]) puck();
}
color("orange") translate([-ear_in - ear_t - (knob_floor + head_h + 0.5), 0, axis_h])
rotate([0, 90, 0]) knob();
}
File diff suppressed because it is too large. Load diff
Binary file not shown.
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+55 -4
View File
@@ -7,7 +7,11 @@ Goal: write a **new custom program** for this device.
- Before starting any task, **ask questions first** and make sure requirements are clearly understood. - Before starting any task, **ask questions first** and make sure requirements are clearly understood.
- While working, **describe what is being done** at each step. - While working, **describe what is being done** at each step.
- Keep this file updated with new findings. - Keep this file updated with new findings.
- The folder is a **git repo** (local only, no remote). Commit `9ee85bf` = original kit snapshot before any cleanup. - **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**, remote `origin` = `https://mangavalk.com/mangavalk/JC3636W518EN.git` (user's own server). Commit `9ee85bf` = original kit snapshot before any cleanup.
## Hardware summary ## Hardware summary
| Item | Detail | | Item | Detail |
@@ -78,9 +82,10 @@ Display color format is `RGB565_SWAPPED` (ST77916 byte order, set in `lv_conf.h`
|---|---| |---|---|
| `1-Instructions` | Spec PDF (duplicate), AIDA64 remote-sensor layout `aida_remote_1.85.rslcd`, MJPEG conversion tool (Windows .NET, converts video to 360×360 MJPEG 25 fps) | | `1-Instructions` | Spec PDF (duplicate), AIDA64 remote-sensor layout `aida_remote_1.85.rslcd`, MJPEG conversion tool (Windows .NET, converts video to 360×360 MJPEG 25 fps) |
| `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. | | `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) | | `tools` | `gif_to_360.py` — converts GIFs to 360×360 for the device (Pillow; scale to cover + center crop, keeps frame timing); `make_watch_dids.py` — builds `12-OBD-Speed/src/watch_dids.h` from the DID scan logs |
| `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` | | `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` | **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 | | `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) | | `3-Specification` | Spec sheet (factory firmware features, interface photo) |
| `4-Chip manual` | ESP32-S3R8 datasheet, PCM5100A datasheet | | `4-Chip manual` | ESP32-S3R8 datasheet, PCM5100A datasheet |
@@ -106,6 +111,46 @@ AliExpress "ELM327 Mini V2.1 Bluetooth OBD **Dual Mode** 5.1" — dual mode = Bl
- **Supported PIDs 01–20** (from `BE 3E A8 13`): 01 monitor status, 03 fuel system, 04 engine load, 05 coolant temp, 06/07 fuel trim B1, **0B intake manifold pressure (MAP)**, **0C RPM**, **0D speed**, 0E timing advance, 0F intake air temp, 11 throttle, 13 O2 sensors, 15 O2 sensor 2, 1C OBD standard, 1F run time, 20 → more PIDs in 21–40. **No 10 (MAF)** → speed-density engine. - **Supported PIDs 01–20** (from `BE 3E A8 13`): 01 monitor status, 03 fuel system, 04 engine load, 05 coolant temp, 06/07 fuel trim B1, **0B intake manifold pressure (MAP)**, **0C RPM**, **0D speed**, 0E timing advance, 0F intake air temp, 11 throttle, 13 O2 sensors, 15 O2 sensor 2, 1C OBD standard, 1F run time, 20 → more PIDs in 21–40. **No 10 (MAF)** → speed-density engine.
- Adapter is powered from the car's OBD port (pin 16, 12 V). - Adapter is powered from the car's OBD port (pin 16, 12 V).
## User's car
**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.
**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.
**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.
**Scan finished (2026-11-18)**: probe found no other module; **PCM has 389 DIDs** (175 ms/DID, multi-DID test timed out).
Known: F190 = VIN (keep logs private), DD01 = odometer (136 822 km), F4xx = mode 01 copies. Single readings can't tell
which DID is the set speed / limit -> **watch mode** (flashed 2026-11-18, not yet driven): 327 unknown DIDs
(`src/watch_dids.h`, generated by `tools/make_watch_dids.py`) read in rounds (~55 s, ~20 s if 3 per request works),
changes logged as `W`. Agreed test drive: ACC at **unusual set speeds** (e.g. 47 then 63, ~2 min each, user reports the
values), marks at speed signs (user remembers the order).
## 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 ## 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. - **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.
- Most GIFs in `assets/gifs` are optimized (transparent unchanged pixels, disposal 1/2); `loligod.gif` has a fully transparent background (~84 % of each frame). - Most GIFs in `assets/gifs` are optimized (transparent unchanged pixels, disposal 1/2); `loligod.gif` has a fully transparent background (~84 % of each frame).
@@ -118,6 +163,7 @@ AliExpress "ELM327 Mini V2.1 Bluetooth OBD **Dual Mode** 5.1" — dual mode = Bl
Port notes: `lib_deps = lvgl/lvgl@9.6.0` (takes priority over the vendor lvgl 8 in `lib_extra_dirs`); `lv_conf.h` generated from the 9.6 template (CLIB malloc, refresh 15 ms, GIF on, examples off); in 9.6 public headers live in `include/lvgl/` and `LV_COLOR_DEPTH` is deprecated → `LV_COLOR_FORMAT_DEFAULT` (RGB565); no LV_COLOR_16_SWAP → `lv_draw_rgb565_swap()` in the flush cb; no LV_TICK_CUSTOM → `lv_tick_set_cb(millis)`; no `monitor_cb` → display events `LV_EVENT_REFR_START/RENDER_START/REFR_READY`; images are `lv_image_dsc_t` with `LV_IMAGE_HEADER_MAGIC`. `lv_gif_set_color_format()` switches the GIF buffer format (used, see below). Port notes: `lib_deps = lvgl/lvgl@9.6.0` (takes priority over the vendor lvgl 8 in `lib_extra_dirs`); `lv_conf.h` generated from the 9.6 template (CLIB malloc, refresh 15 ms, GIF on, examples off); in 9.6 public headers live in `include/lvgl/` and `LV_COLOR_DEPTH` is deprecated → `LV_COLOR_FORMAT_DEFAULT` (RGB565); no LV_COLOR_16_SWAP → `lv_draw_rgb565_swap()` in the flush cb; no LV_TICK_CUSTOM → `lv_tick_set_cb(millis)`; no `monitor_cb` → display events `LV_EVENT_REFR_START/RENDER_START/REFR_READY`; images are `lv_image_dsc_t` with `LV_IMAGE_HEADER_MAGIC`. `lv_gif_set_color_format()` switches the GIF buffer format (used, see below).
- **LVGL 9 tuning** (display_gif_embedded, CPU at full 23.8 fps): start 86 % → GIF in display color format 66 % → render `RGB565_SWAPPED` (no swap pass) 60 % → QSPI 80 MHz 55 % → IRAM for hot LVGL code 53 %. No effect: `LV_GIF_CACHE_DECODE_DATA` (not used anywhere in 9.6), 120-row buffers. AnimatedGIF "turbo" mode can't be used: it only outputs in COOKED draw mode, LVGL uses RAW. - **LVGL 9 tuning** (display_gif_embedded, CPU at full 23.8 fps): start 86 % → GIF in display color format 66 % → render `RGB565_SWAPPED` (no swap pass) 60 % → QSPI 80 MHz 55 % → IRAM for hot LVGL code 53 %. No effect: `LV_GIF_CACHE_DECODE_DATA` (not used anywhere in 9.6), 120-row buffers. AnimatedGIF "turbo" mode can't be used: it only outputs in COOKED draw mode, LVGL uses RAW.
- **All JC3636W518 LVGL projects now use LVGL 9.6.0 + the shared library** (10-GIF-Tests/*, 12-OBD-Speed). SD drive `A:` = `LV_USE_FS_STDIO` on `/sdcard/`. - **All JC3636W518 LVGL projects now use LVGL 9.6.0 + the shared library** (10-GIF-Tests/*, 12-OBD-Speed). SD drive `A:` = `LV_USE_FS_STDIO` on `/sdcard/`.
- **1 px offset with the panel's row mirror (MY)**: at 270° one edge line (near the USB port) showed random pixels at boot, then the far edge of the image once GRAM was cleared. So the image lands one line off when MY is set. Fix **verified by the user** (2026-10-24): `setRotation()` sets a 1 px gap on the axis MY mirrors (rot 3: `setGapX(1)`, rot 2: `setGapY(1)` (assumed, not yet seen), rot 1 uses only MX: no gap). `scr_lvgl_init()` also clears GRAM to black at rotation 0 before the backlight comes on.
- 80 MHz QSPI and RGB565_SWAPPED rendering: **visually confirmed OK by the user** (colors correct, no glitches). - 80 MHz QSPI and RGB565_SWAPPED rendering: **visually confirmed OK by the user** (colors correct, no glitches).
- Display is round: corners of the 360×360 framebuffer are not visible — design UI within a 360 px circle. - Display is round: corners of the 360×360 framebuffer are not visible — design UI within a 360 px circle.
- Compiling a 13.9 MB GIF into the firmware will not fit "Huge APP" (3 MB); large media should live on SD (or in a custom partition). - Compiling a 13.9 MB GIF into the firmware will not fit "Huge APP" (3 MB); large media should live on SD (or in a custom partition).
@@ -126,7 +172,12 @@ AliExpress "ELM327 Mini V2.1 Bluetooth OBD **Dual Mode** 5.1" — dual mode = Bl
- **LittleFS** works on the `spiffs` partition of `huge_app.csv` (~900 KB); the first mount after flashing formats it (prints `Corrupted dir pair` / `mount failed (-84)` and some `task_wdt ... task not found` once — harmless). - **LittleFS** works on the `spiffs` partition of `huge_app.csv` (~900 KB); the first mount after flashing formats it (prints `Corrupted dir pair` / `mount failed (-84)` and some `task_wdt ... task not found` once — harmless).
- BLE (NimBLE) in the user's home: ~12 devices visible within 10 s. - BLE (NimBLE) in the user's home: ~12 devices visible within 10 s.
- 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. - 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). - 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. - 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. - `Preferences` prints `nvs_open failed: NOT_FOUND` the first time a namespace is read before it was written — harmless.
+23 -3
View File
@@ -283,27 +283,37 @@ void setRotation(uint8_t rot)
if (lcd == NULL) if (lcd == NULL)
return; return;
// The panel's row mirror (MY) is one line off, so the image needs a 1 px shift along the axis
// MY mirrors: logical Y without swap, logical X with swap.
switch (rot) switch (rot)
{ {
case 1: // 90° clockwise case 1: // 90° clockwise
lcd->swapXY(true); lcd->swapXY(true);
lcd->mirrorX(true); lcd->mirrorX(true);
lcd->mirrorY(false); lcd->mirrorY(false);
lcd->setGapX(0);
lcd->setGapY(0);
break; break;
case 2: // 180° case 2: // 180°
lcd->swapXY(false); lcd->swapXY(false);
lcd->mirrorX(true); lcd->mirrorX(true);
lcd->mirrorY(true); lcd->mirrorY(true);
lcd->setGapX(0);
lcd->setGapY(1);
break; break;
case 3: // 270° clockwise case 3: // 270° clockwise
lcd->swapXY(true); lcd->swapXY(true);
lcd->mirrorX(false); lcd->mirrorX(false);
lcd->mirrorY(true); lcd->mirrorY(true);
lcd->setGapX(1);
lcd->setGapY(0);
break; break;
default: default:
lcd->swapXY(false); lcd->swapXY(false);
lcd->mirrorX(false); lcd->mirrorX(false);
lcd->mirrorY(false); lcd->mirrorY(false);
lcd->setGapX(0);
lcd->setGapY(0);
break; break;
} }
rotation = rot; rotation = rot;
@@ -435,12 +445,22 @@ lv_display_t *scr_lvgl_init()
lcd->invertColor(true); lcd->invertColor(true);
lcd->displayOn(); lcd->displayOn();
screen_switch(true);
backlight->setBrightness(100);
size_t buf_bytes = JC_DRAW_BUF_ROWS * SCREEN_RES_HOR * 2; // RGB565 size_t buf_bytes = JC_DRAW_BUF_ROWS * SCREEN_RES_HOR * 2; // RGB565
disp_draw_buf = (uint8_t *)heap_caps_malloc(buf_bytes, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT); disp_draw_buf = (uint8_t *)heap_caps_malloc(buf_bytes, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
disp_draw_buf2 = (uint8_t *)heap_caps_malloc(buf_bytes, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT); disp_draw_buf2 = (uint8_t *)heap_caps_malloc(buf_bytes, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
// Clear the panel's whole GRAM (random after power-on) while still unrotated. In a mirrored
// rotation one physical line at the edge is never written by LVGL and would keep its garbage.
memset(disp_draw_buf, 0, buf_bytes);
for (int y = 0; y < SCREEN_RES_VER; y += JC_DRAW_BUF_ROWS)
{
int h = min(JC_DRAW_BUF_ROWS, SCREEN_RES_VER - y);
lcd->drawBitmapWaitUntilFinish(0, y, SCREEN_RES_HOR, h, disp_draw_buf, 100);
}
screen_switch(true);
backlight->setBrightness(100);
lv_init(); lv_init();
lv_tick_set_cb(lv_tick_millis); lv_tick_set_cb(lv_tick_millis);
+13 -5
View File
@@ -2,10 +2,11 @@
Each frame is scaled so the GIF covers 360x360, then center-cropped. Frame durations and looping are kept. Each frame is scaled so the GIF covers 360x360, then center-cropped. Frame durations and looping are kept.
Pillow stores only the changed part of each frame, which keeps files small. Pillow stores only the changed part of each frame, which keeps files small.
If the result is too large, the GIF is redone with sharp (nearest-neighbour) scaling, which is often much smaller.
Usage: Usage:
pip install pillow pip install pillow
python gif_to_360.py <input.gif or folder> [more ...] -o <output folder> python gif_to_360.py <input.gif or folder> [more ...] -o <output folder> [--crop-x 0..1]
The device stores one background GIF in an 11.5 MB flash area: bigger results are reported as too large. The device stores one background GIF in an 11.5 MB flash area: bigger results are reported as too large.
""" """
@@ -19,19 +20,19 @@ SIZE = 360
MAX_BYTES = 11_500_000 MAX_BYTES = 11_500_000
def convert(src, dst): def convert(src, dst, crop_x=0.5, resample=Image.LANCZOS):
im = Image.open(src) im = Image.open(src)
w, h = im.size w, h = im.size
scale = max(SIZE / w, SIZE / h) scale = max(SIZE / w, SIZE / h)
nw, nh = max(SIZE, round(w * scale)), max(SIZE, round(h * scale)) nw, nh = max(SIZE, round(w * scale)), max(SIZE, round(h * scale))
left, top = (nw - SIZE) // 2, (nh - SIZE) // 2 left, top = round((nw - SIZE) * crop_x), (nh - SIZE) // 2
frames, durations = [], [] frames, durations = [], []
for frame in ImageSequence.Iterator(im): for frame in ImageSequence.Iterator(im):
durations.append(frame.info.get("duration", im.info.get("duration", 100)) or 100) durations.append(frame.info.get("duration", im.info.get("duration", 100)) or 100)
rgba = frame.convert("RGBA") # fully composited frame rgba = frame.convert("RGBA") # fully composited frame
if (nw, nh) != (w, h): if (nw, nh) != (w, h):
rgba = rgba.resize((nw, nh), Image.LANCZOS) rgba = rgba.resize((nw, nh), resample)
rgba = rgba.crop((left, top, left + SIZE, top + SIZE)) rgba = rgba.crop((left, top, left + SIZE, top + SIZE))
# the device shows the GIF on black: flatten transparency onto black # the device shows the GIF on black: flatten transparency onto black
bg = Image.new("RGBA", rgba.size, (0, 0, 0, 255)) bg = Image.new("RGBA", rgba.size, (0, 0, 0, 255))
@@ -41,6 +42,11 @@ def convert(src, dst):
frames[0].save(dst, save_all=True, append_images=frames[1:], duration=durations, frames[0].save(dst, save_all=True, append_images=frames[1:], duration=durations,
loop=im.info.get("loop", 0), optimize=True, disposal=1) loop=im.info.get("loop", 0), optimize=True, disposal=1)
size = os.path.getsize(dst) size = os.path.getsize(dst)
if size > MAX_BYTES and resample != Image.NEAREST and (nw, nh) != (w, h):
# smooth scaling blends pixels, so frames change everywhere and the per-frame palettes get
# dithered: the GIF's delta compression stops working. Sharp scaling keeps it small.
print(f"{os.path.basename(src)}: {size / 1e6:.2f} MB with smooth scaling, retrying with sharp scaling")
return convert(src, dst, crop_x, Image.NEAREST)
fps = len(durations) * 1000 / max(1, sum(durations)) fps = len(durations) * 1000 / max(1, sum(durations))
note = "" if size <= MAX_BYTES else " ** TOO LARGE for the device (max 11.5 MB) **" note = "" if size <= MAX_BYTES else " ** TOO LARGE for the device (max 11.5 MB) **"
print(f"{os.path.basename(src)}: {w}x{h}, {len(frames)} frames, {fps:.1f} fps " print(f"{os.path.basename(src)}: {w}x{h}, {len(frames)} frames, {fps:.1f} fps "
@@ -51,6 +57,8 @@ def main():
ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
ap.add_argument("inputs", nargs="+", help="GIF files or folders") ap.add_argument("inputs", nargs="+", help="GIF files or folders")
ap.add_argument("-o", "--out", required=True, help="output folder") ap.add_argument("-o", "--out", required=True, help="output folder")
ap.add_argument("--crop-x", type=float, default=0.5,
help="horizontal crop position for wide GIFs: 0 = left, 0.5 = center (default), 1 = right")
args = ap.parse_args() args = ap.parse_args()
os.makedirs(args.out, exist_ok=True) os.makedirs(args.out, exist_ok=True)
@@ -64,7 +72,7 @@ def main():
sys.exit("no GIF files found") sys.exit("no GIF files found")
for f in files: for f in files:
name = os.path.splitext(os.path.basename(f))[0] name = os.path.splitext(os.path.basename(f))[0]
convert(f, os.path.join(args.out, name + ".gif")) convert(f, os.path.join(args.out, name + ".gif"), min(1.0, max(0.0, args.crop_x)))
if __name__ == "__main__": if __name__ == "__main__":
+42
View File
@@ -0,0 +1,42 @@
"""Builds 12-OBD-Speed/src/watch_dids.h from the DID scan logs: every DID the PCM supports, with its reply
length, minus the ones whose meaning is known or that are useless for finding the cruise set speed / speed limit.
python tools/make_watch_dids.py 12-OBD-Speed/docs/canlog 12-OBD-Speed/src/watch_dids.h
"""
import glob
import os
import re
import sys
src, out = sys.argv[1], sys.argv[2]
dids = {}
for path in glob.glob(os.path.join(src, "**", "*.txt"), recursive=True):
for line in open(path, encoding="utf-8", errors="replace"):
m = re.match(r"^\d+ S 7E0 ([0-9A-F]{4}) ([0-9A-F]+)\s*$", line)
if m:
dids[int(m.group(1), 16)] = len(m.group(2)) // 2
def skip(did, length):
if 0xF100 <= did <= 0xF1FF: # identification (part numbers, VIN)
return True
if 0xF400 <= did <= 0xF4FF: # copies of the standard mode 01 PIDs
return True
if 0xDE00 <= did <= 0xDEFF: # large tables
return True
if did in (0xD01A, 0xDD00, 0xDD01): # text, clock, odometer
return True
return length > 8
keep = sorted((d, l) for d, l in dids.items() if not skip(d, l))
with open(out, "w", newline="\n") as f:
f.write("// Generated by tools/make_watch_dids.py from the DID scan logs (docs/canlog) - do not edit.\n")
f.write(f"// PCM (0x7E0) DIDs with unknown meaning that are watched for changes: {len(keep)} of {len(dids)} supported.\n")
f.write("#pragma once\n#include <stdint.h>\n\n")
f.write("struct WatchDid\n{\n uint16_t did;\n uint8_t len; // reply data bytes (from the scan)\n};\n\n")
f.write("static const WatchDid WATCH_DIDS[] = {\n")
for i in range(0, len(keep), 6):
f.write(" " + " ".join(f"{{0x{d:04X}, {l}}}," for d, l in keep[i:i + 6]) + "\n")
f.write("};\nstatic const uint16_t WATCH_COUNT = sizeof(WATCH_DIDS) / sizeof(WATCH_DIDS[0]);\n")
print(f"{len(keep)} of {len(dids)} DIDs -> {out}")