Skip to content

[codex] Add exact MC0 MeshCore DM routing#66

Draft
n30nex wants to merge 1 commit into
ItsLimitlezz:mainfrom
n30nex:codex/mc0-exact-dm-address
Draft

[codex] Add exact MC0 MeshCore DM routing#66
n30nex wants to merge 1 commit into
ItsLimitlezz:mainfrom
n30nex:codex/mc0-exact-dm-address

Conversation

@n30nex

@n30nex n30nex commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Makes formal MeshCore MC0 addresses full lowercase 64-hex public keys, with short_id kept as display-only metadata.
  • Routes MC0 and on-device MeshCore DMs through a new exact-public-key backend contract instead of resolving a target and then falling back to backend name substring matching.
  • Adds key-aware DM readiness (ready, no_key, not_messageable), to_addr/to_name mismatch rejection, and a bounded V0 MC0 NODES response.
  • Extends simulator coverage for exact to_addr sends, unambiguous name fallback, duplicate names, missing keys, and mismatched address/name targets.
  • Updates the MC0 USB smoke helper to probe IDENTITY and assert addr_format=meshcore-pubkey-hex.
  • Fixes scripts/tdeck_smoke.py no-stub esptool argument spellings for the installed esptool version.

Why

MC0 previously accepted to_addr, but the resolved node still collapsed back to a display-name send path in the SX1262 backend. That could misroute DMs when names collide or when one name is a substring of another. MeshCore companion clients need stable public-key identity before the USB/BLE bridge can be treated as a real compatibility surface.

Local validation

  • git diff --check
  • python -m py_compile scripts\mc_companion_usb_smoke.py scripts\tdeck_smoke.py scripts\fetch_tdeck_artifact.py
  • pio run -e native
  • .pio\build\native\program.exe --selftest
  • .pio\build\native\program.exe --simtest

A local pio run -e tdeck-meshcore sanity compile was attempted before the smoke-script fix but hit the 5-minute tool timeout without useful output. The authoritative firmware binary below came from GitHub Actions.

GitHub Actions artifact

  • Workflow run: https://github.com/n30nex/LimitlezzOS/actions/runs/27878289585
  • Artifact: tdeck-meshcore-firmware-58755eb715f639ccc2a799d6ea380b3eb667d960
  • Manifest: sha=58755eb715f639ccc2a799d6ea380b3eb667d960, env=tdeck-meshcore, meshcore_enabled=1, budget_status=pass
  • Size: firmware_bytes=1579984, firmware_slot_pct=30.14, static_ram_bytes=230196

COM8 hardware validation

COM8 only; COM11 and COM29 were present and not targeted.

  • Flashed exact artifact with scripts\tdeck_smoke.py --port COM8 --env tdeck-meshcore --no-stub-upload --skip-build --artifact-dir .pio\ci-artifacts\tdeck-mc0-exact-dm-58755eb ...
  • Flash target: ESP32-S3 rev v0.2, MAC cc:8d:a2:0d:14:28; bootloader, partitions, boot_app0, and firmware hashes verified by esptool.
  • Serial smoke passed: id, sys, companion mc hello, companion mc status, companion mc test.
  • Observed MeshCore address: c86a84a412fb64d5adce8114a6b3c0aec881baa0a742a76f9e85c30bc1ad5460; short_id=MC-c86a84a4; MeshCore MC0 protocol selftest: PASS.
  • Formal MC0 USB smoke passed: HELLO, IDENTITY, STATUS, NODES, EXIT; IDENTITY reported addr_format=meshcore-pubkey-hex and the same 64-hex pubkey.
  • Split-airtime smoke passed on the same artifact, then device state was restored to Meshtastic on, MeshCore on with Balanced airtime.

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