Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
|
Data Structures | |
struct | bt_gatt_remote_char |
Remote GATT Characteristic information. More... | |
struct | bt_conn_auto_setup_cb |
Parameters for automatically setup connection. More... | |
struct | bt_conn_auto_database_cache |
Database cache to speed up repeat connections. More... | |
struct | bt_conn_auto_discovery |
Characteristics to discover on the connection. More... | |
Macros | |
#define | BT_CONN_AUTO_CACHE(name, num_characteristics) |
Create a cache variable that holds a given number of characteristics. | |
Functions | |
void | bt_conn_le_auto_setup (struct bt_conn *conn, struct bt_conn_auto_discovery *discovery, const struct bt_conn_auto_setup_cb *callbacks, uint8_t preferred_phy) |
Setup a connection with automatic MTU exchange and characteristic discovery. | |
int | bt_conn_disconnect_sync (struct bt_conn *conn) |
Trigger a disconnection and wait for it to complete. | |
int | bt_conn_disconnect_wait (struct bt_conn *conn, k_timeout_t timeout) |
Wait for a connection to disconnect, without initiating it. | |
int8_t | bt_conn_rssi (struct bt_conn *conn) |
Get last measured RSSI on a connection. | |
void | bt_conn_rssi_log (struct bt_conn *conn, uint8_t tdf_loggers) |
Start logging the RSSI of the connection. | |
#define BT_CONN_AUTO_CACHE | ( | name, | |
num_characteristics ) |
#include <infuse/bluetooth/gatt.h>
Create a cache variable that holds a given number of characteristics.
name | Name of the created variable |
num_characteristics | Number of characteristics cache can hold |
int bt_conn_disconnect_sync | ( | struct bt_conn * | conn | ) |
#include <infuse/bluetooth/gatt.h>
Trigger a disconnection and wait for it to complete.
conn | Connection object to disconnect |
0 | on success |
-errno | Error code bt_conn_disconnect |
int bt_conn_disconnect_wait | ( | struct bt_conn * | conn, |
k_timeout_t | timeout ) |
#include <infuse/bluetooth/gatt.h>
Wait for a connection to disconnect, without initiating it.
conn | Connection object to wait for |
timeout | Duration to wait for |
0 | on success |
-errno | Error code bt_conn_disconnect |
void bt_conn_le_auto_setup | ( | struct bt_conn * | conn, |
struct bt_conn_auto_discovery * | discovery, | ||
const struct bt_conn_auto_setup_cb * | callbacks, | ||
uint8_t | preferred_phy ) |
#include <infuse/bluetooth/gatt.h>
Setup a connection with automatic MTU exchange and characteristic discovery.
This should be called immediately following bt_conn_le_create to ensure that the context is setup correctly by the time the connection establishes.
conn | Connection object allocated by bt_conn_le_create |
discovery | Characteristic discovery configuration |
callbacks | Callbacks to call on connection/disconnection |
preferred_phy | Bitmask of preferred PHYs to use for the connection BT_GAP_LE_PHY_* |
int8_t bt_conn_rssi | ( | struct bt_conn * | conn | ) |
#include <infuse/bluetooth/gatt.h>
Get last measured RSSI on a connection.
conn | Bluetooth connection to query |
void bt_conn_rssi_log | ( | struct bt_conn * | conn, |
uint8_t | tdf_loggers ) |
#include <infuse/bluetooth/gatt.h>
Start logging the RSSI of the connection.
This state only persists until the connection is lost. This function must therefore be called each time the connection is established.
conn | Bluetooth connection to log |
tdf_loggers | TDF loggers to log RSSI to |