Zephyr API 3.6.99
|
Data Structures | |
struct | bt_mesh_blob_target_pull |
Target node's Pull mode (Pull BLOB Transfer Mode) context used while sending chunks to the Target node. More... | |
struct | bt_mesh_blob_target |
BLOB Transfer Client Target node. More... | |
struct | bt_mesh_blob_xfer_info |
BLOB transfer information. More... | |
struct | bt_mesh_blob_cli_inputs |
BLOB Transfer Client transfer inputs. More... | |
struct | bt_mesh_blob_cli_caps |
Transfer capabilities of a Target node. More... | |
struct | bt_mesh_blob_cli_cb |
Event handler callbacks for the BLOB Transfer Client model. More... | |
struct | bt_mesh_blob_cli |
BLOB Transfer Client model instance. More... | |
Macros | |
#define | BT_MESH_MODEL_BLOB_CLI(_cli) |
BLOB Transfer Client model Composition Data entry. | |
Functions | |
int | bt_mesh_blob_cli_caps_get (struct bt_mesh_blob_cli *cli, const struct bt_mesh_blob_cli_inputs *inputs) |
Retrieve transfer capabilities for a list of Target nodes. | |
int | bt_mesh_blob_cli_send (struct bt_mesh_blob_cli *cli, const struct bt_mesh_blob_cli_inputs *inputs, const struct bt_mesh_blob_xfer *xfer, const struct bt_mesh_blob_io *io) |
Perform a BLOB transfer. | |
int | bt_mesh_blob_cli_suspend (struct bt_mesh_blob_cli *cli) |
Suspend the active transfer. | |
int | bt_mesh_blob_cli_resume (struct bt_mesh_blob_cli *cli) |
Resume the suspended transfer. | |
void | bt_mesh_blob_cli_cancel (struct bt_mesh_blob_cli *cli) |
Cancel an ongoing transfer. | |
int | bt_mesh_blob_cli_xfer_progress_get (struct bt_mesh_blob_cli *cli, const struct bt_mesh_blob_cli_inputs *inputs) |
Get the progress of BLOB transfer. | |
uint8_t | bt_mesh_blob_cli_xfer_progress_active_get (struct bt_mesh_blob_cli *cli) |
Get the current progress of the active transfer in percent. | |
bool | bt_mesh_blob_cli_is_busy (struct bt_mesh_blob_cli *cli) |
Get the current state of the BLOB Transfer Client. | |
void | bt_mesh_blob_cli_set_chunk_interval_ms (struct bt_mesh_blob_cli *cli, uint32_t interval_ms) |
Set chunk sending interval in ms. | |
#define BT_MESH_MODEL_BLOB_CLI | ( | _cli | ) |
#include <zephyr/bluetooth/mesh/blob_cli.h>
BLOB Transfer Client model Composition Data entry.
_cli | Pointer to a Bluetooth Mesh BLOB Transfer Client model API instance. |
#include <zephyr/bluetooth/mesh/blob_cli.h>
BLOB Transfer Client state.
void bt_mesh_blob_cli_cancel | ( | struct bt_mesh_blob_cli * | cli | ) |
#include <zephyr/bluetooth/mesh/blob_cli.h>
Cancel an ongoing transfer.
cli | BLOB Transfer Client instance. |
int bt_mesh_blob_cli_caps_get | ( | struct bt_mesh_blob_cli * | cli, |
const struct bt_mesh_blob_cli_inputs * | inputs ) |
#include <zephyr/bluetooth/mesh/blob_cli.h>
Retrieve transfer capabilities for a list of Target nodes.
Queries the availability and capabilities of all Target nodes, producing a cumulative set of transfer capabilities for the Target nodes, and returning it through the bt_mesh_blob_cli_cb::caps callback.
Retrieving the capabilities may take several seconds, depending on the number of Target nodes and mesh network performance. The end of the procedure is indicated through the bt_mesh_blob_cli_cb::caps callback.
This procedure is not required, but strongly recommended as a preparation for a transfer to maximize performance and the chances of success.
cli | BLOB Transfer Client instance. |
inputs | Statically allocated BLOB Transfer Client transfer inputs. |
bool bt_mesh_blob_cli_is_busy | ( | struct bt_mesh_blob_cli * | cli | ) |
#include <zephyr/bluetooth/mesh/blob_cli.h>
Get the current state of the BLOB Transfer Client.
cli | BLOB Transfer Client instance. |
int bt_mesh_blob_cli_resume | ( | struct bt_mesh_blob_cli * | cli | ) |
#include <zephyr/bluetooth/mesh/blob_cli.h>
Resume the suspended transfer.
cli | BLOB Transfer Client instance. |
int bt_mesh_blob_cli_send | ( | struct bt_mesh_blob_cli * | cli, |
const struct bt_mesh_blob_cli_inputs * | inputs, | ||
const struct bt_mesh_blob_xfer * | xfer, | ||
const struct bt_mesh_blob_io * | io ) |
#include <zephyr/bluetooth/mesh/blob_cli.h>
Perform a BLOB transfer.
Starts sending the transfer to the Target nodes. Only Target nodes with a status
of BT_MESH_BLOB_SUCCESS will be considered.
The transfer will keep going either until all Target nodes have been dropped, or the full BLOB has been sent.
The BLOB transfer may take several minutes, depending on the number of Target nodes, size of the BLOB and mesh network performance. The end of the transfer is indicated through the bt_mesh_blob_cli_cb::end callback.
A Client only supports one transfer at the time.
cli | BLOB Transfer Client instance. |
inputs | Statically allocated BLOB Transfer Client transfer inputs. |
xfer | Statically allocated transfer parameters. |
io | BLOB stream to read the transfer from. |
void bt_mesh_blob_cli_set_chunk_interval_ms | ( | struct bt_mesh_blob_cli * | cli, |
uint32_t | interval_ms ) |
#include <zephyr/bluetooth/mesh/blob_cli.h>
Set chunk sending interval in ms.
This function is optional, and can be used to define how fast chunks are sent in the BLOB Client Model. Without an added delay, for example a Bluetooth Mesh DFU can cause network blockage by constantly sending the next chunks, especially if the chunks are sent to group addresses or multiple unicast addresses.
timeout_base
accordingly can circumvent this.cli | BLOB Transfer Client instance. |
interval_ms | the delay before each chunk is sent out in ms. |
int bt_mesh_blob_cli_suspend | ( | struct bt_mesh_blob_cli * | cli | ) |
#include <zephyr/bluetooth/mesh/blob_cli.h>
Suspend the active transfer.
cli | BLOB Transfer Client instance. |
uint8_t bt_mesh_blob_cli_xfer_progress_active_get | ( | struct bt_mesh_blob_cli * | cli | ) |
#include <zephyr/bluetooth/mesh/blob_cli.h>
Get the current progress of the active transfer in percent.
cli | BLOB Transfer Client instance. |
int bt_mesh_blob_cli_xfer_progress_get | ( | struct bt_mesh_blob_cli * | cli, |
const struct bt_mesh_blob_cli_inputs * | inputs ) |
#include <zephyr/bluetooth/mesh/blob_cli.h>
Get the progress of BLOB transfer.
This function can only be used if the BLOB Transfer Client is currently not performing a BLOB transfer. To get progress of the active BLOB transfer, use the bt_mesh_blob_cli_xfer_progress_active_get function.
cli | BLOB Transfer Client instance. |
inputs | Statically allocated BLOB Transfer Client transfer inputs. |