openipc-core
Shared protocol code for openipc-rs.
This crate contains the parts of the OpenIPC receive path that do not need to know whether bytes came from native USB, WebUSB, a capture file, or a test fixture. It is the right dependency when you want to parse or reconstruct OpenIPC video without taking a dependency on a specific USB frontend.
What It Does
- Parse Realtek rtl88xx USB RX aggregates and 24-byte RX descriptors.
- Filter OpenIPC/WFB 802.11 frames by channel id and radio port.
- Handle WFB session packets, data decryption, and FEC recovery.
- Expose recovered non-video WFB payload bytes from MAVLink, data, or custom radio ports without parsing those application protocols.
- Parse RTP and depacketize H.264/H.265 into Annex-B access units.
- Build adaptive-link feedback payloads and WFB uplink packets.
- Parse legacy/HT/VHT radiotap TX modes and build Realtek USB TX descriptors for monitor-injection frames.
Basic Receive Shape
use ;
use RxPacketType;
The returned frame data is still encoded video. Feed it to WebCodecs, a native decoder, a file writer, or an RTP/Annex-B bridge depending on your application.
Event Model
ReceiverPipeline emits every useful stage it observes:
IgnoredFramemeans the frame did not match the configured channel or could not be parsed for this pipeline.SessionEstablishedmeans a WFB session packet updated the decrypt/FEC state.WfbPayloadmeans a decrypted and FEC-recovered payload fragment was accepted on the video channel.RtpPacketmeans the recovered payload parsed as RTP. This is useful if an app wants to mirror RTP to UDP or inspect packet timing.VideoFramemeans one complete encoded Annex-B access unit is ready for a decoder or file writer.
One input 802.11 frame can produce more than one event. For example, a recovered
RTP packet can be emitted first, and if that packet completes an access unit the
same call can also emit VideoFrame. That is intentional: apps can subscribe to
the boundary they care about without reparsing the transfer.
Raw Payload Bytes
Use PayloadPipeline when you want recovered bytes from a non-video WFB
channel without RTP or video assumptions. The crate does not care whether those
bytes are MAVLink, MSP, CRSF, IP, vendor data, or another protocol:
use ;
RadioPort::MavlinkRx is the observed OpenIPC MAVLink downlink port. Use
RadioPort::DataRx or RadioPort::Custom(n) for other payload channels.
openipc-core does not parse MAVLink or any other telemetry protocol.
Applications can parse, display, record, or inspect those bytes later.
Crate Boundaries
openipc-core intentionally has no USB device ownership. Pair it with:
openipc-rtl88xxfor native or WebUSB Realtek adapter IO.openipc-nativefor a CLI-style native receive loop.openipc-webor@openipc-rs/webfor browser/WASM applications.
Status
The protocol pipeline has unit tests for parser, crypto, FEC, RTP, and uplink helpers. Live radio behavior still depends on the USB driver and adapter validation in higher-level crates.