BlueNRG-MS pack for STM32CubeMX: hci/controller/bluenrg_gatt_aci.c File Reference

STM32CubeMX BlueNRG-MS

BlueNRG-MS pack for STM32CubeMX  V4.4.0
The BlueNRG-MS pack is an additional software for STM32CubeMX.
bluenrg_gatt_aci.c File Reference
#include "bluenrg_types.h" #include "bluenrg_def.h"
#include "hci_const.h"
#include "bluenrg_aci_const.h"
#include "bluenrg_gatt_aci.h"
#include "bluenrg_gatt_server.h"
#include "bluenrg_gap.h"

Macros

#define MIN(a, b)   ((a) < (b) )? (a) : (b)
 
#define MAX(a, b)   ((a) > (b) )? (a) : (b)
 

Functions

tBleStatus aci_gatt_init (void)
 Initialize the GATT layer for server and client roles. More...
 
tBleStatus aci_gatt_add_serv (uint8_t service_uuid_type, const uint8_t *service_uuid, uint8_t service_type, uint8_t max_attr_records, uint16_t *serviceHandle)
 Add a service to the GATT Server. When a service is created in the server, the Host needs to reserve the handle ranges for this service using max_attr_records parameter. This parameter specifies the maximum number of attribute records that can be added to this service (including the service attribute, include attribute, characteristic attribute, characteristic value attribute and characteristic descriptor attribute). Handle of the created service is returned. More...
 
tBleStatus aci_gatt_include_service (uint16_t service_handle, uint16_t included_start_handle, uint16_t included_end_handle, uint8_t included_uuid_type, const uint8_t *included_uuid, uint16_t *included_handle)
 Include a service given by included_start_handle and included_end_handle to another service given by service_handle. Attribute server creates an INCLUDE definition attribute and return the handle of this attribute in included_handle. More...
 
tBleStatus aci_gatt_add_char (uint16_t serviceHandle, uint8_t charUuidType, const uint8_t *charUuid, uint8_t charValueLen, uint8_t charProperties, uint8_t secPermissions, uint8_t gattEvtMask, uint8_t encryKeySize, uint8_t isVariable, uint16_t *charHandle)
 Add a characteristic to a service. More...
 
tBleStatus aci_gatt_add_char_desc (uint16_t serviceHandle, uint16_t charHandle, uint8_t descUuidType, const uint8_t *uuid, uint8_t descValueMaxLen, uint8_t descValueLen, const void *descValue, uint8_t secPermissions, uint8_t accPermissions, uint8_t gattEvtMask, uint8_t encryKeySize, uint8_t isVariable, uint16_t *descHandle)
 
tBleStatus aci_gatt_update_char_value (uint16_t servHandle, uint16_t charHandle, uint8_t charValOffset, uint8_t charValueLen, const void *charValue)
 Update a characteristic value in a service. More...
 
tBleStatus aci_gatt_del_char (uint16_t servHandle, uint16_t charHandle)
 Delete the specified characteristic from the service. More...
 
tBleStatus aci_gatt_del_service (uint16_t servHandle)
 Delete the specified service from the GATT server database. More...
 
tBleStatus aci_gatt_del_include_service (uint16_t servHandle, uint16_t includeServHandle)
 Delete the Include definition from the service. More...
 
tBleStatus aci_gatt_set_event_mask (uint32_t event_mask)
 
tBleStatus aci_gatt_exchange_configuration (uint16_t conn_handle)
 Perform an ATT MTU exchange procedure. More...
 
tBleStatus aci_att_find_information_req (uint16_t conn_handle, uint16_t start_handle, uint16_t end_handle)
 Send a Find Information Request. More...
 
tBleStatus aci_att_find_by_type_value_req (uint16_t conn_handle, uint16_t start_handle, uint16_t end_handle, uint8_t *uuid, uint8_t attr_val_len, uint8_t *attr_val)
 Send a Find By Type Value Request. More...
 
tBleStatus aci_att_read_by_type_req (uint16_t conn_handle, uint16_t start_handle, uint16_t end_handle, uint8_t uuid_type, uint8_t *uuid)
 Send a Read By Type Request. More...
 
tBleStatus aci_att_read_by_group_type_req (uint16_t conn_handle, uint16_t start_handle, uint16_t end_handle, uint8_t uuid_type, uint8_t *uuid)
 Send a Read By Group Type Request. More...
 
tBleStatus aci_att_prepare_write_req (uint16_t conn_handle, uint16_t attr_handle, uint16_t value_offset, uint8_t attr_val_len, uint8_t *attr_val)
 Send a Prepare Write Request. More...
 
tBleStatus aci_att_execute_write_req (uint16_t conn_handle, uint8_t execute)
 Send an Execute Write Request. More...
 
tBleStatus aci_gatt_disc_all_prim_services (uint16_t conn_handle)
 This command will start the GATT client procedure to discover all primary services on the server. More...
 
tBleStatus aci_gatt_disc_prim_service_by_uuid (uint16_t conn_handle, uint8_t uuid_type, uint8_t *uuid)
 Start the procedure to discover the primary services of the specified UUID on the server. More...
 
tBleStatus aci_gatt_find_included_services (uint16_t conn_handle, uint16_t start_service_handle, uint16_t end_service_handle)
 Start the procedure to find all included services. More...
 
tBleStatus aci_gatt_disc_all_charac_of_serv (uint16_t conn_handle, uint16_t start_attr_handle, uint16_t end_attr_handle)
 Start the procedure to discover all the characteristics of a given service. More...
 
tBleStatus aci_gatt_disc_charac_by_uuid (uint16_t conn_handle, uint16_t start_handle, uint16_t end_handle, uint8_t charUuidType, const uint8_t *charUuid)
 Start the procedure to discover all the characteristics specified by a UUID. More...
 
tBleStatus aci_gatt_disc_all_charac_descriptors (uint16_t conn_handle, uint16_t char_val_handle, uint16_t char_end_handle)
 Start the procedure to discover all characteristic descriptors on the server. More...
 
tBleStatus aci_gatt_read_charac_val (uint16_t conn_handle, uint16_t attr_handle)
 Start the procedure to read the attribute value. More...
 
tBleStatus aci_gatt_read_using_charac_uuid (uint16_t conn_handle, uint16_t start_handle, uint16_t end_handle, uint8_t uuid_type, uint8_t *uuid)
 Start the procedure to read all the characteristics specified by the UUID. More...
 
tBleStatus aci_gatt_read_long_charac_val (uint16_t conn_handle, uint16_t attr_handle, uint16_t val_offset)
 Start the procedure to read a long characteristic value. More...
 
tBleStatus aci_gatt_read_multiple_charac_val (uint16_t conn_handle, uint8_t num_handles, uint8_t *set_of_handles)
 Start a procedure to read multiple characteristic values from a server. More...
 
tBleStatus aci_gatt_write_charac_value (uint16_t conn_handle, uint16_t attr_handle, uint8_t value_len, uint8_t *attr_value)
 Start the procedure to write a characteristic value. More...
 
tBleStatus aci_gatt_write_long_charac_val (uint16_t conn_handle, uint16_t attr_handle, uint16_t val_offset, uint8_t val_len, const uint8_t *attr_val)
 Start the procedure to write a long characteristic value. More...
 
tBleStatus aci_gatt_write_charac_reliable (uint16_t conn_handle, uint16_t attr_handle, uint16_t val_offset, uint8_t val_len, uint8_t *attr_val)
 Start the procedure to write a characteristic reliably. More...
 
tBleStatus aci_gatt_write_long_charac_desc (uint16_t conn_handle, uint16_t attr_handle, uint16_t val_offset, uint8_t val_len, uint8_t *attr_val)
 Start the procedure to write a long characteristic descriptor. More...
 
tBleStatus aci_gatt_read_long_charac_desc (uint16_t conn_handle, uint16_t attr_handle, uint16_t val_offset)
 Start the procedure to read a long characteristic value. More...
 
tBleStatus aci_gatt_write_charac_descriptor (uint16_t conn_handle, uint16_t attr_handle, uint8_t value_len, uint8_t *attr_value)
 Start the procedure to write a characteristic descriptor. More...
 
tBleStatus aci_gatt_read_charac_desc (uint16_t conn_handle, uint16_t attr_handle)
 Start the procedure to read the descriptor specified. More...
 
tBleStatus aci_gatt_write_without_response (uint16_t conn_handle, uint16_t attr_handle, uint8_t val_len, const uint8_t *attr_val)
 Start the procedure to write a characteristic value without waiting for any response from the server. More...
 
tBleStatus aci_gatt_signed_write_without_resp (uint16_t conn_handle, uint16_t attr_handle, uint8_t val_len, uint8_t *attr_val)
 Start a signed write without response from the server. More...
 
tBleStatus aci_gatt_confirm_indication (uint16_t conn_handle)
 Confirm an indication. More...
 
tBleStatus aci_gatt_write_response (uint16_t conn_handle, uint16_t attr_handle, uint8_t write_status, uint8_t err_code, uint8_t att_val_len, uint8_t *att_val)
 Allow or reject a write request from a client. More...
 
tBleStatus aci_gatt_allow_read (uint16_t conn_handle)
 Allow the GATT server to send a response to a read request from a client. More...
 
tBleStatus aci_gatt_set_security_permission (uint16_t service_handle, uint16_t attr_handle, uint8_t security_permission)
 Set the security permission for the attribute handle specified. More...
 
tBleStatus aci_gatt_set_desc_value (uint16_t servHandle, uint16_t charHandle, uint16_t charDescHandle, uint16_t charDescValOffset, uint8_t charDescValueLen, const void *charDescValue)
 This command sets the value of the descriptor specified by charDescHandle. More...
 
tBleStatus aci_gatt_read_handle_value (uint16_t attr_handle, uint16_t data_len, uint16_t *data_len_out_p, uint8_t *data)
 Reads the value of the attribute handle specified from the local GATT database. More...
 
tBleStatus aci_gatt_read_handle_value_offset_IDB05A1 (uint16_t attr_handle, uint8_t offset, uint16_t data_len, uint16_t *data_len_out_p, uint8_t *data)
 Reads the value of the attribute handle specified from the local GATT database, starting from a given offset. More...
 
tBleStatus aci_gatt_update_char_value_ext_IDB05A1 (uint16_t service_handle, uint16_t char_handle, uint8_t update_type, uint16_t char_length, uint16_t value_offset, uint8_t value_length, const uint8_t *value)
 Update the value of a characteristic and sends notifications or indications. More...
 

Macro Definition Documentation

◆ MAX

#define MAX (   a,
 
)    ((a) > (b) )? (a) : (b)

◆ MIN

#define MIN (   a,
 
)    ((a) < (b) )? (a) : (b)
Generated on Mon Apr 15 2019 18:10:39 for BlueNRG-MS pack for STM32CubeMX by   doxygen 1.8.13