22#include <zephyr/bluetooth/gatt.h>
23#include <zephyr/bluetooth/conn.h>
31#define BT_UUID_DFU_SMP_SERVICE_VAL \
32 BT_UUID_128_ENCODE(0x8D53DC1D, 0x1DB7, 0x4CD3, 0x868B, 0x8A527460AA84)
34#define BT_UUID_DFU_SMP_SERVICE BT_UUID_DECLARE_128(BT_UUID_DFU_SMP_SERVICE_VAL)
41#define BT_UUID_DFU_SMP_CHAR_VAL \
42 BT_UUID_128_ENCODE(0xDA2E7828, 0xFBCE, 0x4E01, 0xAE9E, 0x261174997C48)
45#define BT_UUID_DFU_SMP_CHAR BT_UUID_DECLARE_128(BT_UUID_DFU_SMP_CHAR_VAL)
190 size_t cmd_size,
const void *cmd_data);
void(* bt_dfu_smp_error_cb)(struct bt_dfu_smp *dfu_smp, int err)
Global function that is called when an error occurs.
Definition: dfu_smp.h:100
bool bt_dfu_smp_rsp_total_check(const struct bt_dfu_smp *dfu_smp)
Check if all response parts have been received.
int bt_dfu_smp_init(struct bt_dfu_smp *dfu_smp, const struct bt_dfu_smp_init_params *params)
Initialize the DFU SMP Client module.
int bt_dfu_smp_command(struct bt_dfu_smp *dfu_smp, bt_dfu_smp_rsp_part_cb rsp_cb, size_t cmd_size, const void *cmd_data)
Execute a command.
struct bt_conn * bt_dfu_smp_conn(const struct bt_dfu_smp *dfu_smp)
Get the connection object that is used with the DFU SMP Client.
void(* bt_dfu_smp_rsp_part_cb)(struct bt_dfu_smp *dfu_smp)
Handle part of the response.
Definition: dfu_smp.h:93
int bt_dfu_smp_handles_assign(struct bt_gatt_dm *dm, struct bt_dfu_smp *dfu_smp)
Assign handles to the DFU SMP Client instance.
bt_dfu_smp_rsp_part_cb rsp_part
Callback pointer for receiving the response.
Definition: dfu_smp.h:141
bt_dfu_smp_error_cb error_cb
Callback pointer for global error.
Definition: dfu_smp.h:135
Definition: dfu_smp.h:130
uint16_t smp
Definition: dfu_smp.h:123
uint16_t smp_ccc
Definition: dfu_smp.h:125
Definition: dfu_smp.h:121
bt_dfu_smp_error_cb error_cb
Callback pointer for error handler.
Definition: dfu_smp.h:111
DFU SMP Client parameters for the initialization function.
Definition: dfu_smp.h:106
size_t total_size
Total size of the response.
Definition: dfu_smp.h:80
size_t offset
Current data chunk offset.
Definition: dfu_smp.h:82
size_t chunk_size
The size of the data chunk.
Definition: dfu_smp.h:84
const uint8_t * data
Pointer to the data.
Definition: dfu_smp.h:86
Current response state.
Definition: dfu_smp.h:73
struct bt_dfu_smp::bt_dfu_smp_cbs cbs
struct bt_dfu_smp_rsp_state rsp_state
Definition: dfu_smp.h:128
struct bt_gatt_subscribe_params notification_params
Response notification parameters.
Definition: dfu_smp.h:151
struct bt_dfu_smp::bt_dfu_smp_handles handles
struct bt_conn * conn
Definition: dfu_smp.h:119
DFU SMP Client structure.
Definition: dfu_smp.h:117