Skip to content

fix(meshcore): decode room server status layout#267

Merged
Avi0n merged 1 commit into
Avi0n:devfrom
robekl:fix/room-server-status-parsing
Mar 26, 2026
Merged

fix(meshcore): decode room server status layout#267
Avi0n merged 1 commit into
Avi0n:devfrom
robekl:fix/room-server-status-parsing

Conversation

@robekl
Copy link
Copy Markdown
Contributor

@robekl robekl commented Mar 25, 2026

Bug

Room-server status responses use a different 52-byte tail layout than repeater status responses in firmware 1.14.1. The app was decoding every raw status response as repeater-shaped data, so room-server post counters were interpreted as repeater airtime metrics. Raw public-key room status requests also had no safe way to express that distinction at the API boundary.

Strategy

Make the layout distinction explicit in the status model and internal parser, then make the public API explicit enough that room-aware callers cannot silently fall back to repeater decoding. Raw public-key requests remain repeater-only, while room-aware requests must flow through a typed contact or node-type path.

Implementation

  • add explicit status layout handling for repeater vs room-server payloads
  • decode the room-server tail fields as n_posted and n_post_push
  • thread the expected layout through the internal binary status request path
  • add typed public status request entry points for MeshContact and ContactType
  • update MC1Services remote-session callers to use typed room/repeater requests
  • update docs/examples to steer room-server callers away from the ambiguous raw-key path
  • add parser and session regression tests covering room-server status decoding

Verification

  • swift test --filter MeshCoreSessionCommandCorrelationTests --filter ProtocolBugFixTests in MeshCore
  • swift test in MC1Services

@Avi0n
Copy link
Copy Markdown
Owner

Avi0n commented Mar 26, 2026

Thanks!

@Avi0n Avi0n merged commit ae84423 into Avi0n:dev Mar 26, 2026
2 checks passed
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.

2 participants