Channel Sounding Test#

Channel Sounding Test.

This class provides optional test commands and events for CS between Bluetooth devices.

Modules#

sl_bt_evt_cs_test_end_completed

Enumerations#

enum
sl_bt_cs_test_tone_extension_both_without = 0x0
sl_bt_cs_test_tone_extension_reflector_without = 0x1
sl_bt_cs_test_tone_extension_initiator_without = 0x2
sl_bt_cs_test_tone_extension_both_with = 0x3
sl_bt_cs_test_tone_extension_round_robin = 0x4
}

Defines tone extension for CS test.

enum
sl_bt_cs_test_sounding_sequence_marker_1 = 0x0
sl_bt_cs_test_sounding_sequence_marker_2 = 0x1
sl_bt_cs_test_sounding_sequence_marker_round_robin = 0x2
}

This defines sounding sequence marker for CS test.

Functions#

sl_status_t
sl_bt_cs_test_start(uint8_t main_mode_type, uint8_t sub_mode_type, uint8_t main_mode_repetition, uint8_t mode_calibration_steps, uint8_t role, uint8_t rtt_type, uint8_t cs_sync_phy, uint8_t antenna_selection, const sl_bt_cs_subevent_length_t *subevent_len, uint16_t subevent_interval, uint8_t max_num_subevents, int8_t tx_power, uint8_t t_ip1_time, uint8_t t_ip2_time, uint8_t t_fcs_time, uint8_t t_pm_time, uint8_t t_sw_time, uint8_t tone_antenna_config, uint8_t reserved, uint8_t snr_control_initiator, uint8_t snr_control_reflector, uint16_t drbg_nonce, uint8_t channel_map_repetition, uint16_t override_config, size_t override_parameters_len, const uint8_t *override_parameters)
sl_status_t

Macros#

#define
#define
#define
#define

Enumeration Documentation#

sl_bt_cs_test_tone_extension_t#

sl_bt_cs_test_tone_extension_t

Defines tone extension for CS test.

Enumerator
sl_bt_cs_test_tone_extension_both_without

(0x0) Initiator and Reflector tones sent without tone extension

sl_bt_cs_test_tone_extension_reflector_without

(0x1) Initiator tone sent with extension; Reflector tone sent without extension

sl_bt_cs_test_tone_extension_initiator_without

(0x2) Initiator tone sent without extension; Reflector tone sent with extension

sl_bt_cs_test_tone_extension_both_with

(0x3) Initiator and Reflector tones sent with extension

sl_bt_cs_test_tone_extension_round_robin

(0x4) Loop through values 0x00 to 0x03


Definition at line 13713 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_test_sounding_sequence_marker_t#

sl_bt_cs_test_sounding_sequence_marker_t

This defines sounding sequence marker for CS test.

Enumerator
sl_bt_cs_test_sounding_sequence_marker_1

(0x0) Use 0b0011 as the Sounding Sequence marker

sl_bt_cs_test_sounding_sequence_marker_2

(0x1) Use 0b1100 as the Sounding Sequence marker

sl_bt_cs_test_sounding_sequence_marker_round_robin

(0x2) Loop through 0b0011 and 0b1100


Definition at line 13739 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_test_start#

sl_status_t sl_bt_cs_test_start (uint8_t main_mode_type, uint8_t sub_mode_type, uint8_t main_mode_repetition, uint8_t mode_calibration_steps, uint8_t role, uint8_t rtt_type, uint8_t cs_sync_phy, uint8_t antenna_selection, const sl_bt_cs_subevent_length_t * subevent_len, uint16_t subevent_interval, uint8_t max_num_subevents, int8_t tx_power, uint8_t t_ip1_time, uint8_t t_ip2_time, uint8_t t_fcs_time, uint8_t t_pm_time, uint8_t t_sw_time, uint8_t tone_antenna_config, uint8_t reserved, uint8_t snr_control_initiator, uint8_t snr_control_reflector, uint16_t drbg_nonce, uint8_t channel_map_repetition, uint16_t override_config, size_t override_parameters_len, const uint8_t * override_parameters)
Parameters
[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]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 last Mode 0 step of that event.

  • Range: 0 to 3

[in]mode_calibration_steps

Number of calibration mode steps to be included at the beginning of the test CS subevent

  • Range: 1 to 3

[in]role

Enum sl_bt_cs_role_t. Role during 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

  • 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]antenna_selection

Antenna Identifier to be used for RTT packets

  • Range: 1 to 4

  • Value: 0xFE. Use antennas in repetitive order from 0x01 to 0x04

[in]subevent_len

CS subevent length in units of microseconds.

  • Range: 1250 to 3999999

  • Time range: 1250 us to 4s

[in]subevent_interval

Interval between the start of two consecutive CS events. Units: 0.625 ms.

  • Value: 0x0000. Single CS subevent

[in]max_num_subevents

The maximum allowed number of subevents in the procedure.

  • Value: 0x00. This parameter is ignored when determining the number of subevents in the procedure

  • Range: 1 to 32

[in]tx_power

Transmit power level for the transmission. Units: dBm.

  • Range: -127 to +20

  • Value: 0x7E. Set transmitter to minimum transmit power level

  • Value: 0x7F. Set transmitter to maximum transmit power level

[in]t_ip1_time

Idle time in microseconds between the RTT packets

  • Values: 10, 20, 30, 40, 50, 60, 80 or 145

[in]t_ip2_time

Interlude time in microseconds between the CS tones

  • Values: 10, 20, 30, 40, 50, 60, 80 or 145

[in]t_fcs_time

Time in microseconds for frequency changes

  • Values: 15, 20, 30, 40, 50, 60, 80, 100, 120 or 150

[in]t_pm_time

Time in microseconds for the phase measurement period of the CS tones

  • Values: 10, 20 or 40

[in]t_sw_time

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

  • Values: 0, 1, 2, 4 or 10

[in]tone_antenna_config

Antenna Configuration Index used during antenna switching

  • Range: 0 to 7

[in]reserved

Reserved for future use.

[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

[in]drbg_nonce

The DRBG_Nonce value determines octets 14 and 15 of the initial value of the DRBG nonce.

[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]override_config

Configuration of the parameters in override_parameters. Please refer to the Bluetooth Specification document on the HCI_CS_Test comamnd for more information on the override configuration details.

[in]override_parameters_len

Length of data in override_parameters

[in]override_parameters

Variable set of parameters. Please refer to the Bluetooth Specification document on the HCI_CS_Test comamnd for more information on the override parameters details.

Start a single CS procedure using the given configuration. The reflector must be initialized before starting the initiator. To stop an ongoing test, use the sl_bt_test_dtm_end command.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events

  • sl_bt_evt_cs_result - Triggered when local controller has results to report for every CS subevent within the CS procedure


Definition at line 13901 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_test_end#

sl_status_t sl_bt_cs_test_end ()

Stops any ongoing CS test. When the local controller has sent all the remaining subevents for the ongoing procedure it will generate an sl_bt_evt_cs_test_end_completed event.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 13943 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_test_start_id#

#define sl_bt_cmd_cs_test_start_id
Value:
0x005a0020

Definition at line 13705 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_test_end_id#

#define sl_bt_cmd_cs_test_end_id
Value:
0x015a0020

Definition at line 13706 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_test_start_id#

#define sl_bt_rsp_cs_test_start_id
Value:
0x005a0020

Definition at line 13707 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_test_end_id#

#define sl_bt_rsp_cs_test_end_id
Value:
0x015a0020

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