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

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

bluenrg1_hci_le.h
Go to the documentation of this file.
1 #ifndef __BLUENRG1_HCI_LE_H__
2 #define __BLUENRG1_HCI_LE_H__
3
4
25 #include "bluenrg1_types.h"
43 tBleStatus hci_disconnect(uint16_t Connection_Handle,
44 uint8_t Reason);
54 tBleStatus hci_read_remote_version_information(uint16_t Connection_Handle);
132 tBleStatus hci_set_event_mask(uint8_t Event_Mask[8]);
149 tBleStatus hci_reset(void);
166 tBleStatus hci_read_transmit_power_level(uint16_t Connection_Handle,
167 uint8_t Type,
168 uint8_t *Transmit_Power_Level);
186 tBleStatus hci_read_local_version_information(uint8_t *HCI_Version,
187 uint16_t *HCI_Revision,
188 uint8_t *LMP_PAL_Version,
189 uint16_t *Manufacturer_Name,
190 uint16_t *LMP_PAL_Subversion);
202 tBleStatus hci_read_local_supported_commands(uint8_t Supported_Commands[64]);
211 tBleStatus hci_read_local_supported_features(uint8_t LMP_Features[8]);
223 tBleStatus hci_read_bd_addr(uint8_t BD_ADDR[6]);
245 tBleStatus hci_read_rssi(uint16_t Connection_Handle,
246 uint8_t *RSSI);
267 tBleStatus hci_le_set_event_mask(uint8_t LE_Event_Mask[8]);
302 tBleStatus hci_le_read_buffer_size(uint16_t *HC_LE_ACL_Data_Packet_Length,
303 uint8_t *HC_Total_Num_LE_ACL_Data_Packets);
310 tBleStatus hci_le_read_local_supported_features(uint8_t LE_Features[8]);
318 tBleStatus hci_le_set_random_address(uint8_t Random_Address[6]);
382 tBleStatus hci_le_set_advertising_parameters(uint16_t Advertising_Interval_Min,
383 uint16_t Advertising_Interval_Max,
384 uint8_t Advertising_Type,
385 uint8_t Own_Address_Type,
386 uint8_t Direct_Address_Type,
387 uint8_t Direct_Address[6],
388 uint8_t Advertising_Channel_Map,
389 uint8_t Advertising_Filter_Policy);
400 tBleStatus hci_le_read_advertising_channel_tx_power(uint8_t *Transmit_Power_Level);
413 tBleStatus hci_le_set_advertising_data(uint8_t Advertising_Data_Length,
414 uint8_t Advertising_Data[31]);
427 tBleStatus hci_le_set_scan_response_data(uint8_t Scan_Response_Data_Length,
428 uint8_t Scan_Response_Data[31]);
445 tBleStatus hci_le_set_advertise_enable(uint8_t Advertising_Enable);
485 tBleStatus hci_le_set_scan_parameters(uint8_t LE_Scan_Type,
486 uint16_t LE_Scan_Interval,
487 uint16_t LE_Scan_Window,
488 uint8_t Own_Address_Type,
489 uint8_t Scanning_Filter_Policy);
505 tBleStatus hci_le_set_scan_enable(uint8_t LE_Scan_Enable,
506 uint8_t Filter_Duplicates);
563 tBleStatus hci_le_create_connection(uint16_t LE_Scan_Interval,
564 uint16_t LE_Scan_Window,
565 uint8_t Initiator_Filter_Policy,
566 uint8_t Peer_Address_Type,
567 uint8_t Peer_Address[6],
568 uint8_t Own_Address_Type,
569 uint16_t Conn_Interval_Min,
570 uint16_t Conn_Interval_Max,
571 uint16_t Conn_Latency,
572 uint16_t Supervision_Timeout,
573 uint16_t Minimum_CE_Length,
574 uint16_t Maximum_CE_Length);
584 tBleStatus hci_le_create_connection_cancel(void);
593 tBleStatus hci_le_read_white_list_size(uint8_t *White_List_Size);
605 tBleStatus hci_le_clear_white_list(void);
622 tBleStatus hci_le_add_device_to_white_list(uint8_t Address_Type,
623 uint8_t Address[6]);
640 tBleStatus hci_le_remove_device_from_white_list(uint8_t Address_Type,
641 uint8_t Address[6]);
694 tBleStatus hci_le_connection_update(uint16_t Connection_Handle,
695 uint16_t Conn_Interval_Min,
696 uint16_t Conn_Interval_Max,
697 uint16_t Conn_Latency,
698 uint16_t Supervision_Timeout,
699 uint16_t Minimum_CE_Length,
700 uint16_t Maximum_CE_Length);
722 tBleStatus hci_le_set_host_channel_classification(uint8_t LE_Channel_Map[5]);
741 tBleStatus hci_le_read_channel_map(uint16_t Connection_Handle,
742 uint8_t LE_Channel_Map[5]);
753 tBleStatus hci_le_read_remote_used_features(uint16_t Connection_Handle);
766 tBleStatus hci_le_encrypt(uint8_t Key[16],
767 uint8_t Plaintext_Data[16],
768 uint8_t Encrypted_Data[16]);
778 tBleStatus hci_le_rand(uint8_t Random_Number[8]);
800 tBleStatus hci_le_start_encryption(uint16_t Connection_Handle,
801 uint8_t Random_Number[8],
802 uint16_t Encrypted_Diversifier,
803 uint8_t Long_Term_Key[16]);
815 tBleStatus hci_le_long_term_key_request_reply(uint16_t Connection_Handle,
816 uint8_t Long_Term_Key[16]);
826 tBleStatus hci_le_long_term_key_requested_negative_reply(uint16_t Connection_Handle);
891 tBleStatus hci_le_read_supported_states(uint8_t LE_States[8]);
900 tBleStatus hci_le_receiver_test(uint8_t RX_Frequency);
923 tBleStatus hci_le_transmitter_test(uint8_t TX_Frequency,
924 uint8_t Length_Of_Test_Data,
925 uint8_t Packet_Payload);
935 tBleStatus hci_le_test_end(uint16_t *Number_Of_Packets);
939 #endif /* __BLUENRG1_HCI_LE_H__*/
hci_set_event_mask
tBleStatus hci_set_event_mask(uint8_t Event_Mask[8])
The Set_Event_Mask command is used to control which events are generated by the HCI for the Host...
hci_le_clear_white_list
tBleStatus hci_le_clear_white_list(void)
The LE_Clear_White_List command is used to clear the white list stored in the Controller. This command can be used at any time except when:
hci_le_set_advertising_parameters
tBleStatus hci_le_set_advertising_parameters(uint16_t Advertising_Interval_Min, uint16_t Advertising_Interval_Max, uint8_t Advertising_Type, uint8_t Own_Address_Type, uint8_t Direct_Address_Type, uint8_t Direct_Address[6], uint8_t Advertising_Channel_Map, uint8_t Advertising_Filter_Policy)
The LE_Set_Advertising_Parameters command is used by the Host to set the advertising parameters...
hci_le_start_encryption
tBleStatus hci_le_start_encryption(uint16_t Connection_Handle, uint8_t Random_Number[8], uint16_t Encrypted_Diversifier, uint8_t Long_Term_Key[16])
The LE_Start_Encryption command is used to authenticate the given encryption key associated with the ...
hci_read_local_supported_features
tBleStatus hci_read_local_supported_features(uint8_t LMP_Features[8])
This command requests a list of the supported features for the local Controller. This command will re...
hci_read_transmit_power_level
tBleStatus hci_read_transmit_power_level(uint16_t Connection_Handle, uint8_t Type, uint8_t *Transmit_Power_Level)
This command reads the values for the Transmit_Power_Level parameter for the specified Connection_Han...
hci_le_read_buffer_size
tBleStatus hci_le_read_buffer_size(uint16_t *HC_LE_ACL_Data_Packet_Length, uint8_t *HC_Total_Num_LE_ACL_Data_Packets)
The LE_Read_Buffer_Size command is used to read the maximum size of the data portion of HCI LE ACL Da...
hci_le_read_remote_used_features
tBleStatus hci_le_read_remote_used_features(uint16_t Connection_Handle)
This command requests a list of the used LE features from the remote device. This command shall retur...
hci_le_rand
tBleStatus hci_le_rand(uint8_t Random_Number[8])
The LE_Rand command is used to request the Controller to generate 8 octets of random data to be sent ...
hci_le_read_advertising_channel_tx_power
tBleStatus hci_le_read_advertising_channel_tx_power(uint8_t *Transmit_Power_Level)
The LE_Read_Advertising_Channel_Tx_Power command is used by the Host to read the transmit power level...
hci_reset
tBleStatus hci_reset(void)
The Reset command will reset the Link Layer on an LE Controller.
hci_le_set_scan_enable
tBleStatus hci_le_set_scan_enable(uint8_t LE_Scan_Enable, uint8_t Filter_Duplicates)
The LE_Set_Scan_Enable command is used to start scanning. Scanning is used to discover advertising de...
hci_le_create_connection_cancel
tBleStatus hci_le_create_connection_cancel(void)
The LE_Create_Connection_Cancel command is used to cancel the LE_Create_Connection command...
hci_le_set_random_address
tBleStatus hci_le_set_random_address(uint8_t Random_Address[6])
The LE_Set_Random_Address command is used by the Host to set the LE Random Device Address in the Cont...
hci_le_transmitter_test
tBleStatus hci_le_transmitter_test(uint8_t TX_Frequency, uint8_t Length_Of_Test_Data, uint8_t Packet_Payload)
This command is used to start a test where the DUT generates test reference packets at a fixed interv...
hci_le_read_channel_map
tBleStatus hci_le_read_channel_map(uint16_t Connection_Handle, uint8_t LE_Channel_Map[5])
The LE_Read_Channel_Map command returns the current Channel_Map for the specified Connection_Handle...
hci_le_create_connection
tBleStatus hci_le_create_connection(uint16_t LE_Scan_Interval, uint16_t LE_Scan_Window, uint8_t Initiator_Filter_Policy, 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)
TBD.
hci_le_test_end
tBleStatus hci_le_test_end(uint16_t *Number_Of_Packets)
This command is used to stop any test which is in progress. The Number_Of_Packets for a transmitter t...
hci_le_receiver_test
tBleStatus hci_le_receiver_test(uint8_t RX_Frequency)
This command is used to start a test where the DUT receives test reference packets at a fixed interva...
hci_le_long_term_key_requested_negative_reply
tBleStatus hci_le_long_term_key_requested_negative_reply(uint16_t Connection_Handle)
The LE_Long_Term_Key_Request_Negative_Reply command is used to reply to an LE Long Term Key Request e...
hci_le_encrypt
tBleStatus hci_le_encrypt(uint8_t Key[16], uint8_t Plaintext_Data[16], uint8_t Encrypted_Data[16])
The LE_Encrypt command is used to request the Controller to encrypt the Plaintext_Data in the command...
hci_le_set_event_mask
tBleStatus hci_le_set_event_mask(uint8_t LE_Event_Mask[8])
The LE_Set_Event_Mask command is used to control which LE events are generated by the HCI for the Hos...
hci_disconnect
tBleStatus hci_disconnect(uint16_t Connection_Handle, uint8_t Reason)
The hci_disconnect is used to terminate an existing connection. The Connection_Handle command paramet...
hci_le_remove_device_from_white_list
tBleStatus hci_le_remove_device_from_white_list(uint8_t Address_Type, uint8_t Address[6])
The LE_Remove_Device_From_White_List command is used to remove a single device from the white list st...
hci_le_add_device_to_white_list
tBleStatus hci_le_add_device_to_white_list(uint8_t Address_Type, uint8_t Address[6])
The LE_Add_Device_To_White_List command is used to add a single device to the white list stored in th...
hci_le_read_supported_states
tBleStatus hci_le_read_supported_states(uint8_t LE_States[8])
The LE_Read_Supported_States command reads the states and state combinations that the link layer supp...
hci_read_local_version_information
tBleStatus hci_read_local_version_information(uint8_t *HCI_Version, uint16_t *HCI_Revision, uint8_t *LMP_PAL_Version, uint16_t *Manufacturer_Name, uint16_t *LMP_PAL_Subversion)
This command reads the values for the version information for the local Controller. The HCI Version information defines the version information of the HCI layer. The LMP/PAL Version information defines the version of the LMP or PAL. The Manufacturer_Name information indicates the manufacturer of the local device. The HCI Revision and LMP/PAL Subversion are implementation dependent. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.4.1)
hci_le_set_advertising_data
tBleStatus hci_le_set_advertising_data(uint8_t Advertising_Data_Length, uint8_t Advertising_Data[31])
The LE_Set_Advertising_Data command is used to set the data used in advertising packets that have a d...
hci_le_read_white_list_size
tBleStatus hci_le_read_white_list_size(uint8_t *White_List_Size)
The LE_Read_White_List_Size command is used to read the total number of white list entries that can b...
hci_le_set_advertise_enable
tBleStatus hci_le_set_advertise_enable(uint8_t Advertising_Enable)
The LE_Set_Advertise_Enable command is used to request the Controller to start or stop advertising...
hci_read_bd_addr
tBleStatus hci_read_bd_addr(uint8_t BD_ADDR[6])
On an LE Controller, this command shall read the Public Device Address as defined in [Vol 6] Part B...
hci_le_set_host_channel_classification
tBleStatus hci_le_set_host_channel_classification(uint8_t LE_Channel_Map[5])
The LE_Set_Host_Channel_Classification command allows the Host to specify a channel classification fo...
hci_le_set_scan_parameters
tBleStatus hci_le_set_scan_parameters(uint8_t LE_Scan_Type, uint16_t LE_Scan_Interval, uint16_t LE_Scan_Window, uint8_t Own_Address_Type, uint8_t Scanning_Filter_Policy)
The LE_Set_Scan_Parameters command is used to set the scan parameters. The LE_Scan_Type parameter con...
hci_read_local_supported_commands
tBleStatus hci_read_local_supported_commands(uint8_t Supported_Commands[64])
This command reads the list of HCI commands supported for the local Controller. This command shall re...
hci_read_rssi
tBleStatus hci_read_rssi(uint16_t Connection_Handle, uint8_t *RSSI)
This command reads the Received Signal Strength Indication (RSSI) value from a Controller. For an LE transport, a Connection_Handle is used as the Handle command parameter and return parameter. The meaning of the RSSI metric is an absolute receiver signal strength value in dBm to +/- 6 dB accuracy. If the RSSI cannot be read, the RSSI metric shall be set to 127. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.5.4)
hci_le_connection_update
tBleStatus hci_le_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)
The LE_Connection_Update command is used to change the Link Layer connection parameters of a connecti...
hci_le_set_scan_response_data
tBleStatus hci_le_set_scan_response_data(uint8_t Scan_Response_Data_Length, uint8_t Scan_Response_Data[31])
This command is used to provide data used in Scanning Packets that have a data field. Only the significant part of the Scan_Response_Data is transmitted in the Scanning Packets, as defined in [Vol 3] Part C, Section 11. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.8)
hci_read_remote_version_information
tBleStatus hci_read_remote_version_information(uint16_t Connection_Handle)
This command will obtain the values for the version information for the remote device identified by t...
hci_le_long_term_key_request_reply
tBleStatus hci_le_long_term_key_request_reply(uint16_t Connection_Handle, uint8_t Long_Term_Key[16])
The LE_Long_Term_Key_Request_Reply command is used to reply to an LE Long Term Key Request event from...
hci_le_read_local_supported_features
tBleStatus hci_le_read_local_supported_features(uint8_t LE_Features[8])
This command requests the list of the supported LE features for the Controller. (See Bluetooth Specif...