Quick Start

This quick start demonstrates how to verify that the epc670 ToF HAT+ is operational and how to capture the first frame from the device.

After installation, a system service automatically configures the camera pipeline and exposes convenient device nodes that can be used directly with standard V4L2 utilities.

The following nodes are provided:

Node

Description

/run/epc670/media

Media controller device for the configured pipeline

/run/epc670/video

Video capture device used to stream frames

/run/epc670/subdev

Sensor control interface (V4L2 sub-device)

These nodes allow direct interaction with the sensor and capture pipeline without manual media graph configuration.

Prerequisites

Before starting, ensure the following requirements are met:

  • The epc670 ToF HAT+ is connected to the system.

  • The software package is installed (see Installation Guide).

  • The system has been rebooted after installation.

  • The required utilities are available:

The examples below use the v4l2-ctl utility.

Install it if necessary:

sudo apt install v4l-utils

Verify Device Nodes

Check that the service has created the expected nodes:

ls -l /run/epc670

Expected output:

media
video
subdev

If these nodes exist, the driver and pipeline are correctly initialized. If not, visit Troubleshooting page.

Inspect Sensor Controls

The sensor exposes a set of controls through the V4L2 sub-device interface.

List available controls:

v4l2-ctl --device=/run/epc670/subdev --all

These controls allow configuring the sensor and capturing the frames

Capture Test Frames

You will need two terminal instances for this example.

Terminal 1 - Start Streaming

Start the capture pipeline:

v4l2-ctl --device /run/epc670/video --stream-mmap --stream-count=1 --stream-to=frame.raw --verbose

The command waits for the sensor to produce a frame.

Terminal 2 — Trigger Test Pattern

Trigger a test pattern from the sensor:

v4l2-ctl --device=/run/epc670/subdev -c test_pattern=1

Once the frame is generated, the capture command in Terminal 1 will complete and the frame will be saved to:

frame.raw

Inspect the Captured Frame

The captured frame contains 16-bit pixel values.

  • The 12 most significant bits (MSB) contain valid sensor data.

  • The 4 least significant bits (LSB) are unused padding.

You can experiment with different test patterns and visualize the raw data using a suitable raw image viewer or analysis tool.