| BlueNRG-1 ACI APIs and events callbacks

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

Classes | Typedefs | Functions
bluenrg1_api.h File Reference

Header file for BlueNRG-1 Bluetooth Low Energy stack APIs. More...

`#include <stdint.h>`

Go to the source code of this file.

## Classes

struct | Whitelist_Entry_t_s
struct | Bonded_Device_Entry_t_s
union | Service_UUID_t_s
union | Include_UUID_t_s
union | Char_UUID_t_s
union | Char_Desc_Uuid_t_s
union | UUID_t_s
struct | Handle_Entry_t_s

## Typedefs

typedef struct Whitelist_Entry_t_s | Whitelist_Entry_t
typedef struct Bonded_Device_Entry_t_s | Bonded_Device_Entry_t
typedef union Service_UUID_t_s | Service_UUID_t
typedef union Include_UUID_t_s | Include_UUID_t
typedef union Char_UUID_t_s | Char_UUID_t
typedef union Char_Desc_Uuid_t_s | Char_Desc_Uuid_t
typedef union UUID_t_s | UUID_t
typedef struct Handle_Entry_t_s | Handle_Entry_t
typedef uint8_t | tBleStatus

## Functions

tBleStatus | hci_disconnect (uint16_t Connection_Handle, uint8_t Reason)
| The hci_disconnect is used to terminate an existing connection. The Connection_Handle command parameter indicates which connection is to be disconnected. The Reason command parameter indicates the reason for ending the connection. The remote Controller will receive the Reason command parameter in the hci_disconnection_complete_event event. All synchronous connections on a physical link should be disconnected before the ACL connection on the same physical connection is disconnected. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.1.6) It is important to leave an 100 ms blank window before sending any new command (including system hardware reset), since immediately after hci_disconnection_complete_event event, system could save important information in non volatile memory. More...
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 the Connection_Handle parameter. The Connection_Handle must be a Connection_Handle for an ACL or LE connection. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.1.23) More...
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. More...
tBleStatus | hci_reset (void)
| The Reset command will reset the Link Layer on an LE Controller. More...
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_Handle. The Connection_Handle shall be a Connection_Handle for an ACL connection. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.3.35) More...
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) More...
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 return the Supported_Commands configuration parameter. It is implied that if a command is listed as supported, the feature underlying that command is also supported. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.4.2) More...
tBleStatus | hci_read_local_supported_features (uint8_t LMP_Features[8])
| This command requests a list of the supported features for the local BR/EDR Controller. This command will return a list of the LMP features. For details see Part C, Link Manager Protocol Specification on page 227. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.4.3) More...
tBleStatus | hci_read_bd_addr (uint8_t BD_ADDR[6])
| On a BR/EDR Controller, this command reads the Bluetooth Controller address (BD_ADDR). See the Part B, Baseband Specification on page 59 for details of how BD_ADDR is used (see [Vol 3] Part C, Section 3.2.1). On an LE Controller, this command shall read the Public Device Address as defined in [Vol 6] Part B, Section 1.3, Device Address. If this Controller does not have a Public Device Address, the value 0x000000000000 shall be returned. On a BR/EDR/LE Controller, the public address shall be the same as the BD_ADDR. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.3.2) More...
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 a BR/EDR Controller, a Connection_Handle is used as the Handle command parameter and return parameter. The RSSI parameter returns the difference between the measured Received Signal Strength Indication (RSSI) and the limits of the Golden Receive Power Range for a Connection Handle to another BR/EDR Controller. The Connection_Handle must be a Connection_Handle for an ACL connection. Any positive RSSI value returned by the Controller indicates how many dB the RSSI is above the upper limit, any negative value indicates how many dB the RSSI is below the lower limit. The value zero indicates that the RSSI is inside the Golden Receive Power Range. Note: How accurate the dB values will be depends on the Bluetooth hardware. The only requirements for the hardware are that the BR/EDR Controller is able to tell whether the RSSI is inside, above or below the Golden Device Power Range. The RSSI measurement compares the received signal power with two threshold levels, which define the Golden Receive Power Range. The lower threshold level corresponds to a received power between -56 dBm and 6 dB above the actual sensitivity of the receiver. The upper threshold level is 20 dB above the lower threshold level to an accuracy of +/- 6 dB. For an AMP Controller, a Physical_Link_Handle is used for the Handle command parameter and return parameter. The meaning of the RSSI metric is AMP type specific and defined in the AMP PALs (see Volume 5, Core System Package [AMP Controller volume]). 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) More...
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 Host. If the bit in the LE_Event_Mask is set to a one, then the event associated with that bit will be enabled. The Host has to deal with each event that is generated by an LE Controller. The event mask allows the Host to control which events will interrupt it. For LE events to be generated, the LE Meta-Event bit in the Event_Mask shall also be set. If that bit is not set, then LE events shall not be generated, regardless of how the LE_Event_Mask is set. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.1) More...
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 Data Packets sent from the Host to the Controller. The Host will segment the data transmitted to the Controller according to these values, so that the HCI Data Packets will contain data with up to this size. The LE_Read_Buffer_Size command also returns the total number of HCI LE ACL Data Packets that can be stored in the data buffers of the Controller. The LE_Read_Buffer_Size command must be issued by the Host before it sends any data to an LE Controller (see Section 4.1.1). If the Controller returns a length value of zero, the Host shall use the Read_Buffer_Size command to determine the size of the data buffers (shared between BR/EDR and LE transports). Note: Both the Read_Buffer_Size and LE_Read_Buffer_Size commands may return buffer length and number of packets parameter values that are nonzero. This allows a Controller to offer different buffers and number of buffers for BR/EDR data packets and LE data packets. The HC_LE_ACL_Data_Packet_Length return parameter shall be used to determine the size of the L2CAP PDU segments contained in ACL Data Packets, which are transferred from the Host to the Controller to be broken up into packets by the Link Layer. Both the Host and the Controller shall support command and event packets, where the data portion (excluding header) contained in the packets is 255 octets in size. The HC_Total_Num_LE_ACL_Data_Packets return parameter contains the total number of HCI ACL Data Packets that can be stored in the data buffers of the Controller. The Host determines how the buffers are to be divided between different Connection Handles. Note: The HC_LE_ACL_Data_Packet_Length return parameter does not include the length of the HCI Data Packet header. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.2) More...
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 Specification v.4.1, Vol. 2, Part E, 7.8.3) More...
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 Controller (see [Vol 6] Part B, Section 1.3). (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.4) More...
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. The Advertising_Interval_Min shall be less than or equal to the Advertising_Interval_Max. The Advertising_Interval_Min and Advertising_Interval_Max should not be the same value to enable the Controller to determine the best advertising interval given other activities. For high duty cycle directed advertising, i.e. when Advertising_Type is 0x01 (ADV_DIRECT_IND, high duty cycle), the Advertising_Interval_Min and Advertising_Interval_Max parameters are not used and shall be ignored. The Advertising_Type is used to determine the packet type that is used for advertising when advertising is enabled. The Advertising_Interval_Min and Advertising_Interval_Max shall not be set to less than 0x00A0 (100 ms) if the Advertising_Type is set to 0x02 (ADV_SCAN_IND) or 0x03 (ADV_NONCONN_IND). The Own_Address_Type determines if the advertising packets are identified with the Public Device Address of the device, or a Random Device Address as written by the LE_Set_Random_Address command. If directed advertising is performed, i.e. when Advertising_Type is set to 0x01 (ADV_DIRECT_IND, high duty cycle) or 0x04 (ADV_DIRECT_IND, low duty cycle mode), then the Direct_Address_Type and Direct_Address shall be valid, otherwise they shall be ignored by the Controller and not used. The Advertising_Channel_Map is a bit field that indicates the advertising channels that shall be used when transmitting advertising packets. At least one channel bit shall be set in the Advertising_Channel_Map parameter. The Advertising_Filter_Policy parameter shall be ignored when directed advertising is enabled. The Host shall not issue this command when advertising is enabled in the Controller; if it is the Command Disallowed error code shall be used. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.5) More...
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 used for LE advertising channel packets. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.6) More...
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 data field. Only the significant part of the Advertising_Data is transmitted in the advertising packets, as defined in [Vol 3] Part C, Section 11., (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.7) More...
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) More...
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. The Controller manages the timing of advertisements as per the advertising parameters given in the LE_Set_Advertising_Parameters command. The Controller shall continue advertising until the Host issues an LE_Set_Advertise_Enable command with Advertising_Enable set to 0x00 (Advertising is disabled) or until a connection is created or until the Advertising is timed out due to high duty cycle Directed Advertising. In these cases, advertising is then disabled. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.9) More...
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 controls the type of scan to perform. The LE_Scan_Interval and LE_Scan_Window parameters are recommendations from the Host on how long (LE_Scan_Window) and how frequently (LE_Scan_Interval) the Controller should scan (See [Vol 6] Part B, Section 4.5.3). The LE_Scan_Window parameter shall always be set to a value smaller or equal to the value set for the LE_Scan_Interval parameter. If they are set to the same value scanning should be run continuously. The Own_Address_Type parameter determines the address used (Public or Random Device Address) when performing active scan. The Host shall not issue this command when scanning is enabled in the Controller; if it is the Command Disallowed error code shall be used. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.10) More...
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 devices nearby. The Filter_Duplicates parameter controls whether the Link Layer shall filter duplicate advertising reports to the Host, or if the Link Layer should generate advertising reports for each packet received. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.11) More...
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. More...
tBleStatus | hci_le_create_connection_cancel (void)
| The LE_Create_Connection_Cancel command is used to cancel the LE_Create_Connection command. This command shall only be issued after the LE_Create_Connection command has been issued, a Command Status event has been received for the LE Create Connection command and before the LE Connection Complete event. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.13) More...
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 be stored in the Controller. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.14) More...
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: More...
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 the Controller. This command can be used at any time except when: More...
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 stored in the Controller. This command can be used at any time except when: More...
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 connection. This command is supported only on master side. The Conn_Interval_Min and Conn_Interval_Max parameters are used to define the minimum and maximum allowed connection interval. The Conn_Interval_Min parameter shall not be greater than the Conn_Interval_Max parameter. The Conn_Latency parameter shall define the maximum allowed connection latency. The Supervision_Timeout parameter shall define the link supervision timeout for the LE link. The Supervision_Timeout in milliseconds shall be larger than (1. More...
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 for data channels based on its "local information". This classification persists until overwritten with a subsequent LE_Set_Host_Channel_Classification command or until the Controller is reset using the Reset command (see [Vol 6] Part B, Section 4.5.8.1). If this command is used, the Host should send it within 10 seconds of knowing that the channel classification has changed. The interval between two successive commands sent shall be at least one second. This command shall only be used when the local device supports the Master role. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.19) More...
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. The returned value indicates the state of the Channel_Map specified by the last transmitted or received Channel_Map (in a CONNECT_REQ or LL_CHANNEL_MAP_REQ message) for the specified Connection_Handle, regardless of whether the Master has received an acknowledgement. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.20) More...
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 return a list of the used LE features. For details see [Vol 6] Part B, Section 4.6. This command may be issued on both the master and slave. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.21) More...
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 using the Key given in the command and returns the Encrypted_Data to the Host. The AES-128 bit block cypher is defined in NIST Publication FIPS-197 (http://csrc.nist.gov/publications/fips/ fips197/fips-197.pdf). (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.22) More...
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 to the Host. The Random_Number shall be generated according to [Vol 2] Part H, Section 2 if the LE Feature (LL Encryption) is supported. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.23) More...
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 remote device specified by the connection handle, and once authenticated will encrypt the connection. The parameters are as defined in [Vol 3] Part H, Section 2.4.4. If the connection is already encrypted then the Controller shall pause connection encryption before attempting to authenticate the given encryption key, and then re-encrypt the connection. While encryption is paused no user data shall be transmitted. On an authentication failure, the connection shall be automatically disconnected by the Link Layer. If this command succeeds, then the connection shall be encrypted. This command shall only be used when the local device's role is Master. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.24) More...
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 the Controller, and specifies the Long_Term_Key parameter that shall be used for this Connection_Handle. The Long_Term_Key is used as defined in [Vol 6] Part B, Section 5.1.3. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.25) More...
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 event from the Controller if the Host cannot provide a Long Term Key for this Connection_Handle. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.26) More...
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 supports. See [Vol 6] Part B, Section 1.1.1. LE_States is an 8-octet bit field. If a bit is set to 1 then this state or state combination is supported by the Controller. Multiple bits in LE_States may be set to 1 to indicate support for multiple state and state combinations. All the Advertising type with the Initiate State combinations shall be set only if the corresponding Advertising types and Master Role combination are set. All the Scanning types and the Initiate State combinations shall be set only if the corresponding Scanning types and Master Role combination are set. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.27) More...
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 interval. The tester generates the test reference packets. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.28) More...
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 interval. The Controller shall transmit at maximum power. An LE Controller supporting the LE_Transmitter_Test command shall support Packet_Payload values 0x00, 0x01 and 0x02. An LE Controller may support other values of Packet_Payload. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.29) More...
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 test shall be reported as 0x0000. The Number_Of_Packets is an unsigned number and contains the number of received packets. (See Bluetooth Specification v.4.1, Vol. 2, Part E, 7.8.30) More...
tBleStatus | aci_hal_write_config_data (uint8_t Offset, uint8_t Length, uint8_t Value[])
| This command writes a value to a low level configure data structure. It is useful to setup directly some low level parameters for the system in the runtime. More...
tBleStatus | aci_hal_read_config_data (uint8_t Offset, uint8_t *Data_Length, uint8_t Data[])
| This command requests the value in the low level configure data structure. The number of read bytes changes for different Offset. More...
tBleStatus | aci_hal_set_tx_power_level (uint8_t En_High_Power, uint8_t PA_Level)
| This command sets the TX power level of the device. By controlling the EN_HIGH_POWER and the PA_LEVEL, the combination of the 2 determines the output power level (dBm). When the system starts up or reboots, the default TX power level will be used, which is the maximum value of 8 dBm. Once this command is given, the output power will be changed instantly, regardless if there is Bluetooth communication going on or not. For example, for debugging purpose, the device can be set to advertise all the time. And use this command to observe the signal strength changing. The system will keep the last received TX power level from the command, i.e. the 2nd command overwrites the previous TX power level. The new TX power level remains until another Set TX Power command, or the system reboots. More...
tBleStatus | aci_hal_device_standby (void)
| Put the device in standby mode. Normally the BlueNRG will automatically enter sleep mode to save power. This command puts the device into the Standby mode instead of the sleep mode. The difference is that, in sleep mode, the device can still wake up itself with the internal timer. But in standby mode, this timer is disabled. So the only possibility to wake up the device is by external signals, e.g. a HCI command sent via SPI bus. Based on the measurement, the current consumption under sleep mode is ~2 uA. And this value is ~1.5 uA in standby mode. The command is only accepted when there is no other Bluetooth activity. Otherwise an error code ERR_COMMAND_DISALLOWED will be returned. More...
tBleStatus | aci_hal_le_tx_test_packet_number (uint32_t *Number_Of_Packets)
| This command returns the number of packets sent in Direct Test Mode. When the Direct TX test is started, a 32-bit counter is used to count how many packets have been transmitted. This command can be used to check how many packets have been sent during the Direct TX test. The counter starts from 0 and counts upwards. The counter can wrap and start from 0 again. The counter is not cleared until the next Direct TX test starts. More...
tBleStatus | aci_hal_tone_start (uint8_t RF_Channel)
| This command starts a carrier frequency, i.e. a tone, on a specific channel. The frequency sine wave at the specific channel may be used for debugging purpose only. The channel ID is a parameter from 0x00 to 0x27 for the 40 BLE channels, e.g. 0x00 for 2.402 GHz, 0x01 for 2.404 GHz etc. This command should not be used when normal Bluetooth activities are ongoing. The tone should be stopped by aci_hal_tone_stop command. More...
tBleStatus | aci_hal_tone_stop (void)
| This command is used to stop the previously started aci_hal_tone_start command. More...
tBleStatus | aci_hal_set_radio_activity_mask (uint16_t Radio_Activity_Mask)
| This command set the bitmask associated to aci_hal_end_of_radio_activity_event. Only the radio acitivities enabled in the mask will be reported to application by aci_hal_end_of_radio_activity_event. More...
tBleStatus | aci_hal_get_link_status (uint8_t Link_Status[8], uint16_t Link_Connection_Handle[16/2])
| This command returns the status of the 8 Bluetooth low energy links managed by the device. More...
tBleStatus | aci_hal_get_fw_build_number (uint16_t *Build_Number)
| This command returns the build number associated with the firmware version currently running. More...
tBleStatus | aci_hal_get_anchor_period (uint32_t *Anchor_Period, uint32_t *Max_Free_Slot)
| This command returns information about the Anchor Period to help application in selecting slot timings when operating in multi-link scenarios. More...
tBleStatus | aci_gap_set_non_discoverable (void)
| Put the device in non-discoverable mode. This command will disable the LL advertising and put the device in standby state. More...
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.4.1, Vol. 3, Part C, section 9.2.3). The device will be discoverable for maximum period of TGAP (lim_adv_timeout) = 180 seconds (from errata). The advertising can be disabled at any time by issuing aci_gap_set_non_discoverable command. The Adv_Interval_Min and Adv_Interval_Max parameters are optional. If both are set to 0, the GAP will use default values for adv intervals for limited discoverable mode (250 ms and 500 ms respectively). To allow a fast connection, the host can set Local_Name, Service_Uuid_List, Slave_Conn_Interval_Min and Slave_Conn_Interval_Max. If provided, these data will be inserted into the advertising packet payload as AD data. These parameters are optional in this command. These values can be set in advertised data using GAP_Update_Adv_Data command separately. The total size of data in advertising packet cannot exceed 31 bytes. With this command, the BLE Stack will also add automatically the following standard AD types: More...
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.4.1, Vol. 3, Part C, section 9.2.4). The device will be discoverable until the host issues the aci_gap_set_non_discoverable command. The Adv_Interval_Min and Adv_Interval_Max parameters are optional. If both are set to 0, the GAP uses the default values for adv intervals for general discoverable mode. When using connectable undirected advertising events: More...
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. More...
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 connected state. More...
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. More...
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 device if authorization is required to access services which require authorization. More...
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. The command parameter contains the pass key which will be used during the pairing process. More...
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_gap_authorization_req_event event. More...
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 characteristics will also be added: More...
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 done in the aci_gap_init command plays a role in deciding the valid parameters for this command. More...
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. More...
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 the security requirements of the slave. The master may encrypt the link, initiate the pairing procedure, or reject the request. More...
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 specified does not exist, then it is added to the advertising data. If the overall advertising data length is more than 31 octets after the update, then the command is rejected and the old data is retained. More...
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. More...
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. More...
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. More...
tBleStatus | aci_gap_configure_whitelist (void)
| Add addresses of bonded devices into the controller's whitelist. The command will return an error if there are no devices in the database or if it was unable to add the device into the whitelist. More...
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 generated when the link is disconnected. It is important to leave an 100 ms blank window before sending any new command (including system hardware reset), since immediately after hci_disconnection_complete_event event, system could save important information in non volatile memory. More...
tBleStatus | aci_gap_clear_security_db (void)
| Clear the security database. All the devices in the security database will be removed. More...
tBleStatus | aci_gap_allow_rebond (uint16_t Connection_Handle)
| Allows the security manager to complete the pairing procedure and re-bond with the master. This command should be given by the application when it receives the ACI_GAP_BOND_LOST_EVENT if it wants the re-bonding to happen successfully. If this command is not given on receiving the event, the bonding procedure will timeout. More...
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. When this procedure is started, only the devices in limited discoverable mode are returned to the upper layers. The procedure is terminated when either the upper layers issue a command to terminate the procedure by issuing the command aci_gap_terminate_gap_proc with the procedure code set to 0x01 or a timeout happens. When the procedure is terminated due to any of the above reasons, aci_gap_proc_complete_event event is returned with the procedure code set to 0x01. The device found when the procedure is ongoing is returned to the upper layers through the event hci_le_advertising_report_event. More...
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. The procedure is terminated when either the upper layers issue a command to terminate the procedure by issuing the command aci_gap_terminate_gap_proc with the procedure code set to 0x02 or a timeout happens. When the procedure is terminated due to any of the above reasons, aci_gap_proc_complete_event event is returned with the procedure code set to 0x02. The device found when the procedure is ongoing is returned to hci_le_advertising_report_event. More...
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 with the initiator filter policy set to "ignore whitelist and process connectable advertising packets only for the specified device". Once a connection is established, GATT procedure is started to read the device name characteristic. When the read is completed (successfully or unsuccessfully), a aci_gap_proc_complete_event event is given to the upper layer. The event also contains the name of the device if the device name was read successfully. More...
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 of the controller and a LE_Create_Connection call will be made to the controller by GAP with the initiator filter policy set to "use whitelist to determine which advertiser to connect to". When a command is issued to terminate the procedure by upper layer, a LE_Create_Connection_Cancel call will be made to the controller by GAP. The procedure is terminated when either a connection is successfully established with one of the specified devices in the white list or the procedure is explicitly terminated by issuing the command aci_gap_terminate_gap_proc with the procedure code set to 0x08. A aci_gap_proc_complete_event event is returned with the procedure code set to 0x08. More...
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 the scanner filter policy set to "accept all advertising packets" and from the scanning results, all the devices are sent to the upper layer using the event LE_Advertising_Report. The upper layer then has to select one of the devices to which it wants to connect by issuing the command aci_gap_create_connection. If privacy is enabled, then either a private resolvable address or a non resolvable address, based on the address type specified in the command is set as the scanner address but the gap create connection always uses a private resolvable address if the general connection establishment procedure is active. The procedure is terminated when a connection is established or the upper layer terminates the procedure by issuing the command aci_gap_terminate_gap_proc with the procedure code set to 0x10. On completion of the procedure a aci_gap_proc_complete_event event is generated with the procedure code set to 0x10. More...
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 into white list and enables scanning in the controller with the scanner filter policy set to "accept packets only from devices in whitelist". All the devices found are sent to the upper layer by the event hci_le_advertising_report_event. The upper layer then has to select one of the devices to which it wants to connect by issuing the command aci_gap_create_connection. On completion of the procedure a aci_gap_proc_complete_event event is generated with the procedure code set to 0x20. The procedure is terminated when a connection is established or the upper layer terminates the procedure by issuing the command aci_gap_terminate_gap_proc with the procedure code set to 0x20. More...
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 controller by GAP with the initiator filter policy set to "ignore whitelist and process connectable advertising packets only for the specified device". The procedure can be terminated explicitly by the upper layer by issuing the command aci_gap_terminate_gap_proc. When a command is issued to terminate the procedure by upper layer, a hci_le_create_connection_cancel call will be made to the controller by GAP. On termination of the procedure, a hci_le_connection_complete_event event is returned. The procedure can be explicitly terminated by the upper layer by issuing the command aci_gap_terminate_gap_proc with the procedure_code set to 0x40. More...
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 procedure code set to the corresponding procedure. More...
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 called. On completion of the procedure, an hci_le_connection_update_complete_event event is returned to the upper layer. More...
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 capabilities should be set before issuing this command using the aci_gap_set_io_capability and aci_gap_set_authentication_requirement commands. A aci_gap_pairing_complete_event event is returned after the pairing process is completed. More...
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. More...
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 the corresponding address types and values. More...
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 private address or a non-resolvable private address as specified in the Own_Addr_Type parameter of the command. More...
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 the controller. The advertising reports are sent to the upper layer using standard LE Advertising Report Event. (See Bluetooth Core v4.1, Vol. 2, part E, Ch. 7.7.65.2, LE Advertising Report Event.) More...
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. If the device is using a resolvable private address and it has been bonded, then the command will return BLE_STATUS_SUCCESS. More...
tBleStatus | aci_gatt_init (void)
| Initialize the GATT layer for server and client roles. It adds also the GATT service with Service Changed Characteristic. Until this command is issued the GATT channel will not process any commands even if the connection is opened. This command has to be given before using any of the GAP features. More...
tBleStatus | aci_gatt_add_service (uint8_t Service_UUID_Type, Service_UUID_t *Service_UUID, uint8_t Service_Type, uint8_t Max_Attribute_Records, uint16_t *Service_Handle)
| Add a service to GATT Server. When a service is created in the server, the host needs to reserve the handle ranges for this service using Max_Attribute_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 in command complete event. Service declaration is taken from the service pool. The attributes for characteristics and descriptors are allocated from the attribute pool. More...
tBleStatus | aci_gatt_include_service (uint16_t Service_Handle, uint16_t Include_Start_Handle, uint16_t Include_End_Handle, uint8_t Include_UUID_Type, Include_UUID_t *Include_UUID, uint16_t *Include_Handle)
| Include a service given by Include_Start_Handle and Include_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 Service_Handle, uint8_t Char_UUID_Type, Char_UUID_t *Char_UUID, uint16_t Char_Value_Length, uint8_t Char_Properties, uint8_t Security_Permissions, uint8_t GATT_Evt_Mask, uint8_t Enc_Key_Size, uint8_t Is_Variable, uint16_t *Char_Handle)
| Add a characteristic to a service. More...
tBleStatus | aci_gatt_add_char_desc (uint16_t Service_Handle, uint16_t Char_Handle, uint8_t Char_Desc_Uuid_Type, Char_Desc_Uuid_t *Char_Desc_Uuid, uint8_t Char_Desc_Value_Max_Len, uint8_t Char_Desc_Value_Length, uint8_t Char_Desc_Value[], uint8_t Security_Permissions, uint8_t Access_Permissions, uint8_t GATT_Evt_Mask, uint8_t Enc_Key_Size, uint8_t Is_Variable, uint16_t *Char_Desc_Handle)
| Add a characteristic descriptor to a service. More...
tBleStatus | aci_gatt_update_char_value (uint16_t Service_Handle, uint16_t Char_Handle, uint8_t Val_Offset, uint8_t Char_Value_Length, uint8_t Char_Value[])
| Update a characteristic value in a service. If notifications (or indications) are enabled on that characteristic, a notification (or indication) will be sent to the client after sending this command to the BlueNRG. The command is queued into the BlueNRG command queue. If the buffer is full, because previous commands could not be still processed, the function will return BLE_STATUS_INSUFFICIENT_RESOURCES. This will happen if notifications (or indications) are enabled and the application calls aci_gatt_update_char_value at an higher rate than what is allowed by the link. Throughput on BLE link depends on connection interval and connection length parameters (decided by the master, see aci_l2cap_connection_parameter_update_request() for more info on how to suggest new connection parameters from a slave). If the application does not want to lose notifications because BlueNRG buffer becomes full, it has to retry again till the function returns BLE_STATUS_SUCCESS or any other error code. More...
tBleStatus | aci_gatt_del_char (uint16_t Serv_Handle, uint16_t Char_Handle)
| Delete the specified characteristic from the service. More...
tBleStatus | aci_gatt_del_service (uint16_t Serv_Handle)
| Delete the specified service from the GATT server database. More...
tBleStatus | aci_gatt_del_include_service (uint16_t Serv_Handle, uint16_t Include_Handle)
| Delete the Include definition from the service. More...
tBleStatus | aci_gatt_set_event_mask (uint32_t GATT_Evt_Mask)
| Mask events from the GATT. The default configuration is all the events masked. More...
tBleStatus | aci_gatt_exchange_config (uint16_t Connection_Handle)
| Perform an ATT MTU exchange procedure. When the ATT MTU exchange procedure is completed, a aci_att_exchange_mtu_resp_event event is generated. A aci_gatt_proc_complete_event event is also generated to indicate the end of the procedure. More...
tBleStatus | aci_att_find_info_req (uint16_t Connection_Handle, uint16_t Start_Handle, uint16_t End_Handle)
| Send a Find Information Request. This command is used to obtain the mapping of attribute handles with their associated types. The responses of the procedure are given through the aci_att_find_info_resp_event event. The end of the procedure is indicated by a aci_gatt_proc_complete_event event. More...
tBleStatus | aci_att_find_by_type_value_req (uint16_t Connection_Handle, uint16_t Start_Handle, uint16_t End_Handle, uint16_t UUID, uint8_t Attribute_Val_Length, uint8_t Attribute_Val[])
| Send a Find By Type Value Request The Find By Type Value Request is used to obtain the handles of attributes that have a given 16-bit UUID attribute type and a given attribute value. The responses of the procedure are given through the aci_att_find_by_type_value_resp_event event. The end of the procedure is indicated by a aci_gatt_proc_complete_event event. More...
tBleStatus | aci_att_read_by_type_req (uint16_t Connection_Handle, uint16_t Start_Handle, uint16_t End_Handle, uint8_t UUID_Type, UUID_t *UUID)
| Send a Read By Type Request. The Read By Type Request is used to obtain the values of attributes where the attribute type is known but the handle is not known. The responses of the procedure are given through the aci_att_read_by_type_resp_event event. The end of the procedure is indicated by a aci_gatt_proc_complete_event event. More...
tBleStatus | aci_att_read_by_group_type_req (uint16_t Connection_Handle, uint16_t Start_Handle, uint16_t End_Handle, uint8_t UUID_Type, UUID_t *UUID)
| Send a Read By Group Type Request. The Read By Group Type Request is used to obtain the values of grouping attributes where the attribute type is known but the handle is not known. Grouping attributes are defined at GATT layer. The grouping attribute types are: "Primary Service", "Secondary Service" and "Characteristic". The responses of the procedure are given through the aci_att_read_by_group_type_resp_event event. The end of the procedure is indicated by a aci_gatt_proc_complete_event. More...
tBleStatus | aci_att_prepare_write_req (uint16_t Connection_Handle, uint16_t Attr_Handle, uint16_t Val_Offset, uint8_t Attribute_Val_Length, uint8_t Attribute_Val[])
| Send a Prepare Write Request. The Prepare Write Request is used to request the server to prepare to write the value of an attribute. The responses of the procedure are given through the aci_att_prepare_write_resp_event event. The end of the procedure is indicated by a aci_gatt_proc_complete_event. More...
tBleStatus | aci_att_execute_write_req (uint16_t Connection_Handle, uint8_t Execute)
| Send an Execute Write Request. The Execute Write Request is used to request the server to write or cancel the write of all the prepared values currently held in the prepare queue from this client. The result of the procedure is given through the aci_att_exec_write_resp_event event. The end of the procedure is indicated by a aci_gatt_proc_complete_event event. More...
tBleStatus | aci_gatt_disc_all_primary_services (uint16_t Connection_Handle)
| Start the GATT client procedure to discover all primary services on the server. The responses of the procedure are given through the aci_att_read_by_group_type_resp_event event. More...
tBleStatus | aci_gatt_disc_primary_service_by_uuid (uint16_t Connection_Handle, uint8_t UUID_Type, UUID_t *UUID)
| Start the procedure to discover the primary services of the specified UUID on the server. The responses of the procedure are given through the aci_att_find_by_type_value_resp_event event. The end of the procedure is indicated by a aci_gatt_proc_complete_event event. More...
tBleStatus | aci_gatt_find_included_services (uint16_t Connection_Handle, uint16_t Start_Handle, uint16_t End_Handle)
| Start the procedure to find all included services. The responses of the procedure are given through the aci_att_read_by_type_resp_event event. The end of the procedure is indicated by a aci_gatt_proc_complete_event event. More...
tBleStatus | aci_gatt_disc_all_char_of_service (uint16_t Connection_Handle, uint16_t Start_Handle, uint16_t End_Handle)
| Start the procedure to discover all the characteristics of a given service. When the procedure is completed, a aci_gatt_proc_complete_event event is generated. Before procedure completion the response packets are given through aci_att_read_by_type_resp_event event. More...
tBleStatus | aci_gatt_disc_char_by_uuid (uint16_t Connection_Handle, uint16_t Start_Handle, uint16_t End_Handle, uint8_t UUID_Type, UUID_t *UUID)
| Start the procedure to discover all the characteristics specified by a UUID. When the procedure is completed, a aci_gatt_proc_complete_event event is generated. Before procedure completion the response packets are given through aci_gatt_disc_read_char_by_uuid_resp_event event. More...
tBleStatus | aci_gatt_disc_all_char_desc (uint16_t Connection_Handle, uint16_t Char_Handle, uint16_t End_Handle)
| Start the procedure to discover all characteristic descriptors on the server. When the procedure is completed, a aci_gatt_proc_complete_event event is generated. Before procedure completion the response packets are given through aci_att_find_info_resp_event event. More...
tBleStatus | aci_gatt_read_char_value (uint16_t Connection_Handle, uint16_t Attr_Handle)
| Start the procedure to read the attribute value. When the procedure is completed, a aci_gatt_proc_complete_event event is generated. Before procedure completion the response packet is given through aci_att_read_resp_event event. More...
tBleStatus | aci_gatt_read_using_char_uuid (uint16_t Connection_Handle, uint16_t Start_Handle, uint16_t End_Handle, uint8_t UUID_Type, UUID_t *UUID)
| Start the procedure to read all the characteristics specified by the UUID. When the procedure is completed, a aci_gatt_proc_complete_event event is generated. Before procedure completion the response packets are given through aci_gatt_disc_read_char_by_uuid_resp_event event. More...
tBleStatus | aci_gatt_read_long_char_value (uint16_t Connection_Handle, uint16_t Attr_Handle, uint16_t Val_Offset)
| Start the procedure to read a long characteristic value. the procedure is completed, a aci_gatt_proc_complete_event event is generated. Before procedure completion the response packets are given through aci_att_read_blob_resp_event event. More...
tBleStatus | aci_gatt_read_multiple_char_value (uint16_t Connection_Handle, uint8_t Number_of_Handles, Handle_Entry_t Handle_Entry[])
| Start a procedure to read multiple characteristic values from a server. This sub-procedure is used to read multiple Characteristic Values from a server when the client knows the Characteristic Value Handles. When the procedure is completed, a aci_gatt_proc_complete_event event is generated. Before procedure completion the response packets are given through aci_att_read_multiple_resp_event event. More...
tBleStatus | aci_gatt_write_char_value (uint16_t Connection_Handle, uint16_t Attr_Handle, uint8_t Attribute_Val_Length, uint8_t Attribute_Val[])
| Start the procedure to write a long characteristic value. When the procedure is completed, a aci_gatt_proc_complete_event event is generated. During the procedure, aci_att_prepare_write_resp_event and aci_att_exec_write_resp_event events are raised. More...
tBleStatus | aci_gatt_write_long_char_value (uint16_t Connection_Handle, uint16_t Attr_Handle, uint16_t Val_Offset, uint8_t Attribute_Val_Length, uint8_t Attribute_Val[])
| Start the procedure to write a long characteristic value. When the procedure is completed, a aci_gatt_proc_complete_event event is generated. During the procedure, aci_att_prepare_write_resp_event and aci_att_exec_write_resp_event events are raised. More...
tBleStatus | aci_gatt_write_char_reliable (uint16_t Connection_Handle, uint16_t Attr_Handle, uint16_t Val_Offset, uint8_t Attribute_Val_Length, uint8_t Attribute_Val[])
| Start the procedure to write a characteristic reliably. When the procedure is completed, a aci_gatt_proc_complete_event event is generated. During the procedure, aci_att_prepare_write_resp_event and aci_att_exec_write_resp_event events are raised. More...
tBleStatus | aci_gatt_write_long_char_desc (uint16_t Connection_Handle, uint16_t Attr_Handle, uint16_t Val_Offset, uint8_t Attribute_Val_Length, uint8_t Attribute_Val[])
| Start the procedure to write a long characteristic descriptor. When the procedure is completed, a aci_gatt_proc_complete_event event is generated. During the procedure, aci_att_prepare_write_resp_event and aci_att_exec_write_resp_event events are raised. More...
tBleStatus | aci_gatt_read_long_char_desc (uint16_t Connection_Handle, uint16_t Attr_Handle, uint16_t Val_Offset)
| Start the procedure to read a long characteristic value. When the procedure is completed, a aci_gatt_proc_complete_event event is generated. Before procedure completion the response packets are given through aci_att_read_blob_resp_event event. More...
tBleStatus | aci_gatt_write_char_desc (uint16_t Connection_Handle, uint16_t Attr_Handle, uint8_t Attribute_Val_Length, uint8_t Attribute_Val[])
| Start the procedure to write a characteristic descriptor. When the procedure is completed, a aci_gatt_proc_complete_event event is generated. More...
tBleStatus | aci_gatt_read_char_desc (uint16_t Connection_Handle, uint16_t Attr_Handle)
| Start the procedure to read the descriptor specified. When the procedure is completed, a aci_gatt_proc_complete_event event is generated. Before procedure completion the response packet is given through aci_att_read_resp_event event. More...
tBleStatus | aci_gatt_write_without_resp (uint16_t Connection_Handle, uint16_t Attr_Handle, uint8_t Attribute_Val_Length, uint8_t Attribute_Val[])
| Start the procedure to write a characteristic value without waiting for any response from the server. No events are generated after this command is executed. More...
tBleStatus | aci_gatt_signed_write_without_resp (uint16_t Connection_Handle, uint16_t Attr_Handle, uint8_t Attribute_Val_Length, uint8_t Attribute_Val[])
| Start a signed write without response from the server. The procedure is used to write a characteristic value with an authentication signature without waiting for any response from the server. It cannot be used when the link is encrypted. More...
tBleStatus | aci_gatt_confirm_indication (uint16_t Connection_Handle)
| Allow application to confirm indication. This command has to be sent when the application receives the event aci_gatt_indication_event. More...
tBleStatus | aci_gatt_write_resp (uint16_t Connection_Handle, uint16_t Attr_Handle, uint8_t Write_status, uint8_t Error_Code, uint8_t Attribute_Val_Length, uint8_t Attribute_Val[])
| Allow or reject a write request from a client. This command has to be sent by the application when it receives the aci_gatt_write_permit_req_event. If the write can be allowed, then the status and error code has to be set to 0. If the write cannot be allowed, then the status has to be set to 1 and the error code has to be set to the error code that has to be passed to the client. More...
tBleStatus | aci_gatt_allow_read (uint16_t Connection_Handle)
| Allow the GATT server to send a response to a read request from a client. The application has to send this command when it receives the aci_gatt_read_permit_req_event or aci_gatt_read_multi_permit_req_event. This command indicates to the stack that the response can be sent to the client. So if the application wishes to update any of the attributes before they are read by the client, it has to update the characteristic values using the aci_gatt_update_char_value and then give this command. The application should perform the required operations within 30 seconds. Otherwise the GATT procedure will be timeout. More...
tBleStatus | aci_gatt_set_security_permission (uint16_t Serv_Handle, uint16_t Attr_Handle, uint8_t Security_Permissions)
| This command sets the security permission for the attribute handle specified. Currently the setting of security permission is allowed only for client configuration descriptor. More...
tBleStatus | aci_gatt_set_desc_value (uint16_t Serv_Handle, uint16_t Char_Handle, uint16_t Char_Desc_Handle, uint16_t Val_Offset, uint8_t Char_Desc_Value_Length, uint8_t Char_Desc_Value[])
| This command sets the value of the descriptor specified by charDescHandle. More...
tBleStatus | aci_gatt_read_handle_value (uint16_t Attr_Handle, uint16_t Offset, uint16_t Value_Length_Requested, uint16_t *Length, uint16_t *Value_Length, uint8_t Value[])
| Reads the value of the attribute handle specified from the local GATT database. More...
tBleStatus | aci_gatt_update_char_value_ext (uint16_t Service_Handle, uint16_t Char_Handle, uint8_t Update_Type, uint16_t Char_Length, uint16_t Value_Offset, uint8_t Value_Length, uint8_t Value[])
| This command is a more flexible version of aci_gatt_update_char_value to support update of long attribute up to 512 bytes and indicate selectively the generation of Indication/Notification. More...
tBleStatus | aci_l2cap_connection_parameter_update_req (uint16_t Connection_Handle, uint16_t Conn_Interval_Min, uint16_t Conn_Interval_Max, uint16_t Slave_latency, uint16_t Timeout_Multiplier)
| Send an L2CAP connection parameter update request from the slave to the master. An aci_l2cap_connection_update_resp_event event will be raised when the master will respond to the request (accepts or rejects). More...
tBleStatus | aci_l2cap_connection_parameter_update_resp (uint16_t Connection_Handle, uint16_t Conn_Interval_Min, uint16_t Conn_Interval_Max, uint16_t Slave_latency, uint16_t Timeout_Multiplier, uint16_t Minimum_CE_Length, uint16_t Maximum_CE_Length, uint8_t Identifier, uint8_t Accept)
| Accept or reject a connection update. This command should be sent in response to a aci_l2cap_connection_update_req_event event from the controller. The accept parameter has to be set if the connection parameters given in the event are acceptable. More...

## Detailed Description

Header file for BlueNRG-1 Bluetooth Low Energy stack APIs.

Author
  AMS - VMA RF Application team

Version
  V1.0.0

Date
  21-Sept-2015

Attention

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

##
© COPYRIGHT 2015 STMicroelectronics

Definition in file bluenrg1_api.h.

## Typedef Documentation

typedef struct Bonded_Device_Entry_t_s Bonded_Device_Entry_t

Documentation for Bonded_Device_Entry_t

typedef union Char_Desc_Uuid_t_s Char_Desc_Uuid_t

Documentation for Char_Desc_Uuid_t

typedef union Char_UUID_t_s Char_UUID_t

Documentation for Char_UUID_t

typedef struct Handle_Entry_t_s Handle_Entry_t

Documentation for Handle_Entry_t

typedef union Include_UUID_t_s Include_UUID_t

Documentation for Include_UUID_t

typedef union Service_UUID_t_s Service_UUID_t

Documentation for Service_UUID_t

typedef uint8_t tBleStatus

Definition at line 71 of file bluenrg1_api.h.

typedef union UUID_t_s UUID_t

Documentation for UUID_t

typedef struct Whitelist_Entry_t_s Whitelist_Entry_t

Documentation for Whitelist_Entry_t