Skip to content

Always stamp today's date into the dash service record on reset - #2

Open
slava-fm wants to merge 3 commits into
ios-codesign-teamfrom
force-service-date
Open

slava-fm wants to merge 3 commits into
ios-codesign-teamfrom
force-service-date

Conversation

@slava-fm

Copy link
Copy Markdown
Owner

What & why

You observed that after resetting, the dash kept showing the previous service date (e.g. 2026-06-05) even when the reset clearly ran. Root cause: the validated 31 09 routine only re-writes the date record (0x91) when a service is actually due — on a not-yet-due bike it acks but leaves the date alone.

This change makes the reset always stamp today's date.

How

After the 31 09 routine completes, write today's date to dash record 0x91:

  • KWP WriteDataByLocalIdentifier: 3B 91 00 YY MM DD (BCD), e.g. 3B 91 00 26 06 12 for 2026-06-12.
  • Format confirmed from two real read-backs: 00 25 08 08 (2025-08-08) → 00 26 06 05 (2026-06-05).
  • Dashboard ECU (7E3) only — skipped for custom profiles on other headers.
  • Self-verifying: reads 0x91 back and only reports ✅ success when the read-back equals the date we wrote. If the dash rejects the write (no 7B 91), it says so honestly and changes nothing about the routine's own result.

Shared engine change, so it applies to the macOS app, the iOS app, and the motodiag CLI. Dry-run path is unaffected (returns before any write).

⚠️ Not yet validated on a real bike

The 3B 91 date write has never been sent to an actual dash before. It's built to fail safe (verify-by-read-back, honest messaging), but it needs one on-bike test. If the dash returns 7F 3B .., the log will show the NRC so we can adjust (e.g. add an extended session 10 03 or SecurityAccess).

🤖 Generated with Claude Code

V-twin Fanatics and others added 3 commits June 12, 2026 10:32
The 31 09 routine only re-writes the service date (record 0x91) when a
service is actually due, so on a not-yet-due bike the dash keeps showing
the previous reset date. After the routine, explicitly write today's date
to record 0x91 via KWP WriteDataByLocalIdentifier (3B 91 00 YY MM DD, BCD)
on the dashboard ECU (7E3), then read 0x91 back and only report success
when the read-back shows the new date. Skipped for custom profiles on
non-dash headers.

Note: the 3B 91 date write is newly added and not yet validated on a real
bike; it self-verifies and reports honestly if the dash rejects it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The committed icon-1024.png was a solid black square — the opaque
NSImage/lockFocus path in tools/make-icon.swift renders black in a
headless context, so the iOS icon shipped blank. Regenerate the V-twin
artwork via a direct CoreGraphics bitmap renderer (tools/make-ios-icon.swift),
which is reliable headless, and replace the icon. macOS iconset is
unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The dash answers a raw 3B 91 date write with NRC 0x33 (securityAccessDenied),
so the write needs a KWP SecurityAccess unlock first. On NRC 0x33, perform
27 01 (seed) → 27 02 (key) using the Melco "Voilou" seed→key mapping, then
retry the write. Falls back to 10 03 (extended session) if 27 01 isn't
accepted in the default session.

The seed→key lookup table is a private vendor asset: it is loaded at runtime
from a bundled asset-catalog data set ("MelcoKeys") that is gitignored and
present only in local/private builds. Public and macOS builds without it
simply skip the secured write and do the routine-only reset. Failure message
now names the NRC (and security specifically).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant