Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
epacket_bt_central.h
Go to the documentation of this file.
1
10#ifndef INFUSE_SDK_INCLUDE_INFUSE_EPACKET_INTERFACE_EPACKET_BT_CENTRAL_H_
11#define INFUSE_SDK_INCLUDE_INFUSE_EPACKET_INTERFACE_EPACKET_BT_CENTRAL_H_
12
13#include <stdint.h>
14#include <stdbool.h>
15
16#include <zephyr/toolchain.h>
17#include <zephyr/bluetooth/conn.h>
18#include <zephyr/bluetooth/gatt.h>
19
22
23#ifdef __cplusplus
24extern "C" {
25
26#endif
27
34#define epacket_bt_central_frame epacket_v0_versioned_frame_format
35
38 /* Connection parameters to setup connection with */
39 struct bt_le_conn_param conn_params;
40 /* Peer device to connect to */
41 bt_addr_le_t peer;
42 /* Automatically disconnect if no data sent or received on the command or data
43 * characteristics for this long. K_FOREVER to disable.
44 */
45 k_timeout_t inactivity_timeout;
46 /* Unconditionally terminate the connection after this long. K_FOREVER to disable. */
47 k_timeout_t absolute_timeout;
48 /* Duration to wait while attempting to setup connection */
50 /* Preferred PHY of the connection (BT_GAP_LE_PHY_*) */
52 /* Subscribe to the command characteristic */
54 /* Subscribe to the data characteristic */
56 /* Subscribe to the logging characteristic */
58};
59
74int epacket_bt_gatt_connect(struct bt_conn **conn, struct epacket_bt_gatt_connect_params *params,
75 struct epacket_read_response *security);
76
93uint8_t epacket_bt_gatt_notify_recv_func(struct bt_conn *conn,
94 struct bt_gatt_subscribe_params *params, const void *data,
95 uint16_t length);
96
103
113int epacket_bt_gatt_rate_throughput_request(struct bt_conn *conn, uint16_t throughput_kbps);
114
119#ifdef __cplusplus
120}
121#endif
122
123#endif /* INFUSE_SDK_INCLUDE_INFUSE_EPACKET_INTERFACE_EPACKET_BT_CENTRAL_H_ */
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)
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_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:37
struct bt_le_conn_param conn_params
Definition epacket_bt_central.h:39
uint32_t conn_timeout_ms
Definition epacket_bt_central.h:49
uint8_t preferred_phy
Definition epacket_bt_central.h:51
k_timeout_t absolute_timeout
Definition epacket_bt_central.h:47
bool subscribe_logging
Definition epacket_bt_central.h:57
bool subscribe_commands
Definition epacket_bt_central.h:53
bool subscribe_data
Definition epacket_bt_central.h:55
bt_addr_le_t peer
Definition epacket_bt_central.h:41
k_timeout_t inactivity_timeout
Definition epacket_bt_central.h:45
Response to read requests on both the Command and Data characteristics.
Definition epacket_bt.h:48