Files
HaloKeymind/examples
Claude 4aedbc8059 MQTT: tag radio2 (MediaMesh) packets, status and neighbors
Observers already publish radio2 packets, but nothing says they came over
radio2, so analyzers can't tell MediaMesh traffic or MediaMesh repeaters
apart. Add optional keys, all absent on the main radio, so existing
consumers see byte-identical messages:

- packets and raw: "rx_radio_id"/"tx_radio_id": "radio2" and
  "mediamesh": true, from the packet's own radio_profile (captured on
  receive, kept by outbound copies), not the radio's profile at publish
  time. rx_radio_id is CoreScope's multi-radio key (#1869).
- status: "radios": [{id: "radio2", radio, mode, mediamesh, temporary}]
  while radio2 is on with the MeshCore protocol; "radio" stays the main
  radio.
- neighbors (repeater and room server): the refresh's DISCOVER_REQ sets
  the radio2 flag (0x02, docs/radio_profiles.md); each neighbour's trailer
  is kept and published as "radio2" {mode, radio, temporary}, with
  "self.radio2" for this node. No trailer leaves the key out (unknown,
  never off).

Radio2DiscoverTrailer parses the trailer (host-tested). publishRaw now
takes the direction. MQTT_IMPLEMENTATION.md documents the keys.

Tests: new payload-builder cases (golden prefix, rx/tx/raw tags, status
radios, neighbors radio2, measurements), trailer parsing, and the
neighbor lifecycle fixture now checks radio2 end to end for both roles.
Harnesses updated for the new field and the publishRaw signature.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011i5tJJtj95MB4oUgncCUe5
2026-10-29 02:09:41 -07:00
..