Zephyr API Documentation
3.7.0
A Scalable Open Source RTOS
|
API for the Bluetooth Mesh Firmware Update Server model. More...
Data Structures | |
struct | bt_mesh_dfu_srv_cb |
Firmware Update Server event callbacks. More... | |
struct | bt_mesh_dfu_srv |
Firmware Update Server instance. More... | |
Macros | |
#define | BT_MESH_DFU_SRV_INIT(_handlers, _imgs, _img_count) |
Initialization parameters for Firmware Update Server model. | |
#define | BT_MESH_MODEL_DFU_SRV(_srv) |
Firmware Update Server model entry. | |
Functions | |
void | bt_mesh_dfu_srv_verified (struct bt_mesh_dfu_srv *srv) |
Accept the received DFU transfer. | |
void | bt_mesh_dfu_srv_rejected (struct bt_mesh_dfu_srv *srv) |
Reject the received DFU transfer. | |
void | bt_mesh_dfu_srv_cancel (struct bt_mesh_dfu_srv *srv) |
Cancel the ongoing DFU transfer. | |
void | bt_mesh_dfu_srv_applied (struct bt_mesh_dfu_srv *srv) |
Confirm that the received DFU transfer was applied. | |
bool | bt_mesh_dfu_srv_is_busy (const struct bt_mesh_dfu_srv *srv) |
Check if the Firmware Update Server is busy processing a transfer. | |
uint8_t | bt_mesh_dfu_srv_progress (const struct bt_mesh_dfu_srv *srv) |
Get the progress of the current DFU procedure, in percent. | |
API for the Bluetooth Mesh Firmware Update Server model.
#define BT_MESH_DFU_SRV_INIT | ( | _handlers, | |
_imgs, | |||
_img_count | |||
) |
#include <zephyr/bluetooth/mesh/dfu_srv.h>
Initialization parameters for Firmware Update Server model.
_handlers | DFU handler function structure. |
_imgs | List of bt_mesh_dfu_img managed by this Server. |
_img_count | Number of DFU images managed by this Server. |
#define BT_MESH_MODEL_DFU_SRV | ( | _srv | ) |
#include <zephyr/bluetooth/mesh/dfu_srv.h>
Firmware Update Server model entry.
_srv | Pointer to a Firmware Update Server model instance. |
void bt_mesh_dfu_srv_applied | ( | struct bt_mesh_dfu_srv * | srv | ) |
#include <zephyr/bluetooth/mesh/dfu_srv.h>
Confirm that the received DFU transfer was applied.
Should be called as a result of the bt_mesh_dfu_srv_cb::apply callback.
srv | Firmware Update Server instance. |
void bt_mesh_dfu_srv_cancel | ( | struct bt_mesh_dfu_srv * | srv | ) |
#include <zephyr/bluetooth/mesh/dfu_srv.h>
Cancel the ongoing DFU transfer.
srv | Firmware Update Server instance. |
bool bt_mesh_dfu_srv_is_busy | ( | const struct bt_mesh_dfu_srv * | srv | ) |
#include <zephyr/bluetooth/mesh/dfu_srv.h>
Check if the Firmware Update Server is busy processing a transfer.
srv | Firmware Update Server instance. |
uint8_t bt_mesh_dfu_srv_progress | ( | const struct bt_mesh_dfu_srv * | srv | ) |
#include <zephyr/bluetooth/mesh/dfu_srv.h>
Get the progress of the current DFU procedure, in percent.
srv | Firmware Update Server instance. |
void bt_mesh_dfu_srv_rejected | ( | struct bt_mesh_dfu_srv * | srv | ) |
#include <zephyr/bluetooth/mesh/dfu_srv.h>
Reject the received DFU transfer.
Should be called at the end of a successful DFU transfer.
If the DFU transfer completes successfully, the application should verify the image validity (including any image authentication or integrity checks), and call this function if one of the checks fail.
srv | Firmware Update Server instance. |
void bt_mesh_dfu_srv_verified | ( | struct bt_mesh_dfu_srv * | srv | ) |
#include <zephyr/bluetooth/mesh/dfu_srv.h>
Accept the received DFU transfer.
Should be called at the end of a successful DFU transfer.
If the DFU transfer completes successfully, the application should verify the image validity (including any image authentication or integrity checks), and call this function if the image is ready to be applied.
srv | Firmware Update Server instance. |