Please note that the Chinese and Japanese versions are currently being updated and are not yet complete. Stay tuned for the final versions!

leaps_usr_data_write

将自定义用户数据写入非易失性存储器,或通过 UWB 或 BLE 接口发送数据. 要接收新用户数据的通知或读取用户数据,请参阅 leaps_usr_data_read.


输入
  • 数据

  • type: 2 位(用户数据类型,‘0’表示将用户数据写入 UWB 接口,‘1’表示将用户数据写入 BLE 接口,‘2’表示将用户数据写入非易失性存储器).

  • flags: overwrite, test

  • overwrite: 1 bit

    • ‘0’表示不覆盖

    • ‘1’表示覆盖当前发送的数据

  • test: 1 bit (Applies only when type=0)

    • ‘0’ means test data is disabled

    • ‘1’ means device will send test user data (maximum size with first 4 bytes being frame counter). The input data length must be 4 and the input data is parsed as the number of test frames to send.

输出

‘忙’ - 之前的数据尚未发送,请重试或将覆盖标志设置为 1 后发送.

‘参数无效’ - 用户数据的大小过大或用户数据类型未知.

‘内部错误’ - 意外的内部错误.

BLE

‘不允许’ - BLE 接口上没有活动连接.


示例(写入 UWB 用户数据)

TLV 请求

类型

长度

价值

标志
(bits 0-1) 类型
(bit 2) 重写
(bit 3) test
(bits 4-7) reserved

UWB, BLE 用户数据 - 最多 26 字节 非易失性内存用户数据 - 最多 250 字节

0x1A

0x23

0x00

0x01 0x02 0x03 …. 0x23 0x22

0x1A (26 dec) 表示 leaps_usr_data_write 命令

TLV 响应

类型

长度

价值

0x40

0x01

0x00

0x40 表示 状态码 命令的状态码

Example (write test UWB user data)

TLV 请求

类型

长度

价值

标志
(bits 0-1) 类型
(bit 2) 重写
(bit 3) test
(bits 4-7) reserved

Data length must be 4 bytes Number of frames to be sent (e.g 10 frames - 0x0A 0x00 0x00 0x00)

0x1A

0x05

0x0C

0x0A 0x00 0x00 0x00

0x1A (26 dec) 表示 leaps_usr_data_write 命令

TLV 响应

类型

长度

价值

0x40

0x01

0x00

0x40 表示 状态码 命令的状态码

示例(重写 BLE 用户数据)

TLV 请求

类型

长度

价值

标志
(bits 0-1) 类型
(bit 2) 重写
(bit 3) test
(bits 4-7) reserved

BLE 用户数据最多 34 字节

0x1A

0x23

0x05

0x01 0x02 0x03 …. 0x23 0x22

0x1A (26 dec) 表示 leaps_usr_data_write 命令

TLV 响应

类型

长度

价值

0x40

0x01

0x00

0x40 表示 状态码 命令的状态码

示例(将用户数据写入非易失性存储器)

TLV 请求

类型

长度

价值

标志
(bits 0-1) 类型
(bit 2) 重写
(bit 3) test
(bits 4-7) reserved

non-volatile memory user data - max 250 bytes

0x1A

0x23

0x02

0x01 0x02 0x03 …. 0xFA

0x1A (26 dec) 表示 leaps_usr_data_write 命令

TLV 响应

类型

长度

价值

0x40

0x01

0x00

0x40 表示 状态码 命令的状态码