Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
epacket_bt_central APIs

epacket_bt_central API More...

Data Structures

struct  epacket_bt_gatt_connect_params
 Parameters for epacket_bt_gatt_connect. More...

Macros

#define epacket_bt_central_frame   epacket_v0_versioned_frame_format

Functions

int epacket_bt_gatt_connect (struct bt_conn **conn, struct epacket_bt_gatt_connect_params *params, struct epacket_read_response *security, bool *already)
 Connect to a peer Infuse-IoT device via Bluetooth GATT.
void epacket_bt_gatt_notify_init (struct bt_conn *conn)
 Setup epacket_bt_gatt_notify_recv_func.
uint8_t epacket_bt_gatt_notify_recv_func (struct bt_conn *conn, struct bt_gatt_subscribe_params *params, const void *data, uint16_t length)
 Infuse-IoT Bluetooth GATT characteristic notification handle function.
void epacket_bt_gatt_rate_limit_request (uint8_t delay_ms)
 Send a epacket_rate_limit_req to all connected peer devices.
int epacket_bt_gatt_rate_throughput_request (struct bt_conn *conn, uint16_t throughput_kbps)
 Send a epacket_rate_throughput_req to a specific peer device.

Detailed Description

epacket_bt_central API

Macro Definition Documentation

◆ epacket_bt_central_frame

Function Documentation

◆ epacket_bt_gatt_connect()

int epacket_bt_gatt_connect ( struct bt_conn ** conn,
struct epacket_bt_gatt_connect_params * params,
struct epacket_read_response * security,
bool * already )

#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/epacket/interface/epacket_bt_central.h>

Connect to a peer Infuse-IoT device via Bluetooth GATT.

Note
If called multiple times on the same connection, the subscribe requests, inactivity and absolute timeout are updated on each call.
Parameters
connOutput connection object on success
paramsePacket connection parameters
securityOutput security parameters of the peer device on success
alreadyTrue if the connection already existed
Return values
0on success, *conn is valid
>0on HCI error, *conn is invalid
<0on Zephyr error, *conn is invalid

◆ epacket_bt_gatt_notify_init()

void epacket_bt_gatt_notify_init ( struct bt_conn * conn)

◆ epacket_bt_gatt_notify_recv_func()

uint8_t epacket_bt_gatt_notify_recv_func ( struct bt_conn * conn,
struct bt_gatt_subscribe_params * params,
const void * data,
uint16_t length )

#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/epacket/interface/epacket_bt_central.h>

Infuse-IoT Bluetooth GATT characteristic notification handle function.

Public API function so that connections setup through a function other than epacket_bt_gatt_connect can hook the connection up as an ePacket data source dynamically.

Note
Users must ensure that epacket_bt_gatt_notify_init is called before any data is received on the connection.
Parameters
connConnection object. May be NULL, indicating that the peer is being unpaired
paramsSubscription parameters.
dataAttribute value data. If NULL then subscription was removed.
lengthAttribute value length.
Returns
BT_GATT_ITER_CONTINUE to continue receiving value notifications. BT_GATT_ITER_STOP to unsubscribe from value notifications.

◆ epacket_bt_gatt_rate_limit_request()

void epacket_bt_gatt_rate_limit_request ( uint8_t delay_ms)

#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/epacket/interface/epacket_bt_central.h>

Send a epacket_rate_limit_req to all connected peer devices.

Parameters
delay_msDelay duration to request

◆ epacket_bt_gatt_rate_throughput_request()

int epacket_bt_gatt_rate_throughput_request ( struct bt_conn * conn,
uint16_t throughput_kbps )

#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/epacket/interface/epacket_bt_central.h>

Send a epacket_rate_throughput_req to a specific peer device.

Parameters
connConnection object
throughput_kbpsRequested throughput limit in kilobits/sec
Return values
0on success
-errnoon error