kindlebt
Bluetooth functionality for Kindle 11th gen and up
Loading...
Searching...
No Matches
kindlebt.h File Reference

Detailed Description

Bluetooth library for Kindles.

This will be the entrypoint to the library and where all the Bluetooth functionality will be exposed.

As an application, you should generally just need to include this file.

Definition in file kindlebt.h.

Go to the source code of this file.

Functions

bool isBLESupported (void)
 Is BLE supported by the hardware Bluetooth adapter.
 
status_t enableRadio (sessionHandle session_handle)
 Turn on the Bluetooth radio.
 
status_t disableRadio (sessionHandle session_handle)
 Turn off the Bluetooth radio.
 
status_t getRadioState (state_t *p_out_state)
 Get current radio status.
 
sessionType_t getSupportedSession (void)
 Gets the supported Bluetooth session type (Classic, BLE, Dual).
 
status_t openSession (sessionType_t session_type, sessionHandle *session_handle)
 Open a Bluetooth session.
 
status_t closeSession (sessionHandle session_handle)
 Close a Bluetooth session.
 
status_t bleRegister (sessionHandle session_handle)
 Register as BLE client.
 
status_t bleDeregister (sessionHandle session_handle)
 Deregister as BLE client.
 
status_t bleRegisterGattClient (sessionHandle session_handle, bleGattClientCallbacks_t *callbacks)
 Register as a BLE GATT Client.
 
status_t bleDeregisterGattClient (sessionHandle session_handle)
 Deregister as a BLE GATT Client.
 
status_t bleDiscoverAllServices (sessionHandle session_handle, bleConnHandle conn_handle)
 Discover all services of a remote GATT Server.
 
status_t bleGetDatabase (bleConnHandle conn_handle, bleGattsService_t *p_gatt_service)
 Retrieve all services of a remote GATT Server.
 
status_t bleConnect (sessionHandle session_handle, bleConnHandle *conn_handle, bdAddr_t *p_device, bleConnParam_t conn_param, bleConnRole_t conn_role, bleConnPriority_t conn_priority)
 Connect to a BLE device.
 
status_t bleDisconnect (bleConnHandle conn_handle)
 Disconnect from a BLE device.
 
status_t bleReadCharacteristic (sessionHandle session_handle, bleConnHandle conn_handle, bleGattCharacteristicsValue_t chars_value)
 Read a Characteristic from a BLE device.
 
status_t bleWriteCharacteristic (sessionHandle session_handle, bleConnHandle conn_handle, bleGattCharacteristicsValue_t *chars_value, responseType_t request_type)
 Write a Characteristic from a BLE device.
 
status_t bleWriteDescriptor (sessionHandle session_handle, bleConnHandle conn_handle, bleGattCharacteristicsValue_t *chars_value, responseType_t request_type)
 Write a Characteristic Descriptor from a BLE device.
 
status_t bleSetNotification (sessionHandle session_handle, bleConnHandle conn_handle, bleGattCharacteristicsValue_t chars_value, bool enable)
 Set notifications on a Characteristic from a BLE device.
 
status_t bleCloneGattService (bleGattsService_t **dst_gatt_service, const bleGattsService_t *src_gatt_service, int no_svc)
 [Internal] Clone a GATT Service
 

Function Documentation

◆ bleCloneGattService()

status_t bleCloneGattService ( bleGattsService_t ** dst_gatt_service,
const bleGattsService_t * src_gatt_service,
int no_svc )

[Internal] Clone a GATT Service

Warning
As an application you shouldn't need to use this function. It is used by bleGetDatabase in the background.

Definition at line 117 of file kindlebt.c.