ULCP: Tethered Host Services
A device is most useful to a phone when it can keep working while the phone is asleep or out of range. The services in this chapter are what that means concretely: the device learns which traffic is relevant to its host, holds that traffic while the host is away, and—for peers the host has explicitly provisioned—acknowledges it so that senders’ retransmission logic is satisfied.
Everything here is assistance, tightly scoped. The host still owns the UMSH MAC and its own private keys; the device is helping its host, not impersonating it in the general case.
The Tethered Host Identity
The tethered host identity is the single UMSH identity owned by the attached host. Of the identity keypair itself, the device holds only the 32-byte public key; the host’s private key MUST NOT be transferred to the device, and this protocol provides no mechanism for doing so (see Security Boundary). The device may additionally hold host-domain state derived or delegated by the host— group keys, per-peer symmetric keys, filters, and queued traffic—as defined in this chapter.
Because the device never holds the host’s private key, it cannot perform
ECDH on the host’s behalf. All pairwise key material the device uses for
the host identity is derived by the host and explicitly provisioned per
peer (see PROP_HOST_PEER_KEYS).
ULCP supports exactly one tethered host identity at a time. Everything provisioned for it forms the host domain, which is volatile across a power cycle and wiped wholesale when a different host identity takes over the device.
Host Replacement
The host domain is keyed by PROP_HOST_KEY. Setting PROP_HOST_KEY to a
value different from its current value—including setting it to empty
—MUST atomically reset the entire host domain to defaults: the key
tables, filter table, and mute tables are cleared, PROP_HOST_AUTO_ACK
reverts to false, and the inbound queue is discarded. Because the host
domain is never persisted, this is a live-state operation with no durable component:
a power cycle cannot resurrect a previous host’s provisioning regardless.
Setting PROP_HOST_KEY to its current value is idempotent and has no side
effects.
This rule is what makes re-pairing safe: when a companion radio is paired with a different phone, the new host configures its own identity and the previous host’s keys, filters, and queued traffic cease to exist—while the device domain (the radio’s own identity, groups, and settings) is untouched.
Capabilities
| Code | Name | Requires | Grants |
|---|---|---|---|
| 32 | CAP_HOST_FILTER | — | PROP_HOST_KEY, PROP_MAC_PROMISCUOUS, PROP_HOST_RX_FILTERS, and the receive-filtering behavior |
| 33 | CAP_HOST_RX_QUEUE | CAP_HOST_FILTER | The inbound queue, its properties, CMD_QUEUE_DRAIN, the buffered-frame metadata, and the mute tables |
| 34 | CAP_HOST_KEYS | CAP_HOST_FILTER | PROP_HOST_GROUP_KEYS and PROP_HOST_PEER_KEYS |
| 35 | CAP_HOST_AUTO_ACK | CAP_HOST_KEYS, CAP_HOST_RX_QUEUE | PROP_HOST_AUTO_ACK and acknowledgment delegation |
| 48 | CAP_MAC_BACKHAUL | CAP_DEV_IDENTITY | PROP_MAC_BACKHAUL and the point-to-point link to the device’s node |
A device advertising none of these is a transparent radio: it delivers every frame it receives and holds nothing on anyone’s behalf.
A device that cannot sound a receipt cue MUST NOT
advertise CAP_HOST_RX_QUEUE, CAP_HOST_KEYS, or CAP_HOST_AUTO_ACK.
Custody is only worth taking when the operator can learn that something is
waiting; such a device remains a filtering radio under CAP_HOST_FILTER.
Commands
| Id | Mnemonic | Dir | Description |
|---|---|---|---|
| 11 | CMD_QUEUE_DRAIN | Host->Device | Deliver queued inbound frames |
CMD 11: (Host -> Device) CMD_QUEUE_DRAIN
0 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1 0| RES | TID |CMD_QUEUE_DRAIN|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure: Structure of CMD_QUEUE_DRAIN
Deliver queued inbound frames. Commands the device to deliver every frame
currently held in the inbound queue (see Inbound Queueing), oldest
first, as ordinary CMD_STR_RECV commands on STR_PHY_RAW carrying the
buffered-frame metadata described in Buffered-Frame Metadata. The command
payload SHOULD be empty and MUST be ignored.
Queued frames are only delivered in response to this command; attaching to the device does not by itself cause queued frames to be delivered (see Inbound Queueing). This lets the host finish synchronizing its session and signal that it is actually ready to process backlogged traffic.
The drain covers exactly the frames held in the queue when the command is
received. Because accepted frames are always delivered live while a host
is attached, the queue cannot grow while a drain is in progress: the drain
always covers a fixed set of frames and always terminates. If the command
was sent with a non-zero TID, the device reports completion by emitting
CMD_PROP_IS for PROP_LAST_STATUS with STATUS_OK and the matching TID
immediately after delivering the last covered frame. Draining an empty
queue succeeds immediately.
Frames that arrive while a drain is in progress are not part of it: they
are delivered live, and MAY therefore interleave with the buffered
deliveries. RX_FLAG_BUFFERED distinguishes the two, and UMSH does not
guarantee in-order delivery in any case (see Inbound Queueing).
If the device does not implement queueing (CAP_HOST_RX_QUEUE not
advertised), the command fails with STATUS_UNIMPLEMENTED.
If an error occurs, the value of the emitted PROP_LAST_STATUS will be set
accordingly to the status code for the error.
Properties
The host domain occupies property identifiers 96–111. Two properties sit
outside that range: PROP_MAC_PROMISCUOUS and PROP_MAC_BACKHAUL govern
how the attached session sees the radio rather than how the device is
provisioned, and are the protocol’s session-scoped properties.
| Id | Mnemonic | Commands | Description |
|---|---|---|---|
| 48 | PROP_MAC_PROMISCUOUS | Get, Set | Deliver all frames (session-scoped) |
| 50 | PROP_MAC_BACKHAUL | Get, Set | Point-to-point link to the device’s node (session-scoped) |
| 96 | PROP_HOST_KEY | Get, Set | Tethered host identity public key |
| 97 | PROP_HOST_GROUP_KEYS | Get, Set, Insert, Remove | Host group keys |
| 98 | PROP_HOST_PEER_KEYS | Get, Set, Insert, Remove | Host pairwise peer keys |
| 99 | PROP_HOST_RX_FILTERS | Get, Set, Insert, Remove | Host receive filter table |
| 100 | PROP_HOST_AUTO_ACK | Get, Set | Acknowledgment delegation enable |
| 101 | PROP_HOST_RX_QUEUE_COUNT | Get | Frames currently queued |
| 102 | PROP_HOST_RX_QUEUE_CAPACITY | Get, Set | Queue capacity in frames |
| 103 | PROP_HOST_RX_QUEUE_DROPPED | Get | Frames dropped from the queue |
| 104 | PROP_HOST_MUTED_GROUPS | Get, Set, Insert, Remove | Groups whose queued frames raise no cue |
| 105 | PROP_HOST_MUTED_PEERS | Get, Set, Insert, Remove | Peers whose queued frames raise no cue |
PROP 48: PROP_MAC_PROMISCUOUS
- Type: Single-Value, Read-Write, Session-Scoped
- Asynchronous Updates: No
- Required:
CAP_HOST_FILTER - Value Type: BOOL
- Post-Attach Value: 0 (false)
When true, every frame the PHY successfully receives is delivered to the
host over STR_PHY_RAW, bypassing receive filtering. This is a live-session
diagnostic mode: frames that are delivered only because of promiscuous
mode are never queued while the host is detached, and never acknowledged on
the host’s behalf.
Session-scoped: it reverts to false on every attach.
PROP 50: PROP_MAC_BACKHAUL
- Type: Single-Value, Read-Write, Session-Scoped
- Asynchronous Updates: No
- Required:
CAP_MAC_BACKHAUL - Value Type: BOOL
- Post-Attach Value: 0 (false)
When false, the host and the device’s own node are two listeners on one shared medium. Both transmit through the same radio and both hear what it receives, so a frame from one reaches the other only by way of some third node that repeats it.
When true, the host is instead a point-to-point neighbor of the device’s node:
- A frame the host sends on
STR_PHY_RAWis delivered to the node as though the node had heard it, and is never transmitted directly. It spends no airtime and is not subject to the duty-cycle limit. - Frames the node transmits are delivered to the host with
RX_FLAG_SELF_TXset, subject to the usual receive filtering. - Frames the radio receives are not delivered to the host at all. The node is the only thing listening to the medium.
Traffic between the host and the mesh therefore crosses the device’s repeater, which is what makes the arrangement useful to an internet bridge: hop accounting, duplicate suppression, and forwarding policy are the node’s, applied to the host’s traffic as to anyone else’s. A device whose repeater is disabled still delivers the host’s frames to its own identities, but carries nothing onward.
PROP_MAC_PROMISCUOUS composes with this: it removes receive filtering
from what the host is delivered, which in this mode is the node’s
transmissions.
Session-scoped: it reverts to false on every attach.
PROP 96: PROP_HOST_KEY
- Type: Single-Value, Read-Write
- Asynchronous Updates: No
- Required:
CAP_HOST_FILTER - Value Type: 32 octets, or empty
- Post-Reset Value: Empty
The Ed25519 public key of the tethered host identity. Setting this property tells the device which node identity it is assisting; an empty value means no host identity is configured.
Setting this property to a value different from its current value resets the entire host domain, as specified in Host Replacement. Setting it to its current value is idempotent.
Like the rest of the host domain, this property is never saved: it is empty at every power-on, whatever the radio was doing before.
A configured host key acts as an implicit destination-hint receive filter (see Receive Filtering).
PROP 97: PROP_HOST_GROUP_KEYS
- Type: Multiple-Value, Read-Write
- Has Item Length Prefix: No
- Asynchronous Updates: No
- Required:
CAP_HOST_KEYS - Item Form: 32 octets (the group key)
- Reported Form: 16 octets (the derived short group ID)
- Remove Selector: the 32-octet group key
- Post-Reset Value: Empty
The set of group keys provisioned
for the host identity. For each key the device derives the
short group ID and
the group’s K_enc/K_mic. Each entry is reported as its 16-octet
short group ID, which is the width at which two groups can be told
apart; the key itself is never read back.
The short group ID’s leading 2 octets are the group hint the GROUP field
carries, and they act as an implicit group receive filter
(see Receive Filtering). Host group keys serve two assistance
purposes:
- recognizing multicast traffic in the host’s groups while the host is detached, so it can be queued; and
- recognizing group unicast traffic addressed to the host identity, which requires the group key to decrypt the concealed destination/source addresses (see Group Unicast Processing) and to form the combined group unicast payload keys used for authentication and acknowledgment.
Group keys are group-membership credentials, not host private keys, so provisioning them is consistent with the security boundary. They still grant whoever holds the device the ability to read and send traffic in those groups; see Provisioning Security.
PROP 98: PROP_HOST_PEER_KEYS
- Type: Multiple-Value, Read-Write
- Has Item Length Prefix: No
- Asynchronous Updates: No
- Required:
CAP_HOST_KEYS - Item Form: Structure, 96 octets
- Reported Form: 32 octets (the peer’s public key)
- Remove Selector: the 32-octet peer public key
- Post-Reset Value: Empty
Pairwise symmetric key material provisioned for specific already-known peers of the host identity. The item form is:
+---------------------+-----------+-----------+
| PEER_PUBLIC_KEY | K_ENC | K_MIC |
+---------------------+-----------+-----------+
32 B 32 B 32 B
Figure: Peer key entry item form
Where PEER_PUBLIC_KEY is the peer’s Ed25519 public key and K_ENC and
K_MIC are the stable pairwise keys for the (host, peer) pair, derived by
the host as described in
HKDF Inputs for Unicast. The device
never derives these itself—it cannot, because it does not hold the host’s
private key.
As an exception to the usual CMD_PROP_INSERT duplicate rule, inserting an
entry whose PEER_PUBLIC_KEY matches an existing entry replaces that
entry. Replacement updates only the stored key material: the peer’s replay
baseline (see Acknowledgment Delegation) and any frames already queued from that
peer are unaffected, since both are keyed by the peer’s identity rather
than by the key values. An entry is reported as its peer public key
alone: K_ENC and K_MIC are never read back.
Provisioned peer keys let the device authenticate inbound unicast and group unicast from those specific peers and acknowledge it on the host’s behalf (see Acknowledgment Delegation). They grant no capability regarding any other peer, and do not allow the device to establish new pairwise relationships.
PROP 99: PROP_HOST_RX_FILTERS
- Type: Multiple-Value, Read-Write
- Has Item Length Prefix: Yes
- Asynchronous Updates: No
- Required:
CAP_HOST_FILTER - Item Form: Structure
- Remove Selector: the full item
- Post-Reset Value: Empty
The explicit receive filter table. Each item is a filter entry:
+-------------+----------------------+
| FILTER_TYPE | FILTER_VALUE ...
+-------------+----------------------+
1 B type-specific
Figure: Filter entry format
| Type | Name | Value | Matches |
|---|---|---|---|
| 0 | FILTER_DEST_HINT | 3 octets | Frames whose destination hint field equals the value |
| 1 | FILTER_GROUP_HINT | 2 octets | Group frames (MCST, GUNI, GUAR) whose group hint equals the value |
| 2 | FILTER_PKT_TYPE | 1 octet | Frames whose FCF packet-type field equals the value (0–7) |
Entries with an unrecognized FILTER_TYPE, or whose value length does not
match the type, fail with STATUS_INVALID_ARGUMENT.
See Receive Filtering for how this table combines with the implicit
filters derived from PROP_HOST_KEY and PROP_HOST_GROUP_KEYS.
PROP 100: PROP_HOST_AUTO_ACK
- Type: Single-Value, Read-Write
- Asynchronous Updates: No
- Required:
CAP_HOST_AUTO_ACK - Value Type: BOOL
- Post-Reset Value: 0 (false)
When true, the device sends MAC acknowledgments on behalf of the host identity for qualifying frames received while the host is detached, as specified in Acknowledgment Delegation. When false, the device never transmits on the host identity’s behalf.
PROP 101: PROP_HOST_RX_QUEUE_COUNT
- Type: Single-Value, Read-Only
- Asynchronous Updates: No
- Required:
CAP_HOST_RX_QUEUE - Value Type: UINT16_LE
- Units: frames
- Post-Reset Value: 0
The number of frames currently held in the inbound queue. The host
typically reads this right after attaching to decide whether (and when) to
issue CMD_QUEUE_DRAIN.
PROP 102: PROP_HOST_RX_QUEUE_CAPACITY
- Type: Single-Value, Read-Write
- Asynchronous Updates: No
- Required:
CAP_HOST_RX_QUEUE(CMD_PROP_SETsupport is OPTIONAL) - Value Type: UINT16_LE
- Units: frames
- Post-Reset Value: Implementation-Specific
The maximum number of frames the inbound queue can hold. Devices with a fixed
queue size fail CMD_PROP_SET with STATUS_UNIMPLEMENTED; devices that allow
adjustment fail values they cannot honor with STATUS_INVALID_ARGUMENT.
PROP 103: PROP_HOST_RX_QUEUE_DROPPED
- Type: Single-Value, Read-Only
- Asynchronous Updates: No
- Required:
CAP_HOST_RX_QUEUE - Value Type: UINT32_LE
- Units: frames
- Post-Reset Value: 0
The cumulative number of frames discarded from the inbound queue—evicted or refused by the queue-full policy, or otherwise not retained (see Inbound Queueing)—since the device last reset. A non-zero increase across a detached interval tells the host that its view of that interval is incomplete. The counter wraps modulo 2^32.
PROP 104: PROP_HOST_MUTED_GROUPS
- Type: Multiple-Value, Read-Write
- Has Item Length Prefix: No
- Asynchronous Updates: No
- Required:
CAP_HOST_RX_QUEUE - Item Form: 16 octets (the short group ID)
- Remove Selector: the item
- Post-Reset Value: Empty
The groups whose queued messages raise no receipt cue. A frame matches when the provisioned group key that authenticated it derives a listed short group ID; the match is made after verification, against the short group ID, never against the 2-octet on-wire group hint, so a hint collision cannot mute a group the host did not name.
PROP 105: PROP_HOST_MUTED_PEERS
- Type: Multiple-Value, Read-Write
- Has Item Length Prefix: No
- Asynchronous Updates: No
- Required:
CAP_HOST_RX_QUEUE - Item Form: 32 octets (a peer public key)
- Remove Selector: the item
- Post-Reset Value: Empty
The peers whose direct messages, once queued, raise no
receipt cue. A frame matches when its resolved
sender is a listed key; a peer’s posts to a group are governed by
PROP_HOST_MUTED_GROUPS alone. Items are full public keys rather than 3-byte
hints: hints collide, and the detached receive path resolves the full key
already.
Receipt Cues
A device may indicate locally that it took a frame in for a host that is not attached—a sound, a light, a count on a panel. What form the indication takes is a property of the board rather than of the protocol. Every device that holds traffic for its host can sound one; a device that cannot does not take custody (see Capabilities).
An indication of one arrival is reserved for a message the operator
reads: a frame the device authenticated with a provisioned key whose
payload is a text message of type basic or
status, or any other a receiver would
display, counted once, at its first
fragment. Resend requests, Message Unavailable responses, continuation
fragments, a message a receiver would not display, and every other
payload type are queued without one, as is any frame the device could
not authenticate, since its content is unreadable, and any frame carrying
a delivery-critical
option the device does not recognize. A message on the
EMERGENCY group by multicast gets
one only when its frame signature
verifies against a key the device holds.
PROP_HOST_MUTED_GROUPS and PROP_HOST_MUTED_PEERS name conversations
whose messages are taken in without one: a group, matched by the key
that authenticated the frame, or a direct conversation, matched by its
sender. They govern the indication and nothing else: a frame in a muted
conversation is filtered, queued, acknowledged, and drained exactly as
any other, and counts toward PROP_HOST_RX_QUEUE_COUNT and
PROP_HOST_RX_QUEUE_DROPPED the same way.
A test message on EMERGENCY raises
no indication of its arrival, and lights nothing that asks for attention,
unless PROP_TEST_MESSAGE_ALERTS
is set. Like a muted one, it is otherwise queued and drained as any other
frame.
Indications that describe the queue as a whole rather than one arrival—a queued count, a “something is waiting” light—follow every other queued frame, because they describe what a drain will deliver.
The tables are not validated against the key tables. An entry naming a
conversation the device holds no key for is simply inert, as an entry in
PROP_HOST_RX_FILTERS is independent of the key tables.
Receive Filtering
Receive filtering determines which successfully received frames are accepted for the host—delivered live when the host is attached, or queued when it is not.
The device evaluates each received frame against the union of:
- the explicit filters in
PROP_HOST_RX_FILTERS; - an implicit destination-hint filter for the first 3 bytes of
PROP_HOST_KEY, when a host key is configured; and - an implicit group filter for the group hint of each key in
PROP_HOST_GROUP_KEYS.
A frame matching any filter is accepted. Destination and group hints are prefilters, not proof (see Addressing); filtering by them can only over-accept, never mis-reject, and the host performs full cryptographic verification as usual.
The implicit destination-hint filter matches unicast traffic addressed to the host identity. Encrypted group unicast addressed to the host is matched through its group filter (its destination hint is concealed on the wire); the device MAY additionally use a provisioned group key to decrypt the address block and narrow the match.
Two kinds of returning traffic identify themselves only by the trailer of a
frame the host previously sent, so no destination or group filter can
address them: a MAC Ack carries no
destination hint and its public ack_mic is the first 4 bytes of the
acknowledged frame’s MIC, and a repeater’s onward copy of a host frame keeps
the host’s trailer while any destination hint it carries names the remote
peer. The device therefore records the leading 4 trailer bytes of each frame
it transmits on the host’s behalf—for a MAC Ack, its ack_mic—and
implicitly accepts any received frame whose trailer opens with a recorded
value. For a MAC Ack the host sent, this matches the ack being carried
onward; for any other frame, it matches both the returning acknowledgment
and the frame being carried onward. The host’s forwarding-confirmation
machinery must overhear every onward copy, acks included, to stop
retransmitting. These records evict lazily, so multiple echoes of one send—
acks arriving over different return routes, repeats from different
repeaters—are all delivered. A MAC Ack whose ack_mic matches no recorded
frame is still accepted if an explicit FILTER_PKT_TYPE entry selects it.
Broadcast packets—payload-carrying broadcasts and beacons alike—are
implicitly accepted for live delivery: a broadcast is addressed to
every node, the host included. The rule is live-only. While the host is
detached, a broadcast is queued only when an explicit filter selects it
(e.g., a FILTER_PKT_TYPE entry with value 0), so ambient broadcast
traffic cannot displace queued unicast frames.
Directed traffic that asks for no acknowledgment follows the same shape.
A UNIC or GUNI frame accepted only by an implicit filter is delivered
live but MUST NOT be queued; queueing it requires an explicit
FILTER_PKT_TYPE entry selecting that packet type. Its sender is not
waiting on the device—nothing about it will be repeated or given up on—
so the frame is a request whose asker has moved on by the time a drain
runs, while the queue slot it takes is one an ack-requesting frame needed.
The rule is stated as a default the host must override rather than one it
can refuse, because filters only widen: an entry for UNAR would add to
what the implicit destination-hint filter already admits, never narrow it.
Device-domain state never creates implicit host filters: frames for the device identity or its groups reach the host only if the host’s own filtering matches them.
Compatibility rule: when no host key is configured, no host group keys are provisioned, and the explicit filter table is empty, filtering is considered unconfigured and every successfully received frame is accepted for live delivery. This is exactly how a device with no host services at all behaves, so a host using the radio as a plain frame pipe observes no difference on a filtering device in its factory state. As soon as any filter (implicit or explicit) exists, only matching frames are accepted.
Like the broadcast rule, this one is live-only. A device with filtering unconfigured queues nothing while detached: the host domain does not survive a power cycle, so every device passes through this state on the way from power-on to its host’s first write, and a device that queued here would fill its queue with whatever was in earshot—its own transmissions included—on nobody’s behalf.
A device MUST NOT queue a frame it transmitted itself. The copy a
device delivers of its own transmission (RX_FLAG_SELF_TX) lets an
attached host’s MAC observe its frame reaching the air; replayed from the
queue it describes a transmission the host completed long before.
Promiscuous mode (see PROP_MAC_PROMISCUOUS) bypasses filtering for live
delivery only.
Inbound Queueing
When CAP_HOST_RX_QUEUE is supported and the host is detached,
accepted frames are placed in a FIFO inbound queue instead of being
discarded. Each queue entry records the frame, its receive metadata (RSSI,
LQI, SNR), the time of reception, whether the device authenticated it, and
whether the device acknowledged it (see
Acknowledgment Delegation).
When the host is attached, accepted frames are delivered live over
STR_PHY_RAW as they always are. Attaching does not flush
the queue: frames queued while the host was away remain queued until the
host issues CMD_QUEUE_DRAIN. Frames received
after attach are therefore delivered live even while older frames remain
queued, and live deliveries MAY interleave with buffered deliveries during
a drain (RX_FLAG_BUFFERED distinguishes them). A host that wants to
process the backlog first drains promptly after attaching and MAY defer
its processing of interleaved live deliveries; RX_AGE in the
buffered-frame metadata gives coarse (one-second) relative timing but is
not sufficient to reconstruct a strict total order—and UMSH itself does
not guarantee in-order delivery in any case.
A queued frame is authenticated when its MIC verified under keys the
device holds—a PROP_HOST_PEER_KEYS
entry for unicast, a
PROP_HOST_GROUP_KEYS entry for
multicast—it carries no delivery-critical option the device cannot
interpret, and the device did not suspect it of being a replay. Any other
frame is unauthenticated: a destination hint is public, so anyone can
send a frame that passes the receive filters. Only an authenticated frame
can be acknowledged on the host’s behalf.
Every queued frame falls into one of three classes:
| Class | Definition | Discarded |
|---|---|---|
| Unauthenticated | Not authenticated | First, oldest first |
| Multicast | Authenticated multicast | Next, oldest first |
| Held | Authenticated direct message (unicast or group unicast) | Never |
When a new frame is accepted and the queue is full, the device makes room by discarding the oldest entry of the first class the arriving frame may displace that the queue holds:
| Arriving frame | May displace |
|---|---|
| Unauthenticated | Unauthenticated |
| Multicast | Unauthenticated, then multicast |
| Direct | Unauthenticated, then multicast |
An arriving frame that finds nothing it may displace is discarded. An authenticated direct message discarded this way is not acknowledged, and the device stands down. A device MUST NOT evict a held entry: a direct message acknowledged on the host’s behalf leaves the queue only by a drain, a host replacement, or loss of power.
Within each class the queue holds the most recent traffic, and queue order
stays the order of reception. Every frame discarded under these rules,
whether queued or arriving, increments PROP_HOST_RX_QUEUE_DROPPED.
Traffic from a peer the device holds no keys for, including first contact from an unprovisioned peer, is unauthenticated: it is the first displaced when the queue fills, and it cannot displace authenticated traffic.
Duplicate detection for queueing uses the standard final-destination mechanisms of replay detection: per-peer frame-counter state and the recent accepted-MIC cache used for the backward window, where the device holds the keys to apply them. A frame identified as a previously accepted frame MUST NOT consume an additional queue slot; it is coalesced with the existing entry. A Route Retry form of a queued frame is the same logical packet (same MIC and frame counter) and coalesces with it. Coalescing a duplicate is separate from acknowledging it—a coalesced duplicate may still have its ack retransmitted under the duplicate-acknowledgment window (see Acknowledgment Delegation). For frames the device cannot authenticate (no provisioned keys), no protocol-defined duplicate detection applies and each received frame occupies its own entry.
Acknowledgment Delegation
With PROP_HOST_AUTO_ACK enabled, the device acknowledges qualifying inbound
frames so that senders’ retransmission logic is satisfied while the host is
away. The device MUST transmit a MAC ack for a received frame if and only
if all of the following hold:
PROP_HOST_AUTO_ACKis true and no host is attached.- The frame’s packet type requests acknowledgment:
UNAR, orGUARwhere the device also holds the frame’s group key. - The frame is addressed to the host identity: its (possibly decrypted)
destination hint matches
PROP_HOST_KEY, and its source resolves to an entry inPROP_HOST_PEER_KEYS—by full public key when theSflag is set, or by unique 3-byte prefix match otherwise. - The frame authenticates: its MIC verifies under the pairwise
K_MICforUNAR, or under the combined group unicast payload keys forGUAR. - The frame carries no delivery-critical option the device does not recognize or cannot interpret.
- The frame is accepted as new by the replay-detection rules, applied per provisioned peer. The device advances a peer’s replay baseline only when it accepts a frame from that peer into the queue; a frame it fails to store leaves the baseline unchanged, so its retransmissions remain acceptable later.
- The frame was placed in the inbound queue (see Inbound Queueing). A frame that cannot be stored—one that finds the queue holding only held entries, or one exceeding the device’s buffer—is not acknowledged, so the sender keeps retrying until the host returns.
A delegated ACK also requires that no unconsumed source-route hints remain. An early overheard copy may be queued without an ACK; the first eligible duplicate can then supply the ACK without another queue entry. RX_FLAG_ACKED requires successful radio transmission.
Delegated ACKs follow the return-path guidance, carry a trace when one is due, and preserve the request’s region codes on both flooded and source-routed returns.
Duplicates. An authenticated frame that replay detection identifies as a previously accepted frame—typically a retransmission whose original ack was lost—is not queued again, but while the original entry is still queued the device MAY retransmit its acknowledgment under the core duplicate-acknowledgment window: only when the frame authenticates and its counter is no more than 8 behind the peer’s baseline, and without advancing or otherwise modifying the replay baseline. Re-acknowledging a duplicate is independent of queue coalescing (see Inbound Queueing) and does not mark anything newly accepted. Frames farther behind the baseline MUST NOT be acknowledged.
Reboot. Per-peer replay baselines are not saved (see Saved State). After a device reset, the first authenticated frame accepted from a provisioned peer re-establishes that peer’s baseline at face value, exactly as on first contact (see Counter Resynchronization). The consequence is that after a reboot, previously captured authenticated frames may be accepted, queued, acknowledged, and given a receipt cue if replayed in a counter sequence acceptable from the newly established baseline. The host MAC remains authoritative for duplicate suppression when the frames are eventually delivered, so this creates a limited availability and resource-consumption window (queue slots, delegated acks, and receipt cues), but it does not permit forgery or duplicate application delivery. Implementations concerned about this threat MAY persist a compact per-peer counter watermark (batched or range-reserved to limit flash wear), but hosts MUST NOT assume they do.
Custody. A delegated ack acknowledges volatile custody by default: the frame is held in RAM until drained, and the loss window on power failure is documented in Saved State. Implementations that persist the queue provide durable custody, but hosts and application protocols MUST NOT rely on it.
The acknowledgment is an ordinary
MAC Ack packet: the ack MIC is the
first 4 bytes of the acknowledged frame’s MIC and the 4-byte ack tag is
computed as specified in
Ack Tag Construction, using the
provisioned pairwise keys (combined with the group keys for GUAR). The
ack carries no destination hint. It is routed from what the acknowledged
frame itself teaches, the way a host MAC routes an ack from the route that
frame just taught it (see Route Learning); the
device holds no other routing state for the host’s peers:
- A frame carrying a complete trace is acknowledged down its repeater hints as the ack’s source route; the trace is accumulated most-recent first, so it already reads in return order. An empty trace is a direct neighbor and gets a direct ack.
- A frame carrying no complete trace but a flood hop count gets
FHOPS_REMinitialized from itsFHOPS_ACC, with any region-code options replayed. AnFHOPS_ACCof zero is a direct neighbor. - A frame carrying a source-route option and no complete trace—including an
emptied option, which the last repeater keeps for provenance—spent flood
hops only past the route’s end, so its
FHOPS_ACCis not a distance. The ack floods at a default budget of 5 flood hops, or at one more thanFHOPS_ACCif that is larger. - A frame with neither option and no flood hop count was heard off the sender’s own transmitter and is acknowledged directly.
Each way back carries the margin its last hop earns, judged from the acknowledged frame alone, since the device knows nothing else about the sender: the reception itself for a direct neighbor, the earliest trace record’s signal for a traced path, and no measurement for a flood distance. A re-ack of a duplicate (see Duplicates above) always carries the margin. An ack with no margin and no route is sent with no flood hop count and no trace, which could only arrive empty.
An ack a repeater may carry includes a trace when the frame arrived with
FHOPS_ACC greater than zero or carried a trace of its own, so the sender
learns the return path from the only frame an ack-only exchange gives it.
Delegated ack transmissions use the device’s normal transmit path and are subject to the configured duty-cycle limit; the device MUST NOT exceed the limit to send an ack. An ack that cannot be sent leaves the queued frame marked unacknowledged.
Frames that are accepted but fail any of conditions 2–6—no peer key, no group key, authentication impossible to evaluate, an unrecognized delivery-critical option—are still queued (subject to filtering); they are simply not acknowledged. The host performs its own verification after draining and may ack late if the application finds that useful.
While a host is attached, the device never acks on its behalf: live-delivered frames are the host’s responsibility. Acks generated by the device identity for its own traffic are ordinary device-node behavior and are not governed by this section.
A detached device MUST NOT transmit anything on the host identity’s behalf except a MAC ack. A MAC ack carries no source address, so any other frame heard from the host identity while the host is detached comes from somewhere else (see Host Identity Heard Elsewhere).
Standing Down
A detached device stands down by emptying
PROP_HOST_PEER_KEYS and
PROP_HOST_GROUP_KEYS. Nothing else
changes: PROP_HOST_KEY, the filter and mute tables, and the inbound
queue are kept, so a returning host drains what was held and rewrites both
key tables as it does on every attach (see Host
Domain).
A device stands down when either of the following occurs:
- Lease. Twelve hours have passed since the host detached.
- Full. An authenticated direct message arrives and the inbound queue holds only held entries (see Inbound Queueing).
Once it has stood down, the device can authenticate nothing for the host: every frame it accepts is unauthenticated, so it earns no acknowledgment and no receipt cue for a single arrival, and it cannot displace a held entry.
Host Identity Heard Elsewhere
While the host is detached, a received frame whose source is the host
identity means that identity is live on the mesh through some other
device. The device erases PROP_HOST_KEY, which resets the entire host
domain (see Host Replacement).
The source matches by the full public key when the frame carries one, and by its 3-byte hint otherwise. A frame whose trailer opens with a value the device recorded when transmitting a frame for the host (see Receive Filtering) does not count: it is a repeater’s onward copy of something the host sent through this device before detaching.