leaps_cert_update_write

此呼叫仅在以太网网关上可用。 应在以下时间之后重复调用 leaps_cert_update_start 以传输证书,直到传输完所有数据块。 返回状态“ok”,然后是数据请求,直到所有数据都被传输,在这种情况下,返回状态“ok”,然后没有数据请求,或者直到更新以某种错误结束。 错误由“正常”以外的状态代码表示。 更新失败的原因是:

  • 内部错误

  • 无效参数 - 例如数据块长度为零,或数据块被跳过

  • 不允许 - 尚未启动,或整个更新过程失败

The offset and requested size of the next transfer window are returned after each call to leaps_cert_update_write until the update is completed.


输入
  • offset: 32位无符号整数 (证书数据偏移量。)

  • data: 从4到240字节 (前正在上传的证书数据块,最多240字节。)

输出
  • offset: 32-bit unsigned integer (Offset of the next requested transfer window.)

  • size: 32-bit unsigned integer (Requested size of the next transfer window, capped at 240 bytes.)


示例

TLV 请求

类型

长度

价值

0x3B

0xF4

偏移

data (240 bytes)

0x00 0x00 0x00 0x00

0xA5 0xA5 0xA5 0xA5 0xA5 0xA5 0xA5 0xA5 …. 0xA5 0xA5 0xA5 0xA5

类型0x3B(59 dec)表示命令leaps_cert_update_write

TLV 响应

类型

长度

价值

类型

长度

价值

0x40

0x01

0x00

0x7E

0x08

偏移

大小

0xF0 0x00 0x00 0x00

0xF0 0x00 0x00 0x00

类型 0x40 表示状态代码
类型 0x7E (126 dec)表示数据请求

This request writes the full 240-byte window, so its TLV payload length is 0xF4 (4-byte offset plus 240 data bytes). After acceptance, the next offset and requested window size are both 240 (F0 00 00 00).