Overview
The Lixel series is a line of handheld 3D scanners. Lixel OpenAPI is the set of open communication interfaces exposed by the device software. Through them you can remotely control a Lixel device, receive its data in real time, and build applications integrated with the device.
This page gives you the big picture. To get started right away, choose your development language: Python Quick Start or C++ Quick Start.
Get the example project
- Release 2.0.0: https://github.com/xgrids/Lixel_OpenAPI/releases/tag/2.0.0
- Repository: https://github.com/xgrids/Lixel_OpenAPI
What the OpenAPI can do
- Control the device: start/stop scanning, configure parameters, reboot or power off, format storage, enable file sharing.
- Receive data in real time: subscribe to the real-time point cloud, real-time pose, device status, and system errors; get camera frames over the video stream.
- Manage data: manage the project list, control points and measure points, and unpack recorded data.
- Configure positioning: set RTK / Ntrip parameters and read the satellite positioning status.
Protocol architecture
The device and client communicate through an MQTT broker running on the device. All business messages are serialized with Protobuf and carried as the MQTT payload (the heartbeat is the exception, carried as JSON text). The real-time camera video stream is carried over the device's built-in RTSP service.
┌────────────┐ publish request ┌──────────────┐
│ │ ───────────────────► │ │
│ Client │ │ Lixel device │
│ (your app) │ ◄─────────────────── │ (MQTT Broker)│
│ │ response / report │ (RTSP Server)│
└────────────┘ └──────────────┘
Topics use a three-segment naming scheme:
lixel/<domain>/<type>/<name>
domain: business domain, mainlyapplication.type: message direction.request: client → device (request)response: device → client (reply to a request)report: device → client (active push)
name: specific feature, e.g.device_info,modeling.
There are two typical interaction patterns:
- Request-response: the client publishes to
.../request/xxxand subscribes to.../response/xxxto await the reply. - Subscribe-report: the client subscribes to
.../report/xxxand passively receives data pushed by the device.
Key conventions
| Convention | Description |
|---|---|
| Transport | MQTT / MQTTS, depending on the device model |
| Payload | Protobuf binary (JSON text for the heartbeat) |
| Proto package | openapi.aiot_msgs |
| Authentication | A device with an OpenAPI authorization needs no key; other devices need the OpenAPI Key provided by XGRIDS in the request header |
| Video stream | RTSP, pushed after scanning starts |
| Development | Python or C++; both share the same MQTT topics and proto definition |
| Version | The documentation version v2.0.0 corresponds to the example project Lixel_OpenAPI release 2.0.0. The device protocol version is separate: the ProtocolVersion in the device heartbeat stays 3.0.0 and cannot tell whether a device supports OpenAPI authorization |
Changes from 1.1.0
- The OpenAPI Key is now optional. A device that holds an active OpenAPI authorization (state
active) accepts requests without a key; leaveopenapi_keyempty. A device that is not authorized, one whose authorization is used up, and one still on the earlier key-based scheme need a valid key as before. See Connection & Authentication · OpenAPI authorization and key. - Three new heartbeat fields:
Features,OpenapiLicenseState, andOpenapiLicenseText, which tell which scheme a device uses and the state of its authorization. See Interface Catalog · Status monitoring. - A new error description,
openapi license exhausted, returned when the recording minutes of the authorization are used up. - A new authorization query,
openapi_license: needs no key and returns the authorization state, the authorization code, and the remaining recording minutes. See Interface Catalog · Query the OpenAPI authorization. - Examples:
--keyis optional in the Python scripts and the C++ examples. - Linux only, and the GUI moved. From 2.0.0 the Python client library and the graphical control panel OpenAPI-XPanel support Linux only; the Windows build scripts are removed. OpenAPI-XPanel moved out of
python/into its ownxpanel/directory and uses PySide6 only. The Python client library is installed from a checkout withpip install -e python. See Python and OpenAPI-XPanel. - The C++ client can check the device certificate by CA only. New
TransportOptions::verify_hostname(example option--no-verify-hostname), and the example project now ships the CA certificate of the MQTTS devices,certs/lixel_mqtts_ca.crt. Connect to a K2 or L3 with--ca-file certs/lixel_mqtts_ca.crt --no-verify-hostname. See C++ · TLS certificate checks. - The wire format is unchanged:
Header.openapi_keyis still field 6. Programs written for 1.x need no change; a request with a valid key is handled exactly as in 1.x.
Note: the interface catalog and message fields follow the public proto (
proto/openapi/aiot_msgs.protoin the example project). The device's internal proto defines more than the public one; the extra parts are out of scope here.
Documentation map
The protocol itself is language-independent; the following shared chapters apply to both Python and C++:
| Shared chapter | Content |
|---|---|
| Connection & Authentication | USB / Wi-Fi / Bluetooth provisioning, MQTT/MQTTS parameters, OpenAPI authorization and key |
| Message Model & Codec | Topic rules, proto compilation, JSON ↔ Protobuf |
| Interface Catalog | Status monitoring, device management, scan mapping, points, projects, RTK/Ntrip, data processing |
| Real-time Data | Real-time point cloud decompression, real-time pose, RTSP video stream |
| Project File Access | Access project files over file sharing |
| Error Codes | Error code categories and meanings |
Choose an entry by development language, or the graphical control panel:
| Entry | Content |
|---|---|
| Python | 19 example scripts and a reusable client library (Linux) |
| OpenAPI-XPanel | Graphical control panel for publishing requests and subscribing to reports (Ubuntu 20.04 / 22.04 / 24.04, x86_64) |
| C++ | Client library and 19 command line examples (Linux only) |