Skip to content

Define LSF TYPE and META once for both modes; allow META in Packet Mode - #180

Open
jancona wants to merge 1 commit into
M17-Project:mainfrom
jancona:packet-mode-lsf-meta
Open

jancona wants to merge 1 commit into
M17-Project:mainfrom
jancona:packet-mode-lsf-meta

Conversation

@jancona

@jancona jancona commented Nov 8, 2026

Copy link
Copy Markdown

Summary

The Packet Mode LSF TYPE currently defines only the Packet/Stream bit and the CAN, and marks everything else Reserved. When no encryption is used, Stream Mode reuses the Encryption Subtype bits as the META type. Existing implementations already send META in Packet Mode and set those bits the same way. This PR changes the spec to match, and puts the shared definitions in one place.

Changes

  • LSF › TYPE (common): a single TYPE layout table for both modes, with the Data Type, Encryption Type and key-length tables (captions mark which are Stream Mode only). The Encryption Subtype is defined explicitly: if Encryption Type is None it is the META type in either mode, otherwise it is the key length. A new table summarizes how each TYPE field is used in each mode. Reserved bits shall be zero when transmitted and ignored on receipt. The Channel Access Number section moves here because it applies to both modes.
  • LSF › META (common): the META Types table and the Text Data, GNSS Data and Extended Callsign Data formats move here from Stream Mode › Null Encryption. Two Packet Mode notes are added:
    • Text Data is limited to a single 13-byte block (Control Byte 0x11).
    • Extended Callsign Data inserted by a repeater or gateway replaces the sender's only META field.
  • Stream Mode: the TYPE section now points to the common definition and keeps the Voice TYPE table. Null Encryption keeps only the Stream-specific parts (LICH round robin, 240 ms update rate, sending GNSS promptly).
  • Packet Mode: the "all reserved" layout is replaced by a definition table: Encryption Type = None, Encryption Subtype = META type, Data Type and Signed Stream reserved.

Compatibility

No bits change meaning for existing Stream Mode transmissions. The reference packet encoder (M17_Implementations/SP5WWP/m17-packet/m17-packet-encode.c) sets TYPE to M17_TYPE_PACKET | M17_TYPE_CAN(can) and zeroes META. Under this change that is META type Text Data with Control Byte 0x00, which already means "no text", so its output stays valid.

Notes for reviewers

  • I couldn't build this locally; please check the PDF produced by CI.
  • No version history entry yet. I'll add one once the content is agreed.

🤖 Generated with Claude Code

Move the TYPE field layout and field tables, the Channel Access Number,
and the META type definitions (Text, GNSS, Extended Callsign Data) into
the common LSF section. Add a table summarizing TYPE field usage per
mode, and replace the Packet Mode TYPE layout with a definition table
in which Encryption Type is None and Encryption Subtype selects the
META type, ratifying current practice of sending META in Packet Mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sp5wwp

sp5wwp commented Nov 8, 2026

Copy link
Copy Markdown
Member

Not bad :-) Would that make the Spec 2.1.0?

This branch has not been deployed

No deployments
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