leaps_cert_update_write

This call is available only on the ethernet gateway. It should be called repeatedly after leaps_cert_update_start to transfer the certificate until all the data chunks are transferred. Returns status “ok” followed by the data request until all the data is transferred, in which case status “ok” is returned with no data request following or until the update ends with some error. The error is indicated by a status code other than “ok”. The reasons for the failed update are:

  • internal error

  • invalid parameter - e.g. data chunk with zero length, or data chunk has been skipped

  • not permitted - not started yet, or the whole update process has failed

The size and the offset of the data already written to the flash by the update procedure so far are returned as a response on each call to leaps_cert_update_write until the update is completed.


Input
  • offset: ? 32-bit unsigned integer ? (Certificate data offset.)

  • data: ? from 4 to 240 bytes ? (Certificate data chunk currently being uploaded, up to 240 bytes.)

Output
  • offset: ? 32-bit unsigned integer? (Expected offset of next data chunk.)

  • size: ? 32-bit unsigned integer? (Expected size of next data chunk.)


Example

TLV Request

Type

Length

Value

0x3B

0x24

offset

data

0x00 0x00 0x00 0x00

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

Type 0x3B (59 dec) means command leaps_cert_update_write

TLV Response

Type

Length

Value

type

Length

Value

0x40

0x01

0x00

0x7E

0x08

offset

size

0x00 0x00 0x00 0x00

0x00 0x10 0x00 0x00

Type 0x40 means status code
Type 0x7E (126 dec) means data request