Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Bluetooth Mesh Device Firmware Update (DFU) metadata

Common types and functions for the Bluetooth Mesh DFU metadata. More...

Data Structures

struct  bt_mesh_dfu_metadata_fw_ver
 Firmware version. More...
 
struct  bt_mesh_dfu_metadata
 Firmware metadata. More...
 

Enumerations

enum  bt_mesh_dfu_metadata_fw_core_type { BT_MESH_DFU_FW_CORE_TYPE_APP = BIT(0) , BT_MESH_DFU_FW_CORE_TYPE_NETWORK = BIT(1) , BT_MESH_DFU_FW_CORE_TYPE_APP_SPECIFIC_BLOB = BIT(2) }
 Firmware core type. More...
 

Functions

int bt_mesh_dfu_metadata_decode (struct net_buf_simple *buf, struct bt_mesh_dfu_metadata *metadata)
 Decode a firmware metadata from a network buffer.
 
int bt_mesh_dfu_metadata_encode (const struct bt_mesh_dfu_metadata *metadata, struct net_buf_simple *buf)
 Encode a firmare metadata into a network buffer.
 
int bt_mesh_dfu_metadata_comp_hash_get (struct net_buf_simple *buf, uint8_t *key, uint32_t *hash)
 Compute hash of the Composition Data state.
 
int bt_mesh_dfu_metadata_comp_hash_local_get (uint8_t *key, uint32_t *hash)
 Compute hash of the Composition Data Page 0 of this device.
 

Detailed Description

Common types and functions for the Bluetooth Mesh DFU metadata.

Enumeration Type Documentation

◆ bt_mesh_dfu_metadata_fw_core_type

#include <zephyr/bluetooth/mesh/dfu_metadata.h>

Firmware core type.

Enumerator
BT_MESH_DFU_FW_CORE_TYPE_APP 

Application core.

BT_MESH_DFU_FW_CORE_TYPE_NETWORK 

Network core.

BT_MESH_DFU_FW_CORE_TYPE_APP_SPECIFIC_BLOB 

Application-specific BLOB.

Function Documentation

◆ bt_mesh_dfu_metadata_comp_hash_get()

int bt_mesh_dfu_metadata_comp_hash_get ( struct net_buf_simple buf,
uint8_t key,
uint32_t hash 
)

#include <zephyr/bluetooth/mesh/dfu_metadata.h>

Compute hash of the Composition Data state.

The format of the Composition Data is defined in MshPRTv1.1: 4.2.2.1.

Parameters
bufPointer to buffer holding Composition Data.
key128-bit key to be used in the hash computation.
hashPointer to a memory location to which the hash will be stored.
Returns
0 on success, or (negative) error code otherwise.

◆ bt_mesh_dfu_metadata_comp_hash_local_get()

int bt_mesh_dfu_metadata_comp_hash_local_get ( uint8_t key,
uint32_t hash 
)

#include <zephyr/bluetooth/mesh/dfu_metadata.h>

Compute hash of the Composition Data Page 0 of this device.

Parameters
key128-bit key to be used in the hash computation.
hashPointer to a memory location to which the hash will be stored.
Returns
0 on success, or (negative) error code otherwise.

◆ bt_mesh_dfu_metadata_decode()

int bt_mesh_dfu_metadata_decode ( struct net_buf_simple buf,
struct bt_mesh_dfu_metadata metadata 
)

#include <zephyr/bluetooth/mesh/dfu_metadata.h>

Decode a firmware metadata from a network buffer.

Parameters
bufBuffer containing a raw metadata to be decoded.
metadataPointer to a metadata structure to be filled.
Returns
0 on success, or (negative) error code otherwise.

◆ bt_mesh_dfu_metadata_encode()

int bt_mesh_dfu_metadata_encode ( const struct bt_mesh_dfu_metadata metadata,
struct net_buf_simple buf 
)

#include <zephyr/bluetooth/mesh/dfu_metadata.h>

Encode a firmare metadata into a network buffer.

Parameters
metadataFirmware metadata to be encoded.
bufBuffer to store the encoded metadata.
Returns
0 on success, or (negative) error code otherwise.