10#ifndef INFUSE_SDK_INCLUDE_INFUSE_EPACKET_INTERFACE_EPACKET_BT_CENTRAL_H_
11#define INFUSE_SDK_INCLUDE_INFUSE_EPACKET_INTERFACE_EPACKET_BT_CENTRAL_H_
16#include <zephyr/toolchain.h>
17#include <zephyr/bluetooth/conn.h>
18#include <zephyr/bluetooth/gatt.h>
36#define epacket_bt_central_frame epacket_v0_versioned_frame_format
118 struct bt_gatt_subscribe_params *params,
const void *data,
Common packet structures.
ePacket defines for Bluetooth
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.
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_notify_init(struct bt_conn *conn)
Setup epacket_bt_gatt_notify_recv_func.
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.
Parameters for epacket_bt_gatt_connect.
Definition epacket_bt_central.h:39
struct bt_le_conn_param conn_params
Connection parameters to setup connection with.
Definition epacket_bt_central.h:41
uint32_t conn_timeout_ms
Duration to wait while attempting to setup connection.
Definition epacket_bt_central.h:51
uint8_t preferred_phy
Preferred PHY of the connection (BT_GAP_LE_PHY_*)
Definition epacket_bt_central.h:53
k_timeout_t absolute_timeout
Unconditionally terminate the connection after this long.
Definition epacket_bt_central.h:49
bool subscribe_logging
Subscribe to the logging characteristic.
Definition epacket_bt_central.h:59
bool wait_subscriptions
Wait until subscriptions apply to return.
Definition epacket_bt_central.h:63
bool subscribe_commands
Subscribe to the command characteristic.
Definition epacket_bt_central.h:55
bool existing_only
Only reuse an existing connection; return -ENOTCONN rather than creating one.
Definition epacket_bt_central.h:65
bool subscribe_data
Subscribe to the data characteristic.
Definition epacket_bt_central.h:57
bt_addr_le_t peer
Peer device to connect to.
Definition epacket_bt_central.h:43
bool subscribe_cloud_uplink
Subscribe to the cloud uplink characteristic.
Definition epacket_bt_central.h:61
k_timeout_t inactivity_timeout
Automatically disconnect if no data sent or received on the command or data characteristics for this ...
Definition epacket_bt_central.h:47
Response to read requests on both the Command and Data characteristics.
Definition epacket_bt.h:62