Link Layer#
Link Layer.
Commands and events in this class provide access to low-level Bluetooth link layer functionality that is not available via higher-level APIs of the Bluetooth host stack. This class is available when the bluetooth_feature_linklayer_interface component is included in the application.
Modules#
sl_bt_evt_linklayer_event_info_report
Functions#
Macros#
Function Documentation#
sl_bt_linklayer_event_info_reporting_enable#
sl_status_t sl_bt_linklayer_event_info_reporting_enable (uint8_t enable, uint32_t configuration, uint8_t procedure_type, size_t procedure_identifier_len, const uint8_t * procedure_identifier)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint8_t | [in] | enable | Enable or disable event info reporting. Values:
|
| uint32_t | [in] | configuration | Bitmask to specify the event info reporting configuration. See the link layer documentation of HCI_VS_Siliconlabs_Event_Info_Reporting_Enable for detailed description of each bit. |
| uint8_t | [in] | procedure_type | The type of the procedure that this configuration is for. See the link layer documentation of HCI_VS_Siliconlabs_Event_Info_Reporting_Enable for detailed description of available procedure types. |
| size_t | [in] | procedure_identifier_len | Length of data in |
| const uint8_t * | [in] | procedure_identifier | The identifier of the procedure that this configuration is for. See the link layer documentation of HCI_VS_Siliconlabs_Event_Info_Reporting_Enable for detailed description of procedure identifiers. |
Enable or disable link layer event info reporting. This command passes the parameters directly to the vendor-specific HCI command HCI_VS_Siliconlabs_Event_Info_Reporting_Enable. This command is only available if the bluetooth_feature_linklayer_interface and bluetooth_feature_event_info_reporting components are included in the application. See the documentation of the HCI command for detailed description of each parameter and the behavior of the command.
Events that have been succesfully enabled will be reported with the sl_bt_evt_linklayer_event_info_report event.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_linklayer_event_info_report - Sent for each event info report received from the link layer.
sl_bt_linklayer_get_hci_connection_handle#
sl_status_t sl_bt_linklayer_get_hci_connection_handle (uint8_t connection, uint16_t * hci_connection_handle)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint8_t | [in] | connection | BGAPI connection handle |
| uint16_t * | [out] | hci_connection_handle | HCI connection handle corresponding to the given BGAPI connection handle |
Get the HCI connection handle corresponding to a BGAPI connection handle.
The Bluetooth host BGAPI interface and the link layer HCI interface use their own connection handles. When the application uses the Link Layer class to issue link layer commands that need connection handles, use this command to convert the BGAPI connection handle to the corresponding HCI connection handle needed for the link layer command.
This command is only available when the bluetooth_feature_linklayer_interface and bluetooth_feature_connection components are included in the application.
Returns
SL_STATUS_OK if successful. Error code otherwise.
sl_bt_linklayer_get_bgapi_connection_handle#
sl_status_t sl_bt_linklayer_get_bgapi_connection_handle (uint16_t hci_connection_handle, uint8_t * connection)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint16_t | [in] | hci_connection_handle | HCI connection handle |
| uint8_t * | [out] | connection | BGAPI connection handle corresponding to the given HCI connection handle |
Get the BGAPI connection handle corresponding to an HCI connection handle.
The Bluetooth host BGAPI interface and the link layer HCI interface use their own connection handles. When the application receives a link layer connection handle via the Link Layer class, use this command to convert the HCI connection handle to the corresponding BGAPI connection handle used in the Bluetooth host stack API.
This command is only available when the bluetooth_feature_linklayer_interface and bluetooth_feature_connection components are included in the application.
Returns
SL_STATUS_OK if successful. Error code otherwise.