| STM32L - BlueNRG-1 BLE stack APIs, Events and Constants

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

bluenrg1_gap_aci.h
Go to the documentation of this file.
1 #ifndef __BLUENRG1_GAP_ACI_H__
2 #define __BLUENRG1_GAP_ACI_H__
3
4
25 #include "bluenrg1_types.h"
27 typedef struct Whitelist_Entry_t_s {
28 uint8_t Peer_Address_Type ;
31 uint8_t Peer_Address[6] ;
33 } Whitelist_Entry_t;
35 typedef struct Bonded_Device_Entry_t_s {
36 uint8_t Address_Type ;
39 uint8_t Address[6] ;
41 } Bonded_Device_Entry_t;
47 tBleStatus aci_gap_set_non_discoverable(void);
114 tBleStatus aci_gap_set_limited_discoverable(uint8_t Advertising_Type,
115 uint16_t Advertising_Interval_Min,
116 uint16_t Advertising_Interval_Max,
117 uint8_t Own_Address_Type,
118 uint8_t Advertising_Filter_Policy,
119 uint8_t Local_Name_Length,
120 uint8_t Local_Name[],
121 uint8_t Service_Uuid_length,
122 uint8_t Service_Uuid_List[],
123 uint16_t Slave_Conn_Interval_Min,
124 uint16_t Slave_Conn_Interval_Max);
192 tBleStatus aci_gap_set_discoverable(uint8_t Advertising_Type,
193 uint16_t Advertising_Interval_Min,
194 uint16_t Advertising_Interval_Max,
195 uint8_t Own_Address_Type,
196 uint8_t Advertising_Filter_Policy,
197 uint8_t Local_Name_Length,
198 uint8_t Local_Name[],
199 uint8_t Service_Uuid_length,
200 uint8_t Service_Uuid_List[],
201 uint16_t Slave_Conn_Interval_Min,
202 uint16_t Slave_Conn_Interval_Max);
234 tBleStatus aci_gap_set_direct_connectable(uint8_t Own_Address_Type,
235 uint8_t Directed_Advertising_Type,
236 uint8_t Direct_Address_Type,
237 uint8_t Direct_Address[6],
238 uint16_t Advertising_Interval_Min,
239 uint16_t Advertising_Interval_Max);
252 tBleStatus aci_gap_set_io_capability(uint8_t IO_Capability);
275 tBleStatus aci_gap_set_authentication_requirement(uint8_t MITM_Mode,
276 uint8_t OOB_Enable,
277 uint8_t OOB_Data[16],
278 uint8_t Min_Encryption_Key_Size,
279 uint8_t Max_Encryption_Key_Size,
280 uint8_t Use_Fixed_Pin,
281 uint32_t Fixed_Pin,
282 uint8_t Bonding_Mode);
296 tBleStatus aci_gap_set_authorization_requirement(uint16_t Connection_Handle,
297 uint8_t Authorization_Enable);
308 tBleStatus aci_gap_pass_key_resp(uint16_t Connection_Handle,
309 uint32_t Pass_Key);
320 tBleStatus aci_gap_authorization_resp(uint16_t Connection_Handle,
321 uint8_t Authorize);
341 tBleStatus aci_gap_init(uint8_t Role,
342 uint8_t privacy_enabled,
343 uint8_t device_name_char_len,
344 uint16_t *Service_Handle,
345 uint16_t *Dev_Name_Char_Handle,
346 uint16_t *Appearance_Char_Handle);
361 tBleStatus aci_gap_set_non_connectable(uint8_t Advertising_Event_Type,
362 uint8_t Own_Address_Type);
378 tBleStatus aci_gap_set_undirected_connectable(uint8_t Adv_Filter_Policy,
379 uint8_t Own_Address_Type);
392 tBleStatus aci_gap_slave_security_req(uint16_t Connection_Handle,
393 uint8_t Bonding,
394 uint8_t MITM_Protection);
404 tBleStatus aci_gap_update_adv_data(uint8_t AdvDataLen,
405 uint8_t AdvData[]);
412 tBleStatus aci_gap_delete_ad_type(uint8_t ADType);
426 tBleStatus aci_gap_get_security_level(uint8_t *MITM_Mode,
427 uint8_t *Bonding_Mode,
428 uint8_t *OOB_Enable,
429 uint8_t *Passkey_required);
447 tBleStatus aci_gap_set_event_mask(uint16_t GAP_Evt_Mask);
454 tBleStatus aci_gap_configure_whitelist(void);
466 tBleStatus aci_gap_terminate(uint16_t Connection_Handle,
467 uint8_t Reason);
472 tBleStatus aci_gap_clear_security_db(void);
482 tBleStatus aci_gap_allow_rebond(uint16_t Connection_Handle);
512 tBleStatus aci_gap_start_limited_discovery_proc(uint16_t LE_Scan_Interval,
513 uint16_t LE_Scan_Window,
514 uint8_t Own_Address_Type,
515 uint8_t Filter_Duplicates);
542 tBleStatus aci_gap_start_general_discovery_proc(uint16_t LE_Scan_Interval,
543 uint16_t LE_Scan_Window,
544 uint8_t Own_Address_Type,
545 uint8_t Filter_Duplicates);
603 tBleStatus aci_gap_start_name_discovery_proc(uint16_t LE_Scan_Interval,
604 uint16_t LE_Scan_Window,
605 uint8_t Peer_Address_Type,
606 uint8_t Peer_Address[6],
607 uint8_t Own_Address_Type,
608 uint16_t Conn_Interval_Min,
609 uint16_t Conn_Interval_Max,
610 uint16_t Conn_Latency,
611 uint16_t Supervision_Timeout,
612 uint16_t Minimum_CE_Length,
613 uint16_t Maximum_CE_Length);
670 tBleStatus aci_gap_start_auto_connection_establish_proc(uint16_t LE_Scan_Interval,
671 uint16_t LE_Scan_Window,
672 uint8_t Own_Address_Type,
673 uint16_t Conn_Interval_Min,
674 uint16_t Conn_Interval_Max,
675 uint16_t Conn_Latency,
676 uint16_t Supervision_Timeout,
677 uint16_t Minimum_CE_Length,
678 uint16_t Maximum_CE_Length,
679 uint8_t Num_of_Whitelist_Entries,
680 Whitelist_Entry_t Whitelist_Entry[]);
719 tBleStatus aci_gap_start_general_connection_establish_proc(uint8_t LE_Scan_Type,
720 uint16_t LE_Scan_Interval,
721 uint16_t LE_Scan_Window,
722 uint8_t Own_Address_Type,
723 uint8_t Filter_Duplicates);
757 tBleStatus aci_gap_start_selective_connection_establish_proc(uint8_t LE_Scan_Type,
758 uint16_t LE_Scan_Interval,
759 uint16_t LE_Scan_Window,
760 uint8_t Own_Address_Type,
761 uint8_t Filter_Duplicates,
762 uint8_t Num_of_Whitelist_Entries,
763 Whitelist_Entry_t Whitelist_Entry[]);
824 tBleStatus aci_gap_create_connection(uint16_t LE_Scan_Interval,
825 uint16_t LE_Scan_Window,
826 uint8_t Peer_Address_Type,
827 uint8_t Peer_Address[6],
828 uint8_t Own_Address_Type,
829 uint16_t Conn_Interval_Min,
830 uint16_t Conn_Interval_Max,
831 uint16_t Conn_Latency,
832 uint16_t Supervision_Timeout,
833 uint16_t Minimum_CE_Length,
834 uint16_t Maximum_CE_Length);
849 tBleStatus aci_gap_terminate_gap_proc(uint8_t Procedure_Code);
887 tBleStatus aci_gap_start_connection_update(uint16_t Connection_Handle,
888 uint16_t Conn_Interval_Min,
889 uint16_t Conn_Interval_Max,
890 uint16_t Conn_Latency,
891 uint16_t Supervision_Timeout,
892 uint16_t Minimum_CE_Length,
893 uint16_t Maximum_CE_Length);
905 tBleStatus aci_gap_send_pairing_req(uint16_t Connection_Handle,
906 uint8_t Force_Rebond);
916 tBleStatus aci_gap_resolve_private_addr(uint8_t Address[6],
917 uint8_t Actual_Address[6]);
925 tBleStatus aci_gap_get_bonded_devices(uint8_t *Num_of_Addresses,
926 Bonded_Device_Entry_t Bonded_Device_Entry[]);
953 tBleStatus aci_gap_set_broadcast_mode(uint16_t Advertising_Interval_Min,
954 uint16_t Advertising_Interval_Max,
955 uint8_t Advertising_Type,
956 uint8_t Own_Address_Type,
957 uint8_t Adv_Data_Length,
958 uint8_t Adv_Data[],
959 uint8_t Num_of_Whitelist_Entries,
960 Whitelist_Entry_t Whitelist_Entry[]);
990 tBleStatus aci_gap_start_observation_proc(uint16_t LE_Scan_Interval,
991 uint16_t LE_Scan_Window,
992 uint8_t LE_Scan_Type,
993 uint8_t Own_Address_Type,
994 uint8_t Filter_Duplicates);
1005 tBleStatus aci_gap_is_device_bonded(uint8_t Peer_Address_Type,
1006 uint8_t Peer_Address[6]);
1010 #endif /* __BLUENRG1_GAP_ACI_H__*/
aci_gap_set_authentication_requirement
tBleStatus aci_gap_set_authentication_requirement(uint8_t MITM_Mode, uint8_t OOB_Enable, uint8_t OOB_Data[16], uint8_t Min_Encryption_Key_Size, uint8_t Max_Encryption_Key_Size, uint8_t Use_Fixed_Pin, uint32_t Fixed_Pin, uint8_t Bonding_Mode)
Set the authentication requirements for the device. If the OOB_Enable is set to 0, the following 16 octets of OOB_Data will be ignored on reception. This command has to be given only when the device is not in a connected state.
aci_gap_pass_key_resp
tBleStatus aci_gap_pass_key_resp(uint16_t Connection_Handle, uint32_t Pass_Key)
This command should be send by the host in response to aci_gap_pass_key_req_event event...
aci_gap_terminate
tBleStatus aci_gap_terminate(uint16_t Connection_Handle, uint8_t Reason)
Command the controller to terminate the connection. A hci_disconnection_complete_event event will be ...
Bonded_Device_Entry_t_s::Address
uint8_t Address[6]
Definition: bluenrg1_gap_aci.h:40
aci_gap_start_auto_connection_establish_proc
tBleStatus aci_gap_start_auto_connection_establish_proc(uint16_t LE_Scan_Interval, uint16_t LE_Scan_Window, uint8_t Own_Address_Type, uint16_t Conn_Interval_Min, uint16_t Conn_Interval_Max, uint16_t Conn_Latency, uint16_t Supervision_Timeout, uint16_t Minimum_CE_Length, uint16_t Maximum_CE_Length, uint8_t Num_of_Whitelist_Entries, Whitelist_Entry_t Whitelist_Entry[])
Start the auto connection establishment procedure. The devices specified are added to the white list ...
aci_gap_set_non_connectable
tBleStatus aci_gap_set_non_connectable(uint8_t Advertising_Event_Type, uint8_t Own_Address_Type)
Put the device into non connectable mode. This mode does not support connection. The privacy setting ...
aci_gap_delete_ad_type
tBleStatus aci_gap_delete_ad_type(uint8_t ADType)
This command can be used to delete the specified AD type from the advertisement data if present...
aci_gap_terminate_gap_proc
tBleStatus aci_gap_terminate_gap_proc(uint8_t Procedure_Code)
Terminate the specified GATT procedure. An aci_gap_proc_complete_event event is returned with the pro...
aci_gap_configure_whitelist
tBleStatus aci_gap_configure_whitelist(void)
Add addresses of bonded devices into the controller's whitelist. The command will return an error if ...
aci_gap_set_undirected_connectable
tBleStatus aci_gap_set_undirected_connectable(uint8_t Adv_Filter_Policy, uint8_t Own_Address_Type)
Put the device into undirected connectable mode. If privacy is enabled in the device, a resolvable private address is generated and used as the advertiser's address. If not, the address of the type specified in own_addr_type is used for advertising.
aci_gap_set_limited_discoverable
tBleStatus aci_gap_set_limited_discoverable(uint8_t Advertising_Type, uint16_t Advertising_Interval_Min, uint16_t Advertising_Interval_Max, uint8_t Own_Address_Type, uint8_t Advertising_Filter_Policy, uint8_t Local_Name_Length, uint8_t Local_Name[], uint8_t Service_Uuid_length, uint8_t Service_Uuid_List[], uint16_t Slave_Conn_Interval_Min, uint16_t Slave_Conn_Interval_Max)
Put the device in limited discoverable mode (as defined in Bluetooth Specification v...
aci_gap_set_authorization_requirement
tBleStatus aci_gap_set_authorization_requirement(uint16_t Connection_Handle, uint8_t Authorization_Enable)
Set the authorization requirements of the device. This command has to be given when connected to a de...
aci_gap_allow_rebond
tBleStatus aci_gap_allow_rebond(uint16_t Connection_Handle)
Allows the security manager to complete the pairing procedure and re-bond with the master...
aci_gap_start_general_discovery_proc
tBleStatus aci_gap_start_general_discovery_proc(uint16_t LE_Scan_Interval, uint16_t LE_Scan_Window, uint8_t Own_Address_Type, uint8_t Filter_Duplicates)
Start the general discovery procedure. The controller is commanded to start active scanning...
aci_gap_start_connection_update
tBleStatus aci_gap_start_connection_update(uint16_t Connection_Handle, uint16_t Conn_Interval_Min, uint16_t Conn_Interval_Max, uint16_t Conn_Latency, uint16_t Supervision_Timeout, uint16_t Minimum_CE_Length, uint16_t Maximum_CE_Length)
Start the connection update procedure (only when role is Master). A hci_le_connection_update is calle...
aci_gap_start_general_connection_establish_proc
tBleStatus aci_gap_start_general_connection_establish_proc(uint8_t LE_Scan_Type, uint16_t LE_Scan_Interval, uint16_t LE_Scan_Window, uint8_t Own_Address_Type, uint8_t Filter_Duplicates)
Start a general connection establishment procedure. The host enables scanning in the controller with ...
Bonded_Device_Entry_t
struct Bonded_Device_Entry_t_s Bonded_Device_Entry_t
aci_gap_update_adv_data
tBleStatus aci_gap_update_adv_data(uint8_t AdvDataLen, uint8_t AdvData[])
This command can be used to update the advertising data for a particular AD type. If the AD type spec...
aci_gap_set_non_discoverable
tBleStatus aci_gap_set_non_discoverable(void)
Put the device in non-discoverable mode. This command will disable the LL advertising and put the dev...
aci_gap_init
tBleStatus aci_gap_init(uint8_t Role, uint8_t privacy_enabled, uint8_t device_name_char_len, uint16_t *Service_Handle, uint16_t *Dev_Name_Char_Handle, uint16_t *Appearance_Char_Handle)
Initialize the GAP layer. Register the GAP service with the GATT. All the standard GAP characteristic...
aci_gap_send_pairing_req
tBleStatus aci_gap_send_pairing_req(uint16_t Connection_Handle, uint8_t Force_Rebond)
Send the SM pairing request to start a pairing process. The authentication requirements and IO capabi...
aci_gap_set_direct_connectable
tBleStatus aci_gap_set_direct_connectable(uint8_t Own_Address_Type, uint8_t Directed_Advertising_Type, uint8_t Direct_Address_Type, uint8_t Direct_Address[6], uint16_t Advertising_Interval_Min, uint16_t Advertising_Interval_Max)
Set the device in direct connectable mode (as defined in Bluetooth Specification v.4.1, Vol. 3, Part C, section 9.3.3). Device uses direct connectable mode to advertise using High Duty cycle advertisement events or Low Duty cycle advertisement events and the address as either what is specified in the Own Address Type parameter. The command specifies the type of the advertising used. If the privacy is enabled, the Type parameter in reconnection address is used for advertising, otherwise the address of the type specified in OwnAddrType is used. The device will be in directed connectable mode only for 1.28 seconds. If no connection is established within this duration, the device enters non discoverable mode and advertising will have to be again enabled explicitly. The controller generates a hci_le_connection_complete_event event with the status set to HCI_DIRECTED_ADV_TIMEOUT if the connection was not established and 0x00 if the connection was successfully established.
aci_gap_set_io_capability
tBleStatus aci_gap_set_io_capability(uint8_t IO_Capability)
Set the IO capabilities of the device. This command has to be given only when the device is not in a ...
Whitelist_Entry_t_s::Peer_Address_Type
uint8_t Peer_Address_Type
Definition: bluenrg1_gap_aci.h:30
aci_gap_start_observation_proc
tBleStatus aci_gap_start_observation_proc(uint16_t LE_Scan_Interval, uint16_t LE_Scan_Window, uint8_t LE_Scan_Type, uint8_t Own_Address_Type, uint8_t Filter_Duplicates)
Starts an Observation procedure, when the device is in Observer Role. The host enables scanning in th...
aci_gap_authorization_resp
tBleStatus aci_gap_authorization_resp(uint16_t Connection_Handle, uint8_t Authorize)
Authorize a device to access attributes. This command should be send by the host in response to aci_g...
aci_gap_set_discoverable
tBleStatus aci_gap_set_discoverable(uint8_t Advertising_Type, uint16_t Advertising_Interval_Min, uint16_t Advertising_Interval_Max, uint8_t Own_Address_Type, uint8_t Advertising_Filter_Policy, uint8_t Local_Name_Length, uint8_t Local_Name[], uint8_t Service_Uuid_length, uint8_t Service_Uuid_List[], uint16_t Slave_Conn_Interval_Min, uint16_t Slave_Conn_Interval_Max)
Put the device in general discoverable mode (as defined in Bluetooth Specification v...
aci_gap_resolve_private_addr
tBleStatus aci_gap_resolve_private_addr(uint8_t Address[6], uint8_t Actual_Address[6])
This command tries to resolve the address provided with the IRKs present in its database. If the address is resolved successfully with any one of the IRKs present in the database, it returns success and also the corresponding public/static random address stored with the IRK in the database.
aci_gap_get_security_level
tBleStatus aci_gap_get_security_level(uint8_t *MITM_Mode, uint8_t *Bonding_Mode, uint8_t *OOB_Enable, uint8_t *Passkey_required)
This command can be used to get the current security settings of the device.
Bonded_Device_Entry_t_s::Address_Type
uint8_t Address_Type
Definition: bluenrg1_gap_aci.h:38
aci_gap_start_name_discovery_proc
tBleStatus aci_gap_start_name_discovery_proc(uint16_t LE_Scan_Interval, uint16_t LE_Scan_Window, uint8_t Peer_Address_Type, uint8_t Peer_Address[6], uint8_t Own_Address_Type, uint16_t Conn_Interval_Min, uint16_t Conn_Interval_Max, uint16_t Conn_Latency, uint16_t Supervision_Timeout, uint16_t Minimum_CE_Length, uint16_t Maximum_CE_Length)
Start the name discovery procedure. A LE_Create_Connection call will be made to the controller by GAP...
aci_gap_create_connection
tBleStatus aci_gap_create_connection(uint16_t LE_Scan_Interval, uint16_t LE_Scan_Window, uint8_t Peer_Address_Type, uint8_t Peer_Address[6], uint8_t Own_Address_Type, uint16_t Conn_Interval_Min, uint16_t Conn_Interval_Max, uint16_t Conn_Latency, uint16_t Supervision_Timeout, uint16_t Minimum_CE_Length, uint16_t Maximum_CE_Length)
Start the direct connection establishment procedure. A LE_Create_Connection call will be made to the ...
Whitelist_Entry_t
struct Whitelist_Entry_t_s Whitelist_Entry_t
aci_gap_start_limited_discovery_proc
tBleStatus aci_gap_start_limited_discovery_proc(uint16_t LE_Scan_Interval, uint16_t LE_Scan_Window, uint8_t Own_Address_Type, uint8_t Filter_Duplicates)
Start the limited discovery procedure. The controller is commanded to start active scanning...
Whitelist_Entry_t_s
Definition: bluenrg1_gap_aci.h:27
aci_gap_set_event_mask
tBleStatus aci_gap_set_event_mask(uint16_t GAP_Evt_Mask)
It allows masking events from the GAP. The default configuration is all the events masked...
aci_gap_start_selective_connection_establish_proc
tBleStatus aci_gap_start_selective_connection_establish_proc(uint8_t LE_Scan_Type, uint16_t LE_Scan_Interval, uint16_t LE_Scan_Window, uint8_t Own_Address_Type, uint8_t Filter_Duplicates, uint8_t Num_of_Whitelist_Entries, Whitelist_Entry_t Whitelist_Entry[])
Start a selective connection establishment procedure. The GAP adds the specified device addresses int...
aci_gap_is_device_bonded
tBleStatus aci_gap_is_device_bonded(uint8_t Peer_Address_Type, uint8_t Peer_Address[6])
The command finds whether the device, whose address is specified in the command, is bonded...
aci_gap_clear_security_db
tBleStatus aci_gap_clear_security_db(void)
Clear the security database. All the devices in the security database will be removed.
Whitelist_Entry_t_s::Peer_Address
uint8_t Peer_Address[6]
Definition: bluenrg1_gap_aci.h:32
aci_gap_slave_security_req
tBleStatus aci_gap_slave_security_req(uint16_t Connection_Handle, uint8_t Bonding, uint8_t MITM_Protection)
Send a slave security request to the master. This command has to be issued to notify the master of th...
aci_gap_get_bonded_devices
tBleStatus aci_gap_get_bonded_devices(uint8_t *Num_of_Addresses, Bonded_Device_Entry_t Bonded_Device_Entry[])
This command gets the list of the devices which are bonded. It returns the number of addresses and th...
Bonded_Device_Entry_t_s
Definition: bluenrg1_gap_aci.h:35
aci_gap_set_broadcast_mode
tBleStatus aci_gap_set_broadcast_mode(uint16_t Advertising_Interval_Min, uint16_t Advertising_Interval_Max, uint8_t Advertising_Type, uint8_t Own_Address_Type, uint8_t Adv_Data_Length, uint8_t Adv_Data[], uint8_t Num_of_Whitelist_Entries, Whitelist_Entry_t Whitelist_Entry[])
This command puts the device into broadcast mode. A privacy enabled device uses either a resolvable p...