Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
dfu.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_BLUETOOTH_MESH_DFU_H__
8#define ZEPHYR_INCLUDE_BLUETOOTH_MESH_DFU_H__
9
10#include <sys/types.h>
11
12#include <zephyr/kernel.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
25#ifndef CONFIG_BT_MESH_DFU_FWID_MAXLEN
26#define CONFIG_BT_MESH_DFU_FWID_MAXLEN 0
27#endif
28
29#ifndef CONFIG_BT_MESH_DFU_METADATA_MAXLEN
30#define CONFIG_BT_MESH_DFU_METADATA_MAXLEN 0
31#endif
32
33#ifndef CONFIG_BT_MESH_DFU_URI_MAXLEN
34#define CONFIG_BT_MESH_DFU_URI_MAXLEN 0
35#endif
36
37#ifndef CONFIG_BT_MESH_DFU_SLOT_CNT
38#define CONFIG_BT_MESH_DFU_SLOT_CNT 0
39#endif
40
76
77
106
126
135
142 const void *fwid;
143
145 size_t fwid_len;
146
148 const char *uri;
149};
150
164
167#ifdef __cplusplus
168}
169#endif
170
171#endif /* ZEPHYR_INCLUDE_BLUETOOTH_MESH_DFU_H__ */
bt_mesh_dfu_iter
Action for DFU iteration callbacks.
Definition dfu.h:128
#define CONFIG_BT_MESH_DFU_METADATA_MAXLEN
Definition dfu.h:30
bt_mesh_dfu_phase
DFU transfer phase.
Definition dfu.h:42
bt_mesh_dfu_status
DFU status.
Definition dfu.h:79
#define CONFIG_BT_MESH_DFU_FWID_MAXLEN
Definition dfu.h:26
bt_mesh_dfu_effect
Expected effect of a DFU transfer.
Definition dfu.h:108
@ BT_MESH_DFU_ITER_CONTINUE
Continue iterating.
Definition dfu.h:133
@ BT_MESH_DFU_ITER_STOP
Stop iterating.
Definition dfu.h:130
@ BT_MESH_DFU_PHASE_TRANSFER_ACTIVE
The Receive Firmware procedure is being executed.
Definition dfu.h:50
@ BT_MESH_DFU_PHASE_UNKNOWN
Phase of a node was not yet retrieved.
Definition dfu.h:74
@ BT_MESH_DFU_PHASE_VERIFY
The Verify Firmware procedure is being executed.
Definition dfu.h:53
@ BT_MESH_DFU_PHASE_IDLE
Ready to start a Receive Firmware procedure.
Definition dfu.h:44
@ BT_MESH_DFU_PHASE_TRANSFER_ERR
The Transfer BLOB procedure failed.
Definition dfu.h:47
@ BT_MESH_DFU_PHASE_APPLY_FAIL
Firmware applying failed.
Definition dfu.h:71
@ BT_MESH_DFU_PHASE_APPLY_SUCCESS
Firmware applying succeeded.
Definition dfu.h:68
@ BT_MESH_DFU_PHASE_VERIFY_OK
The Verify Firmware procedure completed successfully.
Definition dfu.h:56
@ BT_MESH_DFU_PHASE_APPLYING
The Apply New Firmware procedure is being executed.
Definition dfu.h:62
@ BT_MESH_DFU_PHASE_VERIFY_FAIL
The Verify Firmware procedure failed.
Definition dfu.h:59
@ BT_MESH_DFU_PHASE_TRANSFER_CANCELED
Firmware transfer has been canceled.
Definition dfu.h:65
@ BT_MESH_DFU_ERR_WRONG_PHASE
The operation cannot be performed while the Server is in the current phase.
Definition dfu.h:89
@ BT_MESH_DFU_ERR_FW_IDX
The message contains a firmware index value that is not expected.
Definition dfu.h:95
@ BT_MESH_DFU_ERR_INTERNAL
An internal error occurred on the node.
Definition dfu.h:92
@ BT_MESH_DFU_ERR_TEMPORARILY_UNAVAILABLE
The Server cannot start a firmware update.
Definition dfu.h:101
@ BT_MESH_DFU_ERR_METADATA
The metadata check failed.
Definition dfu.h:98
@ BT_MESH_DFU_ERR_RESOURCES
Insufficient resources on the node.
Definition dfu.h:84
@ BT_MESH_DFU_ERR_BLOB_XFER_BUSY
Another BLOB transfer is in progress.
Definition dfu.h:104
@ BT_MESH_DFU_SUCCESS
The message was processed successfully.
Definition dfu.h:81
@ BT_MESH_DFU_EFFECT_COMP_CHANGE
Node Composition Data changed, and remote provisioning is supported.
Definition dfu.h:121
@ BT_MESH_DFU_EFFECT_UNPROV
Node will be unprovisioned after the update.
Definition dfu.h:124
@ BT_MESH_DFU_EFFECT_COMP_CHANGE_NO_RPR
Node Composition Data changed and the node does not support remote provisioning.
Definition dfu.h:115
@ BT_MESH_DFU_EFFECT_NONE
No changes to node Composition Data.
Definition dfu.h:110
Public kernel APIs.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
DFU image instance.
Definition dfu.h:140
const char * uri
Update URI, or NULL.
Definition dfu.h:148
size_t fwid_len
Length of the firmware ID.
Definition dfu.h:145
const void * fwid
Firmware ID.
Definition dfu.h:142
DFU image slot for DFU distribution.
Definition dfu.h:152
size_t size
Size of the firmware in bytes.
Definition dfu.h:154
size_t fwid_len
Length of the firmware ID.
Definition dfu.h:156
uint8_t fwid[0]
Firmware ID.
Definition dfu.h:160
uint8_t metadata[0]
Metadata.
Definition dfu.h:162
size_t metadata_len
Length of the metadata.
Definition dfu.h:158