Interface Catalog
This page lists all interfaces by function group. Every topic is prefixed with lixel/application/, omitted in the tables. Direction markers: REQ=request, RSP=response, RPT=report (see Message Model & Codec).
Status monitoring
| Interface | Direction | Topic (prefix omitted) | Message | Description |
|---|---|---|---|---|
| Device heartbeat | RPT | report/heartbeat | (JSON) | Heartbeat broadcast, for discovery |
| Device status | RPT | report/device_status | DeviceStatusReport | Mapping / system / RTK status at 1 Hz |
| Real-time pose | RPT | report/lio_pose | LioPoseReport | Real-time LIO pose while scanning |
| Real-time point cloud | RPT | report/lio_pcl | MqttCompressMsg | Compressed real-time point cloud |
| System error | RPT | report/system_error | SystemErrorReport | System error code report |
Among the interfaces exposed by the OpenAPI, only the heartbeat uses JSON text, for discovering a device and reading the protocol version and the authorization state:
{"DeviceSN":"A256A60000","Timestamp":1697703246.5,"ProtocolVersion":"3.0.0","Features":["openapi_license"],"OpenapiLicenseState":"active","OpenapiLicenseText":"Authorized"}
DeviceSN: device serial number.Timestamp: current device time.ProtocolVersion: protocol version. It stays"3.0.0"and cannot tell whether the device supports OpenAPI authorization.
The fields below are added by firmware that supports OpenAPI authorization:
| Field | Type | Values | Description |
|---|---|---|---|
Features | string array | contains "openapi_license" | The firmware supports OpenAPI authorization. A heartbeat without this field, or whose array does not contain this value, comes from a device on the earlier key-based scheme |
OpenapiLicenseState | string | none, active, expired | Authorization state: not authorized, authorized, recording minutes used up. Left out while the device cannot read its own authorization state |
OpenapiLicenseText | string | Not authorized, Authorized, Expired | The state as English text that can be shown as is. Left out together with OpenapiLicenseState |
For how the device handles requests in each state, see Connection & Authentication · OpenAPI authorization and key.
The device status is reported once per second, carrying the mapping state, system resources, and RTK status:
message DeviceStatusReport {
message DeviceStatus {
sint32 app_sessions = 1; // number of APP sessions
}
Header header = 1;
uint32 modeling_state = 2; // unified status code
string device_sn = 3; // device serial number
string project_id = 4; // project name
string time_zone = 5; // current time zone
bool init_ready = 6; // whether SLAM of the current scan is ready
SystemStatus system_status = 7;
RtkStatus rtk_status = 8;
DeviceStatus device_status = 9;
}
init_ready tells whether SLAM of the current scan is ready; it does not mean the device needs initializing. After AC_START the device sets it to true once SLAM has started, and back to false after the scan stops. So it is always false while the device is in standby, which is normal; the OpenAPI has no separate initialization step and needs none.
For decoding the real-time point cloud and pose, see Real-time Data.
Device management
| Interface | Direction | Topic (prefix omitted) | Message |
|---|---|---|---|
| Query device info | REQ / RSP | request·response/device_info | DeviceInfoRequest / DeviceInfoResponse |
| Device config | REQ / RSP | request·response/device_config | DeviceConfigRequest / DeviceConfigResponse (a comment in the public proto mentions report/device_config, but no DeviceConfigReport message is defined and the device has no such topic; do not subscribe to it) |
| Device control | REQ / RSP | request·response/device_control | DeviceControlRequest / DeviceControlResponse |
| Query OpenAPI authorization | REQ / RSP | request·response/openapi_license | OpenapiLicenseRequest / OpenapiLicenseResponse, see Query the OpenAPI authorization |
Not every device fills in every sub-message of DeviceInfo; for example, some devices do not return storage_info. A sub-message that is not filled in does not appear in the decoded JSON; treat it as "not provided", not as an error. The USB disk read/write state can be read from udisk_info.rw_enable.
Device control supported ActionCmd: AC_USB_MASS, AC_USB_ETHER, AC_DISK_FORMAT, AC_POWER_OFF, AC_SYSTEM_REBOOT, plus the file-sharing switches AC_START_FS / AC_STOP_FS (see Project File Access; a fixed default credential is used once enabled). AC_DISK_FORMAT, AC_POWER_OFF, and AC_SYSTEM_REBOOT erase data or power off / reboot the device — confirm before calling.
message DeviceControlRequest {
Header header = 1;
Application.ActionCmd action = 2;
}
message DeviceControlResponse {
Header header = 1;
Application.ActionCmd action = 2;
Error error = 15;
}
Device config supports setting the time and the main storage type:
message DeviceConfigRequest {
message TimeConfig {
sint64 time_secs = 1; // timestamp (second precision)
string time_zone = 2; // time zone (e.g. "Asia/Shanghai")
}
message MainStorageConfig {
sint32 storage_type = 1; // 0: internal storage, 1: TF card, 2: USB Disk
}
Header header = 1;
optional TimeConfig time_config = 4;
optional MainStorageConfig main_storage_config = 8;
}
Query the OpenAPI authorization
| Interface | Direction | Topic (prefix omitted) | Message |
|---|---|---|---|
| Query OpenAPI authorization | REQ / RSP | request·response/openapi_license | OpenapiLicenseRequest / OpenapiLicenseResponse |
Queries the authorization state, the authorization code, and the remaining recording minutes of the device. Set action in the request to AC_GET_CONFIG; the device returns the result in info of the response.
- No key is needed. It can be queried in the
none,active, andexpiredstates, and on a device that is not activated, with or without a key, and with a wrong one. The query is not metered. - Only a device whose heartbeat
Featurescontains"openapi_license"has this topic; check the heartbeat before querying (see Connection & Authentication · Telling which kind of device it is). A device on the earlier key-based scheme does not respond, and the request times out. - This interface is read-only; this SDK cannot grant or install an authorization.
- Examples: Python
python/example/usage/openapi_license.py, C++cpp/build/examples/openapi_license.
message OpenapiLicenseRequest {
Header header = 1;
Application.ActionCmd action = 2; // AC_GET_CONFIG
string license = 3; // not used by this SDK, leave empty
}
message OpenapiLicenseInfo {
reserved 2, 3;
bool licensed = 1; // an authorization record exists (expired ones included)
string device_sn = 4; // serial number of the device the authorization is bound to
string code = 5; // authorization code bound to this device
sint64 granted_min = 6; // total granted minutes, -1 for a permanent authorization
sint64 used_min = 7; // total used minutes
sint64 remaining_min = 8; // remaining minutes, -1 for a permanent authorization
string state = 9; // none, active, expired
string state_text = 10; // state text in English
}
message OpenapiLicenseResponse {
Header header = 1; // session_id is the same as in the request
Application.ActionCmd action = 2; // the action of the request
OpenapiLicenseInfo info = 3;
Error error = 15;
}
action must be AC_GET_CONFIG; license is not used, leave it empty. The response copies the request header (session_id is the same as in the request) and echoes the request action.
Fields of info:
| Field | Type | Description |
|---|---|---|
licensed | bool | true when the device has an authorization record (expired ones included) |
device_sn | string | Serial number of the device the authorization is bound to; empty for none |
code | string | Authorization code bound to this device; empty for none |
granted_min | sint64 | Total granted recording minutes; -1 for a permanent authorization; 0 for none |
used_min | sint64 | Total used minutes; 0 for none. For a permanent authorization it is still the real total, not -1 |
remaining_min | sint64 | Remaining minutes; -1 for a permanent authorization; 0 for none. Decreases in real time while recording |
state | string | none, active, expired |
state_text | string | The state as English text that can be shown as is |
state | state_text | Meaning |
|---|---|---|
none | Not authorized | The device has no usable authorization record |
active | Authorized | A time-limited authorization with remaining_min of 1 or more, or a permanent authorization |
expired | Expired | A time-limited authorization with remaining_min below 1 |
error.code | error.desc | Condition | info |
|---|---|---|---|
EC_Success (0x12040001) | success | action is AC_GET_CONFIG | Present |
EC_RequestError (0x32040002) | unsupported action | action is a value the device does not support, e.g. 0 or AC_START | Absent |
EC_ProtoError (0x32040001) | parse error | The request payload cannot be parsed | Absent |
A decoded response (time-limited authorization; by the protobuf JSON mapping a sint64 is a string in JSON):
{
"header": {"session_id": "s1", "seq": 0, "stamp": "0", "scaler": "0", "device_id": ""},
"action": "AC_GET_CONFIG",
"info": {
"licensed": true,
"device_sn": "A256A60000",
"code": "<authorization code>",
"granted_min": "600",
"used_min": "125",
"remaining_min": "475",
"state": "active",
"state_text": "Authorized"
},
"error": {"code": 302252033, "desc": "success"}
}
For a permanent authorization, granted_min and remaining_min are "-1", and used_min is still the real total.
Scan mapping
| Interface | Direction | Topic (prefix omitted) | Message |
|---|---|---|---|
| Scan control | REQ / RSP / RPT | request·response·report/modeling | ModelingRequest / ModelingResponse / ModelingReport |
| Current project file URLs | REQ / RSP | request·response/modeling_status | ModelingStatusRequest / ModelingStatusResponse |
Scan action supports AC_START / AC_STOP. The response to AC_START only means the device received the request; the device then goes standby → starting → scanning (usually reaching scanning after 14 to 15 seconds), and an AC_STOP sent before it is scanning is deferred. Subscribe to report/device_status and read modeling_state instead of waiting a fixed time — see Quick Start (Python / C++).
modeling_status returns the current project's project_id and project_name, plus the URLs of the pose, control point, and measure point files; it does not return the scan state — use modeling_state from report/device_status for that. When the device has no current project data (for example in standby) it publishes no response, and request() raises TimeoutError.
Key fields:
message ModelingRequest {
Header header = 1;
Application.ActionCmd action = 2; // supports AC_START / AC_STOP
string project_name = 3; // custom project name
Modeling.RecordMode record_mode = 4; // RM_CALC / RM_RECORD / RM_RECORD_CALC
Modeling.ScanMode scan_mode = 5; // SM_PCL / SM_LCC / SM_PORTRAIT
Modeling.MountType mount_type = 6; // MT_HAND / MT_CAR / MT_UAV / MT_BACKPACK
string pre_project_id = 7; // preceding project ID (continued-scan feature in later versions)
Modeling.AssistMode assist_mode = 8; // scan assist mode AM_GUIDED / AM_VISUAL
}
The scan status report (report/modeling) carries the travel distance, speed, scan time, and the post-scan data-processing progress:
message ModelingReport {
message ScanStatus {
float move_distance = 1; // travel distance
float move_speed = 2; // movement speed
sint64 scan_time = 3; // scan time (seconds)
}
Header header = 1;
sint32 pgo_progress = 2; // post-scan data-processing progress (0~100)
ScanStatus scan_status = 3;
}
Point management
| Interface | Direction | Topic (prefix omitted) | Message |
|---|---|---|---|
| Control point operations | REQ / RSP / RPT | request·response·report/control_point | ControlPointRequest / ControlPointResponse / ControlPointReport |
| Measure point operations | REQ / RSP | request·response/measure_point | MeasurePointRequest / MeasurePointResponse |
Control point action supports AC_ADD / AC_REMOVE. AC_UPDATE is defined in the proto but the device does not handle it and returns EC_ProtoError (desc is invalid action). Measure point action supports AC_ADD / AC_REMOVE only. The comment in the proto block below says AC_UPDATE is supported; follow the description here instead.
In standby the device does not reply to control point requests; while scanning it does, and returns EC_RequestError (desc is no project data) when there is no current project data. AC_ADD ignores the id in the request; the id in the response is chosen by the device (for example, request 9999, response 1) and used to remove the point. On a successful AC_ADD, error.desc is the pose of the point (x y z qw qx qy qz, 7 floating-point numbers separated by spaces), not a text description.
Note: the measure point feature is supported on some devices only; verify that your target device provides it before use.
message ControlPointRequest {
Header header = 1;
Application.ActionCmd action = 2; // supports AC_ADD / AC_REMOVE / AC_UPDATE
sint32 id = 3; // control point ID
sint32 type = 4; // type (0: device, 1: centering pole, 100: legacy)
string label = 5; // control point label
sint32 height = 6; // base point height (unit: mm)
}
Control point height (differs by model)
height is the base point height of the control point in mm; with a centering pole (type 1), fill in the pole height. Models handle this field differently:
| Model | Saves height | height in the response | Project control point file (control_points_url) |
|---|---|---|---|
| Lixel K2 | Yes | The request value, echoed back; also carried in the report/control_point report | Has a height column, in m |
| Lixel L2Pro | No; the request value is ignored | Always 0 | No height column |
- On a K2 with
type1, the device usesheightto move the control point coordinate down to the foot of the centering pole. - A Lixel L2Pro control point response fills in only
idandlabel;typeandheightdecode as the proto3 default 0, which does not mean the request failed. When the pole height is needed on a Lixel L2Pro, record it yourself and apply it in post-processing. - To tell whether a device supports the control point height, send one
AC_ADDand check whetherheightin the response equals the request value. If a K2 returns 0, upgrade the device firmware to the latest version.
Project management
| Interface | Direction | Topic (prefix omitted) | Message |
|---|---|---|---|
| Project list operations | REQ / RSP | request·response/project_list | ProjectListRequest / ProjectListResponse |
action supports:
AC_LIST_ALL_PROJECTS: list all projects.AC_MODIFY_PROJECT_LABELS: modify labels (needsid+tag_name).AC_DELETE_PROJECTS: delete projects (needsid_list).
Modifying labels and deleting projects are rejected while the device is starting, scanning, or stopping a scan; do them in standby. The poses_url, xbin_url, etc. returned by AC_LIST_ALL_PROJECTS are HTTP URLs; for the host value, see Project File Access.
message ProjectListRequest {
Header header = 1;
// supports AC_LIST_ALL_PROJECTS / AC_MODIFY_PROJECT_LABELS / AC_DELETE_PROJECTS only
Application.ActionCmd action = 2;
optional string id = 3;
optional string tag_name = 4;
repeated string id_list = 5; // delete multiple projects at once
}
RTK / Ntrip
| Interface | Direction | Topic (prefix omitted) | Message |
|---|---|---|---|
| Get Ntrip profile | REQ / RSP | request·response/get_ntrip_profile | GetNtripProfileRequest / GetNtripProfileResponse |
| Set Ntrip profile | REQ / RSP | request·response/set_ntrip_profile | SetNtripProfileRequest / SetNtripProfileResponse |
| Get RTK advanced config | REQ / RSP | request·response/get_rtk_advance | GetRtkAdvanceRequest / GetRtkAdvanceResponse |
| Set RTK advanced config | REQ / RSP | request·response/set_rtk_advance | SetRtkAdvanceRequest / SetRtkAdvanceResponse |
- Set Ntrip
actionsupportsAC_LOGIN/AC_LOGOUT. - CORS type:
CUSTOM/QIANXUN/ZHONGYI. - Coordinate frame:
UNKNOWN/ITRF2008/WGS84/CGCS2000. - RTK satellite systems:
GPS/BDS/GLO/GAL/QZSS/IRNSS.
Note: when the RTK hardware is not connected (
RtkStatus.stateisHwDisconnected) or there is no RTK device, the set-Ntrip request is rejected and the device returnsEC_RequestError(descisoperation forbidden).
Data processing
| Interface | Direction | Topic (prefix omitted) | Message |
|---|---|---|---|
| Data unpack | REQ / RSP / RPT | request·response·report/data_unpack | DataUnpackRequest / DataUnpackResponse / DataUnpackReport |
data_source currently supports XBIN_DATA; if data_topics is omitted, everything is unpacked; report/data_unpack reports the unpack progress (0~100). When the device is not in standby, this request returns EC_RequestError.
message DataUnpackRequest {
enum DataSource {
XBIN_DATA = 0; // xbin data
}
Header header = 1;
string project_name = 2; // project name
DataSource data_source = 3; // data source
repeated string data_topics = 4; // data topics (unpack all by default if omitted)
optional string data_ouputdir = 5; // output directory name (relative to the project directory)
}
Note: the data unpack feature is supported only on specific models and firmware versions. Before use, query the firmware version via the heartbeat
ProtocolVersionor the device info, and confirm with XGRIDS whether the target model / firmware supports it. On an unsupported device the request has no effect. The Lixel L2Pro has no data unpack interface and does not respond to this request, with or without a key.
Error code convention
Request-response messages carry the result in the Error error = 15 field. Common ones: EC_RequestSuccess, EC_RequestError, EC_ProtoError; Ntrip-related: EC_NtripLoginSuccess, EC_NtripLogoutSuccess, EC_NtripLogoutFailed, EC_NtripDisConnected, EC_NtripNetworkError, EC_NtripAuthError. For the full list, see Error Codes.