Zephyr Project API 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
smp_bt.h File Reference

Bluetooth transport for the mcumgr SMP protocol. More...

Go to the source code of this file.

Macros

#define SMP_BT_SVC_UUID_VAL    BT_UUID_128_ENCODE(0x8d53dc1d, 0x1db7, 0x4cd3, 0x868b, 0x8a527460aa84)
 SMP service UUID value.
 
#define SMP_BT_SVC_UUID    BT_UUID_DECLARE_128(SMP_BT_SVC_UUID_VAL)
 SMP service UUID.
 
#define SMP_BT_CHR_UUID_VAL    BT_UUID_128_ENCODE(0xda2e7828, 0xfbce, 0x4e01, 0xae9e, 0x261174997c48)
 SMP characteristic UUID value.
 
#define SMP_BT_CHR_UUID    BT_UUID_DECLARE_128(SMP_BT_CHR_UUID_VAL)
 SMP characteristic UUID Used for both requests and responses.
 

Functions

int smp_bt_register (void)
 Registers the SMP Bluetooth service.
 
int smp_bt_unregister (void)
 Unregisters the SMP Bluetooth service.
 
int smp_bt_notify (struct bt_conn *conn, const void *data, uint16_t len)
 Transmits an SMP command/response over the specified Bluetooth connection as a notification.
 

Detailed Description

Bluetooth transport for the mcumgr SMP protocol.

Macro Definition Documentation

◆ SMP_BT_CHR_UUID

#define SMP_BT_CHR_UUID    BT_UUID_DECLARE_128(SMP_BT_CHR_UUID_VAL)

SMP characteristic UUID Used for both requests and responses.

◆ SMP_BT_CHR_UUID_VAL

#define SMP_BT_CHR_UUID_VAL    BT_UUID_128_ENCODE(0xda2e7828, 0xfbce, 0x4e01, 0xae9e, 0x261174997c48)

SMP characteristic UUID value.

◆ SMP_BT_SVC_UUID

#define SMP_BT_SVC_UUID    BT_UUID_DECLARE_128(SMP_BT_SVC_UUID_VAL)

SMP service UUID.

◆ SMP_BT_SVC_UUID_VAL

#define SMP_BT_SVC_UUID_VAL    BT_UUID_128_ENCODE(0x8d53dc1d, 0x1db7, 0x4cd3, 0x868b, 0x8a527460aa84)

SMP service UUID value.

Function Documentation

◆ smp_bt_notify()

int smp_bt_notify ( struct bt_conn *  conn,
const void *  data,
uint16_t  len 
)

Transmits an SMP command/response over the specified Bluetooth connection as a notification.

Parameters
connConnection object.
dataPointer to SMP message.
lendata length.
Returns
0 in case of success or negative value in case of error.

◆ smp_bt_register()

int smp_bt_register ( void  )

Registers the SMP Bluetooth service.

Should only be called if the Bluetooth transport has been unregistered by calling smp_bt_unregister().

Returns
0 on success; negative error code on failure.

◆ smp_bt_unregister()

int smp_bt_unregister ( void  )

Unregisters the SMP Bluetooth service.

Returns
0 on success; negative error code on failure.