75 lines
2.1 KiB
C
75 lines
2.1 KiB
C
/* Bluetooth Mesh */
|
|
|
|
/*
|
|
* Copyright (c) 2017 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
typedef long ssize_t;
|
|
|
|
#define BT_MESH_PROXY_NET_PDU 0x00
|
|
#define BT_MESH_PROXY_BEACON 0x01
|
|
#define BT_MESH_PROXY_CONFIG 0x02
|
|
#define BT_MESH_PROXY_PROV 0x03
|
|
|
|
/** @def BT_UUID_MESH_PROV
|
|
* @brief Mesh Provisioning Service
|
|
*/
|
|
#define BT_UUID_MESH_PROV (0x1827)
|
|
/** @def BT_UUID_MESH_PROXY
|
|
* @brief Mesh Proxy Service
|
|
*/
|
|
#define BT_UUID_MESH_PROXY (0x1828)
|
|
/** @def BT_UUID_MESH_PROV_DATA_IN
|
|
* @brief Mesh Provisioning Data In
|
|
*/
|
|
#define BT_UUID_MESH_PROV_DATA_IN (0x2adb)
|
|
/** @def BT_UUID_MESH_PROV_DATA_OUT
|
|
* @brief Mesh Provisioning Data Out
|
|
*/
|
|
#define BT_UUID_MESH_PROV_DATA_OUT (0x2adc)
|
|
/** @def BT_UUID_MESH_PROXY_DATA_IN
|
|
* @brief Mesh Proxy Data In
|
|
*/
|
|
#define BT_UUID_MESH_PROXY_DATA_IN (0x2add)
|
|
/** @def BT_UUID_MESH_PROXY_DATA_OUT
|
|
* @brief Mesh Proxy Data Out
|
|
*/
|
|
#define BT_UUID_MESH_PROXY_DATA_OUT (0x2ade)
|
|
|
|
int bt_mesh_proxy_prov_enable(void);
|
|
int bt_mesh_proxy_prov_disable(bool);
|
|
|
|
int bt_mesh_proxy_gatt_enable(void);
|
|
int bt_mesh_proxy_gatt_disable(void);
|
|
void bt_mesh_proxy_gatt_disconnect(void);
|
|
|
|
void bt_mesh_proxy_beacon_send(struct bt_mesh_subnet *sub);
|
|
|
|
struct net_buf_simple *bt_mesh_proxy_get_buf(void);
|
|
|
|
void bt_mesh_proxy_identity_start(struct bt_mesh_subnet *sub);
|
|
void bt_mesh_proxy_identity_stop(struct bt_mesh_subnet *sub);
|
|
|
|
bool bt_mesh_proxy_relay(struct net_buf_simple *buf, u16_t dst);
|
|
void bt_mesh_proxy_addr_add(struct net_buf_simple *buf, u16_t addr);
|
|
|
|
int bt_mesh_proxy_send(struct bt_conn *conn, u8_t type,
|
|
struct net_buf_simple *msg);
|
|
|
|
int bt_mesh_proxy_init(void);
|
|
|
|
ssize_t proxy_recv(struct bt_conn *conn,
|
|
const void *buf,
|
|
u16_t len, u16_t offset, u8_t flags);
|
|
|
|
ssize_t prov_ccc_write(struct bt_conn *conn,
|
|
const void *buf, u16_t len,
|
|
u16_t offset, u8_t flags);
|
|
|
|
ssize_t proxy_ccc_write(struct bt_conn *conn,
|
|
const void *buf, u16_t len,
|
|
u16_t offset, u8_t flags);
|
|
|