Proposal: In band metadata format - junaid124/bladeRF GitHub Wiki

This is a work in progress. Do not reference this for current implementations.

Overview

The bladeRF stream consists of blocks of samples that are multiples of 1024 samples (4096 bytes) in size. When metadata is enabled, the first 4 samples of a block are replaced with metadata.

The below table depicts this 16-byte metadata. All fields are in little-endian byte order.

Offset Size (bytes) Item Description
0 4 Header
Bits Field Description
[31:28] Packet Type 0x1 to denote IF Data packet with stream identifier
[27] C-bit ("Class ID present" flag) Always 0. Class ID not supported.
[26] T-bit ("Trailer present" flag) Always 0. Trailers never used.
[25:24] Reserved Always 0.
[23:22] TSI (TimeStamp-Integer) Always 0. No integer-seconds timestamp fields are supported.
[21:20] TSF (TimeStamp-Fractional) Always 3, to denote free-running counter.
[19:16] Packet Count Monotonically increasing sequence number
[15:0] Packet size Total packet size, in units of 32-bit words, including metadata.
4 4 Stream identifier Currently set to 0.
8 8 Timestamp Derived from free-running samplerate counter
⚠️ **GitHub.com Fallback** ⚠️