9#define PROTOCOL_TIMEOUT K_SECONDS(60)
15#if MYNEWT_VAL(BLE_MESH_PB_GATT)
16#define PROV_BEARER_BUF_HEADROOM 5
18#define PROV_BEARER_BUF_HEADROOM 0
21enum prov_bearer_link_status {
22 PROV_BEARER_LINK_STATUS_SUCCESS,
23 PROV_BEARER_LINK_STATUS_TIMEOUT,
24 PROV_BEARER_LINK_STATUS_FAIL,
32 void (*link_opened)(
const struct prov_bearer *bearer,
void *cb_data);
34 void (*link_closed)(
const struct prov_bearer *bearer,
void *cb_data,
35 enum prov_bearer_link_status reason);
37 void (*error)(
const struct prov_bearer *bearer,
void *cb_data,
40 void (*recv)(
const struct prov_bearer *bearer,
void *cb_data,
44typedef void (*prov_bearer_send_complete_t)(
int err,
void *cb_data);
49 bt_mesh_prov_bearer_t
type;
72 int (*
send)(
struct os_mbuf *buf, prov_bearer_send_complete_t cb,
96 int (*
link_open)(
const uint8_t uuid[16], int32_t timeout,
112void pb_adv_init(
void);
113void pb_gatt_init(
void);
115void pb_adv_reset(
void);
116void pb_gatt_reset(
void);
Definition prov_bearer.h:30
Definition prov_bearer.h:47
bt_mesh_prov_bearer_t type
Definition prov_bearer.h:49
int(* link_open)(const uint8_t uuid[16], int32_t timeout, const struct prov_bearer_cb *cb, void *cb_data)
Open a new link as a provisioner.
Definition prov_bearer.h:96
int(* link_accept)(const struct prov_bearer_cb *cb, void *cb_data)
Enable link establishment as a provisionee.
Definition prov_bearer.h:61
int(* send)(struct os_mbuf *buf, prov_bearer_send_complete_t cb, void *cb_data)
Send a packet on an established link.
Definition prov_bearer.h:72
void(* link_close)(enum prov_bearer_link_status status)
Close the current link.
Definition prov_bearer.h:106
void(* clear_tx)(void)
Clear any ongoing transmissions, if possible.
Definition prov_bearer.h:80