drv/frame: add mari-compatible header for bare-radio apps#21
Merged
Conversation
AI-assisted: Claude Opus 4.7
This was referenced May 28, 2026
AI-assisted: Claude Opus 4.7
AI-assisted: Claude Opus 4.7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
drv/frame.h— a 21-byte wire-header struct that's a byte-for-bytemirror of Mari's
mr_packet_header_t, plus the constants bare-radio DotBotapps need to populate it:
version = 3,type = DATA,next_proto = DOTBOT_APP,network_id = 0xD0B0, BLE access address0xDB12DB12.The intent: once bare-radio apps adopt this header, a bare-radio gateway
can wrap received frames as
MARI_EDGE_DATAUART events and PyDotBot'sMarilibEdge adapter (which now dispatches by
next_proto) handles themwith no special case. One frame vocabulary on the host whether the bytes
came from Mari TSCH or from a bare-radio app. Coexistence on air is
handled by the distinct access address — Mari's
0x12345678vs bare's0xDB12DB12— so the two stacks ignore each other at the radio peripheralfilter, not in software.
Worth a second look:
type = 16↔MARI_PACKET_DATA,next_proto = 0x11↔MARI_NEXT_PROTO_DOTBOT_APP,version = 3↔MARI_PROTOCOL_VERSION. A_Static_assert(sizeof == 21)catches layout drift loudly.typeandnext_protoare stored asuint8_t, not the Mari enumtypes, so the layout doesn't depend on
-fshort-enumsABI choices.network_id = 0xD0B0needs to be reserved on the Crystalfree Marinetwork-ID registry before any real deployment uses it.
No consumer in this repo yet — DotBot-firmware bare-radio apps will
migrate from
drv/tdma_clientto this header in a follow-up PR. Build isunchanged on every existing target; clang-format clean.