> This page is for Firmware, version 3.2.
> For other versions, use one of these documentation indexes:
> - 4.0 (default): https://docs.ouster.com/sensor-docs/firmware/4.0/llms.txt
> - 3.2: https://docs.ouster.com/sensor-docs/firmware/3.2/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ouster.com/sensor-docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ouster.com/sensor-docs/_mcp/server.

# Lidar Data Legacy

> LEGACY udp_profile_lidar packet format, deprecated in firmware v3.2.

![](/sensor-docs/_fern-files/ouster.docs.buildwithfern.com/b321fb1acf5c6ffac4b489d350647b7eee3817c74c366115fa73c549d5d40338/assets/firmware/packets/packet-renderer.html)

> **Warning**
>
> The `LEGACY` data packet format is deprecated in firmware v3.2. Use `RNG19_RFL8_SIG16_NIR16` as the single-return replacement.

Set `udp_profile_lidar` to `LEGACY` to activate the legacy packet format.

## Overview

In LEGACY mode, lidar packets consist of 16 Measurement Blocks and vary in size based on channel count. Packet rate depends on lidar mode. Words are 32 bits, little-endian. By default, lidar UDP data is forwarded to port `7502`.

Lidar frames contain 512, 1024, or 2048 measurement blocks depending on lidar mode. Block count and order per frame are fully deterministic, enabling efficient lookup-table decoding in client software.

The LEGACY format has no separate packet header or packet footer. Each Measurement Block contains a Measurement Block Header, followed by one Channel Data Block per lidar channel, and ends with a 32-bit Measurement Block Status word.

## Measurement Block Header

The 128-bit (4-word) Measurement Block Header replaces both the packet header and column header used in current formats.

```mermaid
---
title: "LEGACY Measurement Block Header"
---
packet-beta
+32: "Timestamp L"
+32: "Timestamp H"
+16: "Measurement ID"
+16: "Frame ID"
+24: "Encoder Count"
+8: "Reserved"
```

| Word | MSB | LSB | Field          | Description                                                                                                                                                          |
| :--: | --: | --: | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   0  |  31 |   0 | Timestamp L    | Low 32 bits of measurement timestamp in nanoseconds.                                                                                                                 |
|   1  |  31 |   0 | Timestamp H    | High 32 bits of measurement timestamp.                                                                                                                               |
|   2  |  15 |   0 | Measurement ID | Sequentially incrementing index from 0 to 511, 1023, or 2047 depending on lidar mode.                                                                                |
|   2  |  31 |  16 | Frame ID       | 16-bit lidar scan index. Increments each rotation at the zero azimuth crossing.                                                                                      |
|   3  |  23 |   0 | Encoder Count  | Azimuth angle as raw encoder count (0–90,111). Increments 44 ticks per angle in 2048 mode, 88 in 1024 mode, 176 in 512 mode. Will be deprecated in a future release. |
|   3  |  31 |  24 | Reserved       | —                                                                                                                                                                    |

## Channel Block

### LEGACY Single Return

Each Measurement Block contains one 96-bit (3-word) Channel Data Block per lidar channel, followed by a 32-bit Measurement Block Status word.

* **Range** \[20 bit] — Range in millimeters, 1 mm resolution.
* **Bloom** \[1 bit] — Bloom indicator.
* **Reflectivity** \[8 bit] — Calibrated reflectivity: signal photons scaled by range and sensor sensitivity.
* **Signal** \[16 bit] — Signal intensity photons.
* **Near Infrared** \[16 bit] — Near-infrared photons from ambient environmental illumination.

```mermaid
---
title: "LEGACY Channel Data Block"
---
packet-beta
+20: "Range"
+8: "Reserved"
+1: "Bloom"
+3: "Reserved"
+8: "Reflectivity"
+8: "Reserved"
+16: "Signal"
+16: "Near Infrared"
+16: "Reserved"
```

**Measurement Block Status** \[32 bits] — `0xFFFFFFFF` = valid; `0x0` = padded (dropped or outside azimuth window). Channel data values are 0 when padded, but header values remain valid.

## Packet Size Calculation

The table below shows the lidar data packet size breakdown for all products when `LEGACY` profile is configured. Since the size of the measurement block varies proportional to the number of channels in a sensor, all sensors with the same number of channels have the same lidar packet data structure and size.

| Product                   | Number of words in Measurement Block | Size of single Measurement Block (Bytes) | Size of lidar packet (Bytes) |
| ------------------------- | -----------------------------------: | ---------------------------------------: | ---------------------------: |
| OS1-16                    |                                   53 |                                      212 |                        3,392 |
| OS0-32, OS1-32, OS2-32    |                                  101 |                                      404 |                        6,464 |
| OS0-64, OS1-64, OS2-64    |                                  197 |                                      788 |                       12,608 |
| OS0-128, OS1-128, OS2-128 |                                  389 |                                    1,556 |                       24,896 |

The table below calculates the data rate of all products operating at the highest lidar modes, `2048x10` or `1024x20`, for `LEGACY` profile assuming a default azimuth window of 360°. Providing a custom azimuth window can further lower data rate. See the [Azimuth Window](/sensor-docs/firmware/azimuth-window) section for details on setting a custom azimuth window.

| Product                   | LEGACY Lidar packet size (Bytes) | LEGACY Lidar packets rate (Hz) | LEGACY Data Rate (Mbps) |
| ------------------------- | -------------------------------: | -----------------------------: | ----------------------: |
| OS1-16                    |                             3392 |                           1280 |                   34.77 |
| OS0-32, OS1-32, OS2-32    |                             6464 |                           1280 |                   66.23 |
| OS0-64, OS1-64, OS2-64    |                            12608 |                           1280 |                  129.14 |
| OS0-128, OS1-128, OS2-128 |                            24896 |                           1280 |                  254.97 |