Channel Sounding#

Channel Sounding.

This class provides commands and events for Channel Sounding (CS) between Bluetooth devices.

Any CS command that involves a remote device requires that the connection with the remote device is encrypted.

Modules#

sl_bt_evt_cs_security_enable_complete

sl_bt_evt_cs_config_complete

sl_bt_evt_cs_procedure_enable_complete

sl_bt_evt_cs_result

sl_bt_evt_cs_result_continue

sl_bt_evt_cs_read_remote_supported_capabilities_complete

Enumerations#

enum
sl_bt_cs_role_initiator = 0x0
sl_bt_cs_role_reflector = 0x1
}

Specifies the role for the device during CS procedure.

enum
sl_bt_cs_role_status_disable = 0x0
sl_bt_cs_role_status_enable = 0x1
}

Defines the status of a given role for an CS capable device.

enum
sl_bt_cs_procedure_state_disabled = 0x0
sl_bt_cs_procedure_state_enabled = 0x1
}

Defines the CS procedure state for the device.

enum
sl_bt_cs_mode_rtt = 0x1
sl_bt_cs_mode_pbr = 0x2
sl_bt_cs_submode_disabled = 0xff
}

Defines the different modes for CS steps.

enum
sl_bt_cs_rtt_type_aa_only = 0x0
sl_bt_cs_rtt_type_fractional_32_bit_sounding = 0x1
sl_bt_cs_rtt_type_fractional_96_bit_sounding = 0x2
sl_bt_cs_rtt_type_fractional_32_bit_random = 0x3
sl_bt_cs_rtt_type_fractional_64_bit_random = 0x4
sl_bt_cs_rtt_type_fractional_96_bit_random = 0x5
sl_bt_cs_rtt_type_fractional_128_bit_random = 0x6
}

Defines the Round Trip Time (RTT) payload types used during the CS sequence.

enum
sl_bt_cs_channel_selection_algorithm_3b = 0x0
sl_bt_cs_channel_selection_algorithm_3c = 0x1
sl_bt_cs_channel_selection_algorithm_user_shape_interleaved = 0x2
}

Specifies the CS channel selection algorithms.

enum
sl_bt_cs_ch3c_shape_hat = 0x0
sl_bt_cs_chc3_shape_interleaved = 0x1
}

Specifies the ch3c shapes.

enum
sl_bt_cs_done_status_complete = 0x0
sl_bt_cs_done_status_partial_results_continue = 0x1
sl_bt_cs_done_status_aborted = 0xf
}

Describes the current status of the procedure or subevents.

enum
sl_bt_cs_config_state_removed = 0x0
sl_bt_cs_config_state_created = 0x1
}

Specifies the role for the device during CS procedure.

enum
sl_bt_cs_snr_control_adjustment_not_applied = 0xff
}

Specifies the Signal Noise Ration (SNR) used to control transmission of CS_SYNC packets. Currently the SiSDK does not support the SNR control adjustment.

Functions#

sl_status_t
sl_bt_cs_security_enable(uint8_t connection)
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)
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 reserved)
sl_status_t
sl_bt_cs_remove_config(uint8_t connection, uint8_t config_id)
sl_status_t
sl_bt_cs_set_channel_classification(const sl_bt_cs_channel_map_t *channel_map)
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, uint8_t snr_control_initiator, uint8_t snr_control_reflector)
sl_status_t
sl_bt_cs_procedure_enable(uint8_t connection, uint8_t enable, uint8_t config_id)
sl_status_t
sl_bt_cs_set_antenna_configuration(size_t antenna_element_offset_len, const uint8_t *antenna_element_offset)
sl_status_t
sl_bt_cs_read_local_supported_capabilities(uint8_t *num_config, uint16_t *max_consecutive_procedures, uint8_t *num_antennas, uint8_t *max_antenna_paths, uint8_t *roles, uint8_t *modes, uint8_t *rtt_capability, uint8_t *rtt_aa_only, uint8_t *rtt_sounding, uint8_t *rtt_random_payload, uint8_t *cs_sync_phys, uint16_t *subfeatures, uint16_t *t_ip1_times, uint16_t *t_ip2_times, uint16_t *t_fcs_times, uint16_t *t_pm_times, uint8_t *t_sw_times, uint8_t *tx_snr_capability)
sl_status_t

Enumeration Documentation#

sl_bt_cs_role_t#

sl_bt_cs_role_t

Specifies the role for the device during CS 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


Definition at line 12148 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_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 CS 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


Definition at line 12159 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_cs_procedure_state_t#

sl_bt_cs_procedure_state_t

Defines the CS procedure state for the device.

Enumerator
sl_bt_cs_procedure_state_disabled

(0x0) CS procedures are disabled

sl_bt_cs_procedure_state_enabled

(0x1) CS procedures are enabled


Definition at line 12168 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_cs_mode_t#

sl_bt_cs_mode_t

Defines the different modes for CS steps.

Enumerator
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_submode_disabled

(0xff) Submode disabled for the procedure.


Definition at line 12177 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_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 CS sequence.

Enumerator
sl_bt_cs_rtt_type_aa_only

(0x0) RTT Access Address (AA) only

sl_bt_cs_rtt_type_fractional_32_bit_sounding

(0x1) RTT Fractional with 32-bit Sounding Sequence

sl_bt_cs_rtt_type_fractional_96_bit_sounding

(0x2) RTT Fractional with 96-bit Sounding Sequence

sl_bt_cs_rtt_type_fractional_32_bit_random

(0x3) RTT Fractional with 32-bit Random Sequence

sl_bt_cs_rtt_type_fractional_64_bit_random

(0x4) RTT Fractional with 64-bit Random Sequence

sl_bt_cs_rtt_type_fractional_96_bit_random

(0x5) RTT Fractional with 96-bit Random Sequence

sl_bt_cs_rtt_type_fractional_128_bit_random

(0x6) RTT Fractional with 128-bit Random Sequence


Definition at line 12190 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_cs_channel_selection_algorithm_t#

sl_bt_cs_channel_selection_algorithm_t

Specifies the CS channel selection algorithms.

Enumerator
sl_bt_cs_channel_selection_algorithm_3b

(0x0) Use Channel Selection Algorithm #3b for non-mode 0 CS steps

sl_bt_cs_channel_selection_algorithm_3c

(0x1) Use Channel Selection Algorithm #3c for non-mode 0 CS steps

sl_bt_cs_channel_selection_algorithm_user_shape_interleaved

(0x2) Use Interleaved shape for user specified channel sequence


Definition at line 12217 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_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


Definition at line 12253 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_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 CS procedure or subevent

sl_bt_cs_done_status_partial_results_continue

(0x1) Partial results with more to follow

sl_bt_cs_done_status_aborted

(0xf) Current procedure and all subsequent subevents in the procedure aborted or current subevent aborted.


Definition at line 12264 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_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 CS procedure.

Enumerator
sl_bt_cs_config_state_removed

(0x0) The CS device configuration is removed

sl_bt_cs_config_state_created

(0x1) The CS device configuration is created


Definition at line 12284 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_cs_snr_control_adjustment_t#

sl_bt_cs_snr_control_adjustment_t

Specifies the Signal Noise Ration (SNR) used to control transmission of CS_SYNC packets. Currently the SiSDK does not support the SNR control adjustment.

Enumerator
sl_bt_cs_snr_control_adjustment_not_applied

(0xff) SNR control adjustment not to be applied


Definition at line 12297 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

Function Documentation#

sl_bt_cs_security_enable#

sl_status_t sl_bt_cs_security_enable (uint8_t connection)
Parameters
[in]connection

Connection handle

Start or restart CS security start procedure for the specified connection. This command returns SL_STATUS_BT_CTRL_INSUFFICIENT_SECURITY if the connection is not encrypted.

This command returns SL_STATUS_BT_CTRL_COMMAND_DISALLOWED if the device is not the central in the connection.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 13157 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_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)
Parameters
[in]connection

Connection handle

[in]initiator_status

Enum sl_bt_cs_role_status_t. Enable or disable status of the Initiator role. Values:

  • sl_bt_cs_role_status_disable (0x0): The given role is disabled

  • sl_bt_cs_role_status_enable (0x1): The given role is enabled

[in]reflector_status

Enum sl_bt_cs_role_status_t. Enable or disable status of the Reflector role. Values:

  • sl_bt_cs_role_status_disable (0x0): The given role is disabled

  • sl_bt_cs_role_status_enable (0x1): The given role is enabled

[in]antenna_identifier

Antenna identifier to be used for CS sync packets.

  • Range: 1 to 4

[in]max_tx_power

Maximum transmit power level to be used in all CS transmissions. Units: dBm.

  • Range: -127 to +20

Set the default CS settings for the specified connection. By default, all roles are disabled and the antenna is set to 1.

This command returns SL_STATUS_BT_CTRL_INVALID_COMMAND_PARAMETERS if the device is trying to disable a role for which a valid CS configuration is present.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 13187 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_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 reserved)
Parameters
[in]connection

The connection handle

[in]config_id

CS configuration identifier.

  • Range: 0 to 3

[in]create_context

Defines in which device the created configuration will be written

  • Value: 0x00. Write CS configuration in the local controller only

  • Value: 0x01. Write CS configuration in both the local and remote controller using a configuration procedure

[in]main_mode_type

Enum sl_bt_cs_mode_t. Main mode type. Values:

  • 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_submode_disabled (0xff): Submode disabled for the procedure.

[in]sub_mode_type

Enum sl_bt_cs_mode_t. Sub mode type. Values:

  • 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_submode_disabled (0xff): Submode disabled for the procedure.

[in]min_main_mode_steps

Minimum number of CS main mode steps to be executed prior to a sub mode step.

  • Range: 2 to 255

[in]max_main_mode_steps

Maximum number of CS main mode steps to be executed prior to a sub mode step.

  • Range: 2 to 255

[in]main_mode_repetition

Number of main mode steps taken from the end of the last CS subevent to be repeated at the beginning of the current CS subevent directly after the value r last Mode 0 step of that event.

  • Range: 0 to 3

[in]mode_calibration_steps

Number of Mode 0 steps to be included at the beginning of the test CS subevent

  • Range: 1 to 3

[in]role

Enum sl_bt_cs_role_t. Device's role during the CS procedure Values:

  • sl_bt_cs_role_initiator (0x0): The device will initiate the procedure

  • sl_bt_cs_role_reflector (0x1): The device will reciprocate transmission

[in]rtt_type

Enum sl_bt_cs_rtt_type_t. RTT payload type used in the CS procedure Values:

  • sl_bt_cs_rtt_type_aa_only (0x0): RTT Access Address (AA) only

  • sl_bt_cs_rtt_type_fractional_32_bit_sounding (0x1): RTT Fractional with 32-bit Sounding Sequence

  • sl_bt_cs_rtt_type_fractional_96_bit_sounding (0x2): RTT Fractional with 96-bit Sounding Sequence

  • sl_bt_cs_rtt_type_fractional_32_bit_random (0x3): RTT Fractional with 32-bit Random Sequence

  • sl_bt_cs_rtt_type_fractional_64_bit_random (0x4): RTT Fractional with 64-bit Random Sequence

  • sl_bt_cs_rtt_type_fractional_96_bit_random (0x5): RTT Fractional with 96-bit Random Sequence

  • sl_bt_cs_rtt_type_fractional_128_bit_random (0x6): RTT Fractional with 128-bit Random Sequence

[in]cs_sync_phy

Enum sl_bt_gap_phy_t. Used PHY for CS SYNC exchanges during a procedure Values:

  • sl_bt_gap_phy_1m (0x1): 1M PHY

[in]channel_map

A fixed length byte array of 10 bytes consisting of 80 1-bit fields.

The nth such field (in the range 0 to 78) contains the value for the CS channel index n.

  • Bit value 0: Channel n is disabled

  • Bit value 1: Channel n is enabled

The most significant bit (79) is 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 CS. 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 CS procedure.

  • Range: 1 to 255

[in]channel_selection_type

Enum sl_bt_cs_channel_selection_algorithm_t. Channel selection algorithm Values:

  • sl_bt_cs_channel_selection_algorithm_3b (0x0): Use Channel Selection Algorithm #3b for non-mode 0 CS steps

  • sl_bt_cs_channel_selection_algorithm_3c (0x1): Use Channel Selection Algorithm #3c for non-mode 0 CS steps

  • sl_bt_cs_channel_selection_algorithm_user_shape_interleaved (0x2): Use Interleaved shape for user specified channel sequence

[in]ch3c_shape

Enum sl_bt_cs_ch3c_shape_t. Ch3c shape Values:

  • 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

[in]ch3c_jump

Number of channels skipped in each rising and falling sequence.

  • Range: 2 to 8

[in]reserved

Reserved for future use.

Create a new CS 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.

This command returns SL_STATUS_BT_CTRL_UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE if the local or the remote controller does not support that CS feature.

This command returns SL_STATUS_BT_CTRL_INVALID_COMMAND_PARAMETERS if there is no valid CS configuration previously created for the specified connection. These are created with the sl_bt_cs_set_default_settings.

This command returns SL_STATUS_BT_CTRL_COMMAND_DISALLOWED if a previously created CS configuration is enabled or ongoing for the specified connection, by calling sl_bt_cs_procedure_enable.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 13306 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_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)
Parameters
[in]connection

Connection handle

[in]config_id

CS configuration identifier

  • Range: 0 to 3

Remove an CS configuration from the local controller.

This command returns SL_STATUS_BT_CTRL_INVALID_COMMAND_PARAMETERS if the config_id does not exist .

This command returns SL_STATUS_BT_CTRL_COMMAND_DISALLOWED if there is one or more CS procedures enabled with the sl_bt_cs_procedure_enable command.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 13346 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_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)
Parameters
[in]channel_map

A fixed length byte array of 10 bytes consisting of 80 1-bit fields.

The nth field (in the range 0 to 78) contains the value for the link layer channel index n.

  • Bit value 0: Channel n is disabled.

  • Bit value 1: Channel n is enabled.

The most significant bit (79) is 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 CS.

Update the channel classification for CS. This classification persists until overwritten with a subsequent command or until the system is reset.

This command returns SL_STATUS_BT_CTRL_COMMAND_DISALLOWED if this command was issued after less than one second before.

This command returns SL_STATUS_BT_CTRL_INVALID_COMMAND_PARAMETERS if less than 15 channels are enabled.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 13376 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_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, uint8_t snr_control_initiator, uint8_t snr_control_reflector)
Parameters
[in]connection

The connection handle

[in]config_id

CS configuration identifier.

  • Range: 0 to 3

[in]max_procedure_len

Maximum duration for each measurement procedure. Value in units of 0.625 ms.

  • Range: 1 to 65535

  • Time: N x 0.625ms. N being the input.

  • Time range: 0.625 ms to 40.959375 s.

[in]min_procedure_interval

Minimum duration in number of connection events between consecutive measurement procedure.

  • Range: 1 to 65535

[in]max_procedure_interval

Maximum duration in number of connection events between consecutive measurement procedure.

  • Range: 1 to 65535

[in]max_procedure_count

Maximum number of CS procedures to be scheduled.

  • Range: 1 to 65535

  • Value: 0x00. Procedures to continue until disabled.

[in]min_subevent_len

Minimum suggested duration for each CS subevent. Units: microseconds.

  • Range: 1250 to 3999999

  • Time range: 1250 us to 4s

[in]max_subevent_len

Maximum suggested duration for each CS subevent. Units: microseconds.

  • Range: 1250 to 3999999

  • Time range: 1250 us to 4s

[in]tone_antenna_config_selection

Antenna configuration index

  • Range: 0 to 7

[in]phy

Enum sl_bt_gap_phy_t. PHY used by the controller to determine the base transmit power for the CS procedure. The final transmit power level will be the lesser of the configured maximum transmission power for the PHY and the sum of the connection transmission power and the remote controller's power delta. Values:

  • sl_bt_gap_phy_1m (0x1): 1M PHY

  • sl_bt_gap_phy_2m (0x2): 2M PHY

  • sl_bt_gap_phy_coded (0x4): Coded PHY, 125k (S=8) or 500k (S=2)

  • sl_bt_gap_phy_any (0xff): Any PHYs the device supports

[in]tx_pwr_delta

Indicates the recommended difference between the remote controller's power level for the CS tones and RTT packets and the power level for the PHY indicated by the PHY parameter. Units: dB.

  • Value: 0x80. Host does not have a recommendation for transmit power delta

[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.

  • 0x01, bit 0: Use first ordered antenna element

  • 0x02, bit 1: Use second ordered antenna element

  • 0x04, bit 2: Use third ordered antenna element

  • 0x08, bit 3: Use fourth ordered antenna element

[in]snr_control_initiator

Enum sl_bt_cs_snr_control_adjustment_t. The Signal Noise Ratio (SNR) control adjustment for the CS_SYNC transmissions of the initiator. Values:

  • sl_bt_cs_snr_control_adjustment_not_applied (0xff): SNR control adjustment not to be applied

[in]snr_control_reflector

Enum sl_bt_cs_snr_control_adjustment_t. The Signal Noise Ratio (SNR) control adjustment for the CS_SYNC transmissions of the reflector. Values:

  • sl_bt_cs_snr_control_adjustment_not_applied (0xff): SNR control adjustment not to be applied

Set the parameters for scheduling CS procedures with the remote device. The parameters set by this command become invalid after removing the config_id with sl_bt_cs_remove_config.

This command returns SL_STATUS_BT_CTRL_INVALID_COMMAND_PARAMETERS if the config_id does not exists or was previously removed with sl_bt_cs_remove_config

This command returns SL_STATUS_BT_CTRL_INVALID_COMMAND_PARAMETERS if less than 15 channels are enabled.

This command returns SL_STATUS_BT_CTRL_INSUFFICIENT_CHANNELS if there are less than 15 channels available.

This command returns SL_STATUS_BT_CTRL_COMMAND_DISALLOWED if the CS procedure has been previously enabled.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 13469 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_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)
Parameters
[in]connection

The connection handle

[in]enable

Enum sl_bt_cs_procedure_state_t. Enabled or disabled CS procedure state. Values:

  • sl_bt_cs_procedure_state_disabled (0x0): CS procedures are disabled

  • sl_bt_cs_procedure_state_enabled (0x1): CS procedures are enabled

[in]config_id

CS configuration identifier

Enable or disable scheduling CS procedures with the remote device.

This command returns SL_STATUS_BT_CTRL_COMMAND_DISALLOWED if the sl_bt_cs_set_procedure_parameters has not been called previosly for that config_id.

This command returns SL_STATUS_BT_CTRL_INVALID_COMMAND_PARAMETERS if the config_id does not exists or was previously removed with sl_bt_cs_remove_config.

This command returns SL_STATUS_BT_CTRL_COMMAND_DISALLOWED if the CS procedure has been previously enabled by calling sl_bt_cs_procedure_enable.

This command returns SL_STATUS_BT_CTRL_INSUFFICIENT_CHANNELS if there are less than 15 channels available.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 13520 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_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)
Parameters
[in]antenna_element_offset_len

Length of data in antenna_element_offset

[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 CS feature.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 13537 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_cs_read_local_supported_capabilities#

sl_status_t sl_bt_cs_read_local_supported_capabilities (uint8_t * num_config, uint16_t * max_consecutive_procedures, uint8_t * num_antennas, uint8_t * max_antenna_paths, uint8_t * roles, uint8_t * modes, uint8_t * rtt_capability, uint8_t * rtt_aa_only, uint8_t * rtt_sounding, uint8_t * rtt_random_payload, uint8_t * cs_sync_phys, uint16_t * subfeatures, uint16_t * t_ip1_times, uint16_t * t_ip2_times, uint16_t * t_fcs_times, uint16_t * t_pm_times, uint8_t * t_sw_times, uint8_t * tx_snr_capability)
Parameters
[out]num_config

The number of CS configurations supported per connection.

  • Range: 1 to 4

[out]max_consecutive_procedures

The maximum number of consecutive CS procedures supported.

  • Range: 1 to 65535

  • 0x00: Fixed number of consecutive procedures and for an indefinite number of procedures until termination

[out]num_antennas

The number of antenna elements available for CS tone exchanges.

  • Range: 1 to 4

[out]max_antenna_paths

The maximum number of antenna paths supported.

  • Range: 1 to 4

[out]roles

This value is a bitmask of flags to indicate which CS roles are supported by the controller. Flags:

  • 0x01, bit 0: Initiator role

  • 0x02, bit 1: Reflector role

[out]modes

This value is a bitmask of flags to indicate which Optional CS modes are supported. Flags:

  • 0x01, bit 0: Mode 3 is supported

[out]rtt_capability

This value is a bitmask of flags to indicate which Round Trip Time (RTT) CS capabilities accuracy requirement in rtt_aa_only_n, rtt_sounding_n, and rtt_random_payload. Flags:

  • 0x01, bit 0: 10 ns time-of-flight (ToF) precision requirement for rtt_aa_only if set; otherwise 150 ns ToF

  • 0x02, bit 1: 10 ns ToF precision requirement for rtt_sounding if set; otherwise 150 ns ToF

  • 0x04, bit 2: 10 ns ToF precision requirement for rtt_random_payload if set; otherwise 150 ns ToF

[out]rtt_aa_only

The support status of RTT Access Address(AA) in the local controller. When supported it establishes the number of SYNC changes needed to satisfy the precision requirements.

  • Range: 1 to 255

  • 0x00: RTT AA Only is not supported

[out]rtt_sounding

The support status of RTT Sounding is supported in the local controller. When supported it establishes the number of SYNC changes needed to satisfy the precision requirements.

  • Range: 1 to 255

  • 0x00: RTT Sounding is not supported

[out]rtt_random_payload

The support status of RTT Random Payload in the local controller. When supported it establishes the number of SYNC changes needed to satisfy the precision requirements.

  • Range: 1 to 255

  • 0x00: RTT Random Payload is not supported

[out]cs_sync_phys

This value is a bitmask of flags to indicate which CS_SYNC packages supported in an specific PHY. Flags:

  • 0x02, bit 1: LE 2M PHY CS_SYNC packages are supported

  • 0x04, bit 2: LE 2M 2BT PHY CS_SYNC packages are supported

[out]subfeatures

This value is a bitmask of flags to indicate which optional CS subfeatures are supported. Flags:

  • 0x01, bit 0: CS with zero Frequency Actuation Error relative to Mode 0 transmissions in reflector role is supported

  • 0x02, bit 1: CS Channel Selection Algorithm #3c is supported

  • 0x04, bit 2: CS phase-based ranging from a sounding sequence is supported

[out]t_ip1_times

This value is a bitmask of flags to indicate which time durations of Time for Interlude Period 1 (IP1) are supported. Flags:

  • 0x0001, bit 0: Time durantion of 10 microseconds is supported

  • 0x0002, bit 1: Time durantion of 20 microseconds is supported

  • 0x0004, bit 2: Time durantion of 30 microseconds is supported

  • 0x0008, bit 3: Time durantion of 40 microseconds is supported

  • 0x0010, bit 4: Time durantion of 50 microseconds is supported

  • 0x0020, bit 5: Time durantion of 60 microseconds is supported

  • 0x0040, bit 6: Time durantion of 80 microseconds is supported

[out]t_ip2_times

This value is a bitmask of flags to indicate which time durations of Time for Interlude Period 2 (IP2) are supported. Flags:

  • 0x0001, bit 0: Time duration of 10 microseconds is supported

  • 0x0002, bit 1: Time duration of 20 microseconds is supported

  • 0x0004, bit 2: Time duration of 30 microseconds is supported

  • 0x0008, bit 3: Time duration of 40 microseconds is supported

  • 0x0010, bit 4: Time duration of 50 microseconds is supported

  • 0x0020, bit 5: Time duration of 60 microseconds is supported

  • 0x0040, bit 6: Time duration of 80 microseconds is supported

[out]t_fcs_times

This value is a bitmask of flags to indicate which durations of Time for Frequency Change Spacing (FCS) are supported. Flags:

  • 0x0001, bit 0: Time duration of 10 microseconds is supported

  • 0x0002, bit 1: Time duration of 20 microseconds is supported

  • 0x0004, bit 2: Time duration of 30 microseconds is supported

  • 0x0008, bit 3: Time duration of 40 microseconds is supported

  • 0x0010, bit 4: Time duration of 50 microseconds is supported

  • 0x0020, bit 5: Time duration of 60 microseconds is supported

  • 0x0040, bit 6: Time duration of 80 microseconds is supported

  • 0x0100, bit 7: Time duration of 100 microseconds is supported

  • 0x0200, bit 8: Time duration of 120 microseconds is supported

[out]t_pm_times

This value is a bitmask of flags to indicate which time durations of Time for Phase Measurement (PM) are supported. Flags:

  • 0x0001, bit 0: Time duration of 10 microseconds is supported

  • 0x0002, bit 1: Time duration of 20 microseconds is supported

[out]t_sw_times

Time in microseconds for the antenna switch period of the CS tones.

  • Values: 0x00, 0x01, 0x02, 0x04 and 0x0A

[out]tx_snr_capability

This value is a bitmask of flags to indicate the supported SNR levels used in RTT packets. Flags:

  • 0x01, bit 0: 18 dB supported

  • 0x02, bit 1: 21 dB supported

  • 0x04, bit 2: 24 dB supported

  • 0x08, bit 3: 27 dB supported

  • 0x10, bit 4: 30 dB supported

Read the CS capabilities of the local controller.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 13657 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_cs_read_remote_supported_capabilities#

sl_status_t sl_bt_cs_read_remote_supported_capabilities (uint8_t connection)
Parameters
[in]connection

Connection handle

Read the Channel Sounding (CS) capabilities of the remote controller.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 13690 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

Macro Definition Documentation#

sl_bt_cmd_cs_security_enable_id#

#define sl_bt_cmd_cs_security_enable_id
Value:
0x00590020

Definition at line 12124 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_cmd_cs_set_default_settings_id#

#define sl_bt_cmd_cs_set_default_settings_id
Value:
0x01590020

Definition at line 12125 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_cmd_cs_create_config_id#

#define sl_bt_cmd_cs_create_config_id
Value:
0x02590020

Definition at line 12126 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_cmd_cs_remove_config_id#

#define sl_bt_cmd_cs_remove_config_id
Value:
0x03590020

Definition at line 12127 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_cmd_cs_set_channel_classification_id#

#define sl_bt_cmd_cs_set_channel_classification_id
Value:
0x04590020

Definition at line 12128 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_cmd_cs_set_procedure_parameters_id#

#define sl_bt_cmd_cs_set_procedure_parameters_id
Value:
0x05590020

Definition at line 12129 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_cmd_cs_procedure_enable_id#

#define sl_bt_cmd_cs_procedure_enable_id
Value:
0x06590020

Definition at line 12130 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_cmd_cs_set_antenna_configuration_id#

#define sl_bt_cmd_cs_set_antenna_configuration_id
Value:
0x07590020

Definition at line 12131 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_cmd_cs_read_local_supported_capabilities_id#

#define sl_bt_cmd_cs_read_local_supported_capabilities_id
Value:
0x08590020

Definition at line 12132 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_cmd_cs_read_remote_supported_capabilities_id#

#define sl_bt_cmd_cs_read_remote_supported_capabilities_id
Value:
0x09590020

Definition at line 12133 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_rsp_cs_security_enable_id#

#define sl_bt_rsp_cs_security_enable_id
Value:
0x00590020

Definition at line 12134 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_rsp_cs_set_default_settings_id#

#define sl_bt_rsp_cs_set_default_settings_id
Value:
0x01590020

Definition at line 12135 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_rsp_cs_create_config_id#

#define sl_bt_rsp_cs_create_config_id
Value:
0x02590020

Definition at line 12136 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_rsp_cs_remove_config_id#

#define sl_bt_rsp_cs_remove_config_id
Value:
0x03590020

Definition at line 12137 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_rsp_cs_set_channel_classification_id#

#define sl_bt_rsp_cs_set_channel_classification_id
Value:
0x04590020

Definition at line 12138 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_rsp_cs_set_procedure_parameters_id#

#define sl_bt_rsp_cs_set_procedure_parameters_id
Value:
0x05590020

Definition at line 12139 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_rsp_cs_procedure_enable_id#

#define sl_bt_rsp_cs_procedure_enable_id
Value:
0x06590020

Definition at line 12140 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_rsp_cs_set_antenna_configuration_id#

#define sl_bt_rsp_cs_set_antenna_configuration_id
Value:
0x07590020

Definition at line 12141 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_rsp_cs_read_local_supported_capabilities_id#

#define sl_bt_rsp_cs_read_local_supported_capabilities_id
Value:
0x08590020

Definition at line 12142 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h

sl_bt_rsp_cs_read_remote_supported_capabilities_id#

#define sl_bt_rsp_cs_read_remote_supported_capabilities_id
Value:
0x09590020

Definition at line 12143 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/ble_host/ble_bgapi/inc/sl_bt_api.h