Accurate Bluetooth Ranging#
Accurate Bluetooth Ranging.
This class provides commands and events for Accurate Bluetooth Ranging (ABR) between Bluetooth devices.
Modules#
sl_bt_evt_cs_security_enable_complete
sl_bt_evt_cs_procedure_enable_complete
Enumerations#
Specifies the role for the device during ABR procedure.
Defines the status of a given role for an ABR capable device.
Defines the status of a companion signal.
Defines the ABR procedure state for the device.
Defines the different modes for ABR steps.
Defines the Round Trip Time (RTT) payload types used during the ABR sequence.
Specifies the ABR channel selection algorithms.
Specifies the ch3c shapes.
Describes the current status of the procedure or subevents.
Describes the abort reasons for ABR procedures and subevents and is represented by 4 bits in a byte.
Specifies the role for the device during ABR procedure.
Functions#
Macros#
Enumeration Documentation#
sl_bt_cs_role_t#
sl_bt_cs_role_t
Specifies the role for the device during ABR procedure.
Enumerator | |
---|---|
sl_bt_cs_role_initiator | (0x0) The device will initiate the procedure |
sl_bt_cs_role_reflector | (0x1) The device will reciprocate transmission |
12215
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cs_role_status_t#
sl_bt_cs_role_status_t
Defines the status of a given role for an ABR capable device.
Enumerator | |
---|---|
sl_bt_cs_role_status_disable | (0x0) The given role is disabled |
sl_bt_cs_role_status_enable | (0x1) The given role is enabled |
12226
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cs_companion_signal_status_t#
sl_bt_cs_companion_signal_status_t
Defines the status of a companion signal.
Enumerator | |
---|---|
sl_bt_cs_companion_signal_status_disable | (0x0) The companion signal is disabled |
sl_bt_cs_companion_signal_status_enable | (0x1) The companion signal is enabled |
12235
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cs_procedure_state_t#
sl_bt_cs_procedure_state_t
Defines the ABR procedure state for the device.
Enumerator | |
---|---|
sl_bt_cs_procedure_state_disabled | (0x0) ABR procedures are disabled |
sl_bt_cs_procedure_state_enabled | (0x1) ABR procedures are enabled |
12246
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cs_mode_t#
sl_bt_cs_mode_t
Defines the different modes for ABR steps.
Enumerator | |
---|---|
sl_bt_cs_mode_calibration | (0x0) Frequency offset and timing calibration measurement |
sl_bt_cs_mode_rtt | (0x1) Round Trip Time (RTT) measurement |
sl_bt_cs_mode_pbr | (0x2) Phase-Based Ranging (PBR) measurement |
sl_bt_cs_mode_pbr_and_rtt | (0x3) PBR and RTT measurement |
12256
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cs_rtt_type_t#
sl_bt_cs_rtt_type_t
Defines the Round Trip Time (RTT) payload types used during the ABR sequence.
Enumerator | |
---|---|
sl_bt_cs_rtt_type_coarse | (0x0) RTT Coarse |
sl_bt_cs_rtt_type_fractional_96_bit_sounding | (0x2) RTT Fractional with 96-bit Sounding Sequence |
12270
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cs_channel_selection_algorithm_t#
sl_bt_cs_channel_selection_algorithm_t
Specifies the ABR channel selection algorithms.
Enumerator | |
---|---|
sl_bt_cs_channel_selection_algorithm_3b | (0x0) Use Channel Selection Algorithm #3b for non-mode 0 ABR steps |
sl_bt_cs_channel_selection_algorithm_3c | (0x1) Use Channel Selection Algorithm #3c for non-mode 0 ABR steps |
sl_bt_cs_channel_selection_algorithm_user_shape_interleaved | (0x2) Use Interleaved shape for user specified channel sequence |
12281
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cs_ch3c_shape_t#
sl_bt_cs_ch3c_shape_t
Specifies the ch3c shapes.
Enumerator | |
---|---|
sl_bt_cs_ch3c_shape_hat | (0x0) Use Hat shape for user specified channel sequence |
sl_bt_cs_chc3_shape_interleaved | (0x1) Use Interleaved shape for user specified channel sequence |
12317
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cs_done_status_t#
sl_bt_cs_done_status_t
Describes the current status of the procedure or subevents.
Enumerator | |
---|---|
sl_bt_cs_done_status_complete | (0x0) All results complete for the ABR procedure or subevent |
sl_bt_cs_done_status_partial_results_continue | (0x1) Partial results with more to follow |
sl_bt_cs_done_status_current_aborted | (0xfe) Current ABR procedure or subevent aborted |
sl_bt_cs_done_status_all_aborted | (0xff) Current and all subsequent subevents in the procedure aborted |
12328
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cs_abort_reason_t#
sl_bt_cs_abort_reason_t
Describes the abort reasons for ABR procedures and subevents and is represented by 4 bits in a byte.
Enumerator | |
---|---|
sl_bt_cs_abort_reason_no_abort | (0x0) Not aborted |
sl_bt_cs_abort_reason_host_request | (0x1) Local or remote host request |
sl_bt_cs_abort_reason_insufficient_channels | (0x2) Filtered channel has less than 15 channels |
sl_bt_cs_abort_reason_no_map_update | (0x3) Channel map update instant has passed |
sl_bt_cs_abort_reason_unspecified | (0xf) Unspecified reasons for abortion |
12350
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cs_config_state_t#
sl_bt_cs_config_state_t
Specifies the role for the device during ABR procedure.
Enumerator | |
---|---|
sl_bt_cs_config_state_removed | (0x0) The ABR device configuration is removed |
sl_bt_cs_config_state_created | (0x1) The ABR device configuration is created |
12368
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
Function Documentation#
sl_bt_cs_security_enable#
sl_status_t sl_bt_cs_security_enable (uint8_t connection)
[in] | connection | Connection handle |
Start or restart ABR security start procedure for the specified connection.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_cs_security_enable_complete - Triggered when ABR security start procedure has completed.
12824
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cs_set_default_settings#
sl_status_t sl_bt_cs_set_default_settings (uint8_t connection, uint8_t initiator_status, uint8_t reflector_status, uint8_t antenna_identifier, int8_t max_tx_power)
[in] | connection | Connection handle |
[in] | initiator_status | Enum sl_bt_cs_role_status_t. Enable or disable status of the Initiator role. Values:
|
[in] | reflector_status | Enum sl_bt_cs_role_status_t. Enable or disable status of the Reflector role. Values:
|
[in] | antenna_identifier | Antenna identifier to be used for ABR sync packets.
|
[in] | max_tx_power | Maximum transmit power level to be used in all ABR transmissions. Units: dBm.
|
Set the default ABR settings for the specified connection. By default, all roles are disabled and the antenna is set to 1.
Returns
SL_STATUS_OK if successful. Error code otherwise.
12850
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cs_create_config#
sl_status_t sl_bt_cs_create_config (uint8_t connection, uint8_t config_id, uint8_t create_context, uint8_t main_mode_type, uint8_t sub_mode_type, uint8_t min_main_mode_steps, uint8_t max_main_mode_steps, uint8_t main_mode_repetition, uint8_t mode_calibration_steps, uint8_t role, uint8_t rtt_type, uint8_t cs_sync_phy, const sl_bt_cs_channel_map_t * channel_map, uint8_t channel_map_repetition, uint8_t channel_selection_type, uint8_t ch3c_shape, uint8_t ch3c_jump, uint8_t companion_signal_state)
[in] | connection | The connection handle |
[in] | config_id | ABR configuration identifier.
|
[in] | create_context | Defines in which device the created configuration will be written
|
[in] | main_mode_type | Enum sl_bt_cs_mode_t. Main mode type. Values:
|
[in] | sub_mode_type | Enum sl_bt_cs_mode_t. Sub mode type. Values:
|
[in] | min_main_mode_steps | Minimum number of ABR main mode steps to be executed prior to a sub mode step.
|
[in] | max_main_mode_steps | Maximum number of ABR main mode steps to be executed prior to a sub mode step.
|
[in] | main_mode_repetition | Number of main mode steps taken from the end of the last ABR subevent to be repeated at the beginning of the current ABR subevent directly after the value r last Mode 0 step of that event.
|
[in] | mode_calibration_steps | Number of Mode 0 steps to be included at the beginning of the test ABR subevent
|
[in] | role | Enum sl_bt_cs_role_t. Device's role during the ABR procedure Values:
|
[in] | rtt_type | Enum sl_bt_cs_rtt_type_t. RTT payload type used in the ABR procedure Values:
|
[in] | cs_sync_phy | Enum sl_bt_gap_phy_t. Used PHY for ABR SYNC exchanges during a procedure Values:
|
[in] | channel_map | A fixed length byte array of 10 bytes consisting of 79 1-bit fields. The nth such field (in the range 0 to 78) contains the value for the ABR channel index n.
The rest of most significant bits are reserved for future use and must be set to 0. Channels n = 0, 1, 23, 24, 25, 77 and 78 shall be ignored and not used for ABR. At least 15 channels shall be marked as used. |
[in] | channel_map_repetition | Number of times the channel_map field will be cycled through for non-Mode 0 steps within an ABR procedure.
|
[in] | channel_selection_type | Enum sl_bt_cs_channel_selection_algorithm_t. Channel selection algorithm Values:
|
[in] | ch3c_shape | Enum sl_bt_cs_ch3c_shape_t. Ch3c shape Values:
|
[in] | ch3c_jump | Number of channels skipped in each rising and falling sequence.
|
[in] | companion_signal_state | Enum sl_bt_cs_companion_signal_status_t. Companion device's signal status Values:
|
Create a new ABR configuration in the local and remote controller. The role used in this command must be enabled prior to issuing this command using sl_bt_cs_set_default_settings command.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_cs_config_complete - Triggered when an ABR configuration procedure completed
12956
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cs_remove_config#
sl_status_t sl_bt_cs_remove_config (uint8_t connection, uint8_t config_id)
[in] | connection | Connection handle |
[in] | config_id | ABR configuration identifier
|
Remove an ABR configuration from the local controller.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_cs_config_complete - Triggered when an ABR configuration procedure is completed
12990
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cs_set_channel_classification#
sl_status_t sl_bt_cs_set_channel_classification (const sl_bt_cs_channel_map_t * channel_map)
[in] | channel_map | A fixed length byte array of 10 bytes consisting of 79 1-bit fields. The nth field (in the range 0 to 78) contains the value for the link layer channel index n.
The rest of most significant bits are reserved for future use and must be set to 0. Channels n = 0, 1, 23, 24, 25, 77 and 78 shall be ignored and not used for ABR. |
Update the channel classification for ABR. This classification persists until overwritten with a subsequent command or until the system is reset.
Returns
SL_STATUS_OK if successful. Error code otherwise.
13014
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cs_set_procedure_parameters#
sl_status_t sl_bt_cs_set_procedure_parameters (uint8_t connection, uint8_t config_id, uint16_t max_procedure_len, uint16_t min_procedure_interval, uint16_t max_procedure_interval, uint16_t max_procedure_count, uint32_t min_subevent_len, uint32_t max_subevent_len, uint8_t tone_antenna_config_selection, uint8_t phy, int8_t tx_pwr_delta, uint8_t preferred_peer_antenna)
[in] | connection | The connection handle |
[in] | config_id | ABR configuration identifier.
|
[in] | max_procedure_len | Maximum duration for each measurement procedure. Value in units of 0.625 ms.
|
[in] | min_procedure_interval | Minimum duration in number of connection events between consecutive measurement procedure.
|
[in] | max_procedure_interval | Maximum duration in number of connection events between consecutive measurement procedure.
|
[in] | max_procedure_count | Maximum number of ABR procedures to be scheduled
|
[in] | min_subevent_len | Minimum suggested duration for each ABR subevent. Units: microseconds.
|
[in] | max_subevent_len | Maximum suggested duration for each ABR subevent. Units: microseconds.
|
[in] | tone_antenna_config_selection | Antenna configuration index
|
[in] | phy | Enum sl_bt_gap_phy_t. PHY on which the ABR transmission will take place Values:
|
[in] | tx_pwr_delta | Transmit power delta. Units: dB.
|
[in] | preferred_peer_antenna | Preferred peer-ordered antenna elements to be used by the remote device for the antenna configuration denoted by the tone antenna config selection.
|
Set the parameters for scheduling ABR procedures with the remote device.
Returns
SL_STATUS_OK if successful. Error code otherwise.
13068
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cs_procedure_enable#
sl_status_t sl_bt_cs_procedure_enable (uint8_t connection, uint8_t enable, uint8_t config_id)
[in] | connection | The connection handle |
[in] | enable | Enum sl_bt_cs_procedure_state_t. Enabled or disabled ABR procedure state. Values:
|
[in] | config_id | ABR configuration identifier |
Enable or disable scheduling ABR procedures with the remote device.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_cs_procedure_enable_complete - Triggered when local controller has scheduled or disabled an ABR procedure measurement
sl_bt_evt_cs_result - Triggered when local controller has results to report for every ABR event within the ABR procedure
13103
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cs_set_antenna_configuration#
sl_status_t sl_bt_cs_set_antenna_configuration (size_t antenna_element_offset_len, const uint8_t * antenna_element_offset)
[in] | antenna_element_offset_len | Length of data in |
[in] | antenna_element_offset | Offset of each antenna, each element is a signed 16-bit integer stored in two consecutive bytes in little-endian order. Units: 1 cm. |
Set the antenna configuration for the ABR feature.
Returns
SL_STATUS_OK if successful. Error code otherwise.
13120
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
Macro Definition Documentation#
sl_bt_cmd_cs_security_enable_id#
#define sl_bt_cmd_cs_security_enable_idValue:
0x00590020
12195
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_cs_set_default_settings_id#
#define sl_bt_cmd_cs_set_default_settings_idValue:
0x01590020
12196
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_cs_create_config_id#
#define sl_bt_cmd_cs_create_config_idValue:
0x02590020
12197
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_cs_remove_config_id#
#define sl_bt_cmd_cs_remove_config_idValue:
0x03590020
12198
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_cs_set_channel_classification_id#
#define sl_bt_cmd_cs_set_channel_classification_idValue:
0x04590020
12199
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_cs_set_procedure_parameters_id#
#define sl_bt_cmd_cs_set_procedure_parameters_idValue:
0x05590020
12200
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_cs_procedure_enable_id#
#define sl_bt_cmd_cs_procedure_enable_idValue:
0x06590020
12201
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_cs_set_antenna_configuration_id#
#define sl_bt_cmd_cs_set_antenna_configuration_idValue:
0x07590020
12202
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_cs_security_enable_id#
#define sl_bt_rsp_cs_security_enable_idValue:
0x00590020
12203
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_cs_set_default_settings_id#
#define sl_bt_rsp_cs_set_default_settings_idValue:
0x01590020
12204
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_cs_create_config_id#
#define sl_bt_rsp_cs_create_config_idValue:
0x02590020
12205
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_cs_remove_config_id#
#define sl_bt_rsp_cs_remove_config_idValue:
0x03590020
12206
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_cs_set_channel_classification_id#
#define sl_bt_rsp_cs_set_channel_classification_idValue:
0x04590020
12207
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_cs_set_procedure_parameters_id#
#define sl_bt_rsp_cs_set_procedure_parameters_idValue:
0x05590020
12208
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_cs_procedure_enable_id#
#define sl_bt_rsp_cs_procedure_enable_idValue:
0x06590020
12209
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_cs_set_antenna_configuration_id#
#define sl_bt_rsp_cs_set_antenna_configuration_idValue:
0x07590020
12210
of file /mnt/raid/workspaces/ws.0zwF9W456/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h