Skip to main content
ef::Device is a move-only handle for one M1 session. It provides capture, recording, diagnostics, networking, updates, and system management.

Choose a task

Connect

Open a control session over USB or Bluetooth LE (BLE).

Capture video and IMU

Start the data plane with grab() and retrieve synchronized data.

Record and replay

Create host-file or device-local MCAP recordings.

Manage the M1

Check health, configure WiFi, update firmware, and manage device settings.

One handle, two planes

The M1 separates control operations from high-bandwidth sensor data: A BLE session may be control-only. Setting InitParameters::udp_host adds a WiFi/UDP data plane to that session.

Lifecycle

  1. Discover the M1 and fill InitParameters.
  2. Call open() to start the control session and cache device information.
  3. Call grab() to start the live data plane when capture is required.
  4. Call close() to release host resources.
A device-local recording continues after close() or a host disconnect. Stop it explicitly with disable_recording().

State model

Calls that are invalid in the current state return ERROR_CODE::INVALID_FUNCTION_CALL. Calls that communicate with the device return an ERROR_CODE and write results through output parameters. Cached getters, including get_device_information() and get_health_status(), do not access the device or block. Access control is orthogonal to this state model. A device can be locked or unlocked in any of these states, and a gated call on a link that has not authenticated returns INVALID_PASSWORD rather than INVALID_FUNCTION_CALL. Read usb_locked and session_unlocked from get_device_information(), and see Access Control and Encryption. Continue with Connection & Lifecycle before setting up an individual feature.