dwm_cert_update_start
This call is available only on the ethernet gateway. It starts the certificate update process and should be called at the beginning before any call to dwm_cert_update_write. The request returns command status: “ok” if accepted, followed by the first data request. The user should respond to the data request by the dwm_cert_update_write. The update is not started if refused. The reasons for the refused certificate update are:
not permitted - invalid size of the certificate to be uploaded
internal error
invalid parameter - the ID of the certificate to be uploaded is unknown
C code example
-
int_t *dwm_cert_update_start(uint8_t, uint32_t)
- Parameters
input – id, size
id – ? 8-bit unsigned integer ? (certificate identifier, 0 - CA certificate, 1 - my certificate, 2 - my private key)
size – ? 32-bit unsigned integer? (total size of the certificate to be uploaded, up to 2048 bytes)
output – status_code, [offset, size]
offset – ? 32-bit unsigned integer? (expected offset of next data chunk)
size – ? 32-bit unsigned integer? (expected size of next data chunk)
SPI/UART example
TLV Request |
|||
---|---|---|---|
Type |
Length |
Value |
|
0x36 |
0x05 |
certificate to upload |
size |
0x00 |
0xC4 0x26 0x00 0x00 |
Type 0x36 (54 dec) means command dwm_cert_update_start
TLV Response |
||||||
---|---|---|---|---|---|---|
Type |
Length |
Value |
type |
Length |
Value |
|
0x40 |
0x01 |
0x00 |
0x7E |
0x08 |
offset |
size |
0x00 0x00 0x00 0x00 |
0xE4 0x03 0x00 0x00 |