<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<rfc ipr="trust200902" docName="draft-joetansey-alvc-schc-lpwan-01" category="info">
  <front>
    <title abbrev="ALVC over SCHC for LPWAN">Carrying ALVC over LPWAN using SCHC Fragmentation and Priorities</title>
    <author fullname="Joe Tansey" initials="J." surname="Tansey">
      <organization>Independent</organization>
      <address><email>joe.tansey@gmail.com</email></address>
    </author>
    <author fullname="Joe Tansey" initials="J." surname="Tansey">
      <organization>Cisco</organization>
      <address><email>joetanse@cisco.com</email></address>
    </author>
    <date month="October" day="13" year="2025"/>
    <area>General</area>
    <workgroup>Independent Submission</workgroup>
    <abstract>
      <t>This document specifies how to carry the Adaptive Layered Voice Container (ALVC) over Low-Power Wide-Area Networks (LPWAN) using Static Context Header Compression (SCHC). ALVC is codec-agnostic and progressive: a sub-kilobit Base stream provides immediate intelligibility while optional Enhancement streams improve quality when bandwidth allows. This document defines SCHC rules, fragmentation parameters, and unequal error protection (UEP) so that Base traffic is delivered promptly and reliably, while Enhancements are sent opportunistically. The specification targets constrained networks with small payloads, duty-cycle limits, and loss, and does not define a new speech coding bitstream. A companion Internet-Draft describes the codec-agnostic ALVC container, and SCHC is specified in RFC 8724.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction" anchor="intro">
      <t>LPWAN links have small maximum payloads, non-negligible loss, and duty or dwell-time limits that make continuous voice streaming impractical. ALVC addresses this by splitting audio into a small Base layer (intelligible at sub-kilobit rates) and optional Enhancement layers that improve quality later without blocking Base playback. This document defines a SCHC mapping for ALVC so that Base traffic receives stronger protection and more timely delivery than Enhancements. SCHC is specified in <xref target="RFC8724"/>. The ALVC container is described in a companion draft <xref target="ALVC-Container"/>.</t>
    </section>

    <section title="Requirements Language" anchor="reqs">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 (<xref target="RFC2119"/>, <xref target="RFC8174"/>) when, and only when, they appear in all capitals, as shown here.</t>
    </section>

    <section title="Scope" anchor="scope">
      <t>This document specifies SCHC Rules, fragmentation sizing, and sender scheduling for ALVC traffic classes. It is codec-agnostic and does not define a new speech bitstream. Example Base profiles include Codec2; example Enhancement profiles include LPCNet or Opus, but the mapping applies generically.</t>
    </section>

    <section title="Terminology" anchor="terms">
      <t>ALVC-Frame: an application-layer unit covering a time window (e.g., 20 ms) with fields: timestamp (ts), layer_id (0=Base, &gt;0=Enh), codec_id, frag_seq/frag_total, flags, and payload.</t>
      <t>Base: ALVC frames with layer_id=0; MUST be playable alone.</t>
      <t>Enhancement (Enh): ALVC frames with layer_id&gt;0; MAY be ignored.</t>
      <t>UEP: unequal error protection favoring Base over Enh.</t>
    </section>

    <section title="Receiver Behavior (Summary)" anchor="receiver">
      <t>Receivers MUST render Base frames without blocking on Enhancements. When a complete Enhancement span for a time window arrives, the receiver MUST render that span using the highest available layer (splice/replace). Missing or invalid Enhancements MUST NOT interrupt Base playback. Implementations SHOULD expose application progress events indicating the best layer available per time window.</t>
    </section>

    <section title="SCHC Mapping for ALVC" anchor="schc">
      <t>Separate SCHC Rules SHALL be provisioned for Base and Enhancement traffic so that they can be scheduled and protected differently. A single Flow Identifier (e.g., CoAP/UDP tuple) may carry both classes if contexts are distinguished by RuleID.</t>

      <section title="Contexts and RuleIDs">
        <t>At minimum two RuleIDs are required:</t>
        <t>
          <list style="symbols">
            <t>RuleID-Base: for ALVC frames with layer_id=0.</t>
            <t>RuleID-Enh: for ALVC frames with layer_id&gt;0.</t>
          </list>
        </t>
        <t>Implementations MAY further subdivide Enh into multiple RuleIDs by layer priority.</t>
      </section>

      <section title="Fragmentation Parameters">
        <t>Fragment sizing SHOULD follow regional constraints to respect dwell or duty-limits and maximize goodput. The following recommendations are provided:</t>
        <t>
          <list style="symbols">
            <t>US915 DR3/DR4 (LoRaWAN-like 125/500 kHz): application payload of approximately 200-222 bytes per SCHC fragment is RECOMMENDED. Multiple ALVC frames may be aggregated per fragment.</t>
            <t>Raw LoRa SF10 / 125 kHz: to maintain per-channel time-on-air less than or equal to 0.4 s, application payload SHOULD be less than or equal to approximately 29 bytes. Typically this carries one Base frame per fragment; channel hopping MUST be used between fragments.</t>
          </list>
        </t>
      </section>

      <section title="Reliability and UEP">
        <t>Base fragments SHALL receive stronger protection than Enhancements:</t>
        <t>
          <list style="symbols">
            <t>Base: systematic transmission plus 10-20% parity (e.g., small block FEC) and limited ARQ/retry under policy.</t>
            <t>Enh: best-effort delivery; parity OPTIONAL; no blocking semantics. Loss of Enh MUST NOT stall Base.</t>
          </list>
        </t>
      </section>

      <section title="Sender Scheduling">
        <t>Senders SHOULD use a sliding-window scheduler:</t>
        <figure>
          <artwork><![CDATA[
repeat:
  1) transmit upcoming Base windows to sustain continuous playback
  2) transmit the earliest-missing Enhancement window(s) (oldest-first)
  3) advance window; respect dwell/duty and hop between channels
]]></artwork>
        </figure>
      </section>
    </section>

    <section title="Examples" anchor="examples">
      <t><spanx style="strong">Example A (US915 DR3/DR4):</spanx> An 8 s clip with Base (approximately 0.5-0.6 kb/s) may fit in about 3-4 SCHC fragments of 200-222 bytes, while an Enhancement at about 1.6 kb/s may require about 8 additional fragments. Base is sent first, Enh later as capacity allows.</t>
      <t><spanx style="strong">Example B (SF10/125 kHz):</spanx> The same 8 s Base requires about 16 fragments of &lt;= 29 bytes (one Base frame each), respecting &lt;= 0.4 s per-channel dwell and hopping each packet. Enhancements are deferred or omitted.</t>
    </section>

    <section title="Security Considerations" anchor="security">
      <t>ALVC frames SHOULD be protected end-to-end using an AEAD scheme (for example, ChaCha20-Poly1305 or AES-CCM) prior to SCHC fragmentation. Integrity failures in Enhancement fragments MUST NOT impact Base playback; such fragments are discarded. Metadata should be minimized to avoid exposing speaker identity or detailed timing beyond what is required for rendering.</t>
    </section>

    <section title="IANA Considerations" anchor="iana">
      <t>This document does not create new IANA registries. If a common set of ALVC RuleIDs or CoAP/SCHC identifiers is later standardized, those will be registered in a future document.</t>
    </section>

    <section title="Changes since -00" anchor="changes">
      <t>Clarified scope as codec-agnostic transport mapping for ALVC; added explicit Base/Enh RuleIDs, fragmentation sizing guidance per data rate, unequal error protection, and sender scheduling. Added security and examples.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <reference anchor="RFC2119" target="https://www.rfc-editor.org/rfc/rfc2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author initials="S." surname="Bradner"/>
          <date year="1997" month="March"/>
        </front>
      </reference>
      <reference anchor="RFC8174" target="https://www.rfc-editor.org/rfc/rfc8174">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author initials="B." surname="Leiba"/>
          <date year="2017" month="May"/>
        </front>
      </reference>
      <reference anchor="RFC8724" target="https://www.rfc-editor.org/rfc/rfc8724">
        <front>
          <title>SCHC: Static Context Header Compression and Fragmentation for LPWAN</title>
          <author initials="A." surname="Toutain"/>
          <author initials="L." surname="Pelov"/>
          <author initials="R." surname="Townsend"/>
          <date year="2020"/>
        </front>
      </reference>
    </references>

    <references title="Informative References">
      <reference anchor="ALVC-Container" target="https://datatracker.ietf.org/doc/draft-joetansey-alvc-codec/">
        <front>
          <title>Adaptive Layered Voice Container (ALVC) for Constrained Networks</title>
          <author initials="J." surname="Tansey"/>
          <date year="2025"/>
        </front>
      </reference>
    </references>
  </back>
</rfc>
