Zephyr API Documentation 4.0.0-rc2
A Scalable Open Source RTOS
|
LE Channel Sounding (CS) . More...
Data Structures | |
struct | bt_le_cs_set_default_settings_param |
Default CS settings in the local Controller. More... | |
struct | bt_le_cs_test_param |
CS Test parameters. More... | |
struct | bt_le_cs_create_config_params |
CS Create Config params. More... | |
struct | bt_le_cs_test_cb |
Callbacks for CS Test. More... | |
struct | bt_le_cs_subevent_step |
Subevent result step. More... | |
struct | bt_le_cs_iq_sample |
Sign-extended IQ value extracted from step data. More... | |
struct | bt_le_cs_procedure_enable_param |
struct | bt_le_cs_set_procedure_parameters_param |
Macros | |
#define | BT_LE_CS_CHANNEL_BIT_GET(chmap, bit) |
Macro for getting a specific channel bit in CS channel map. | |
#define | BT_LE_CS_CHANNEL_BIT_SET_VAL(chmap, bit, val) |
Macro for setting a specific channel bit value in CS channel map. | |
#define | BT_LE_CS_PROCEDURE_PREFERRED_PEER_ANTENNA_1 BIT(0) |
#define | BT_LE_CS_PROCEDURE_PREFERRED_PEER_ANTENNA_2 BIT(1) |
#define | BT_LE_CS_PROCEDURE_PREFERRED_PEER_ANTENNA_3 BIT(2) |
#define | BT_LE_CS_PROCEDURE_PREFERRED_PEER_ANTENNA_4 BIT(3) |
Functions | |
struct bt_le_cs_iq_sample | bt_le_cs_parse_pct (const uint8_t pct[3]) |
Extract in-phase and quadrature terms from HCI-formatted PCT. | |
void | bt_le_cs_set_valid_chmap_bits (uint8_t channel_map[10]) |
Set all valid channel map bits. | |
int | bt_le_cs_read_remote_supported_capabilities (struct bt_conn *conn) |
Read Remote Supported Capabilities. | |
int | bt_le_cs_set_default_settings (struct bt_conn *conn, const struct bt_le_cs_set_default_settings_param *params) |
Set Channel Sounding default settings. | |
int | bt_le_cs_read_remote_fae_table (struct bt_conn *conn) |
Read Remote FAE Table. | |
int | bt_le_cs_test_cb_register (struct bt_le_cs_test_cb cs_test_cb) |
Register callbacks for the CS Test mode. | |
int | bt_le_cs_start_test (const struct bt_le_cs_test_param *params) |
Start a CS test. | |
int | bt_le_cs_create_config (struct bt_conn *conn, struct bt_le_cs_create_config_params *params, enum bt_le_cs_create_config_context context) |
Create CS configuration. | |
int | bt_le_cs_remove_config (struct bt_conn *conn, uint8_t config_id) |
Create CS configuration. | |
int | bt_le_cs_stop_test (void) |
Stop ongoing CS Test. | |
void | bt_le_cs_step_data_parse (struct net_buf_simple *step_data_buf, bool(*func)(struct bt_le_cs_subevent_step *step, void *user_data), void *user_data) |
Parse CS Subevent Step Data. | |
int | bt_le_cs_security_enable (struct bt_conn *conn) |
CS Security Enable. | |
int | bt_le_cs_procedure_enable (struct bt_conn *conn, const struct bt_le_cs_procedure_enable_param *params) |
CS Procedure Enable. | |
int | bt_le_cs_set_procedure_parameters (struct bt_conn *conn, const struct bt_le_cs_set_procedure_parameters_param *params) |
CS Set Procedure Parameters. | |
int | bt_le_cs_set_channel_classification (uint8_t channel_classification[10]) |
CS Set Channel Classification. | |
int | bt_le_cs_read_local_supported_capabilities (struct bt_conn_le_cs_capabilities *ret) |
CS Read Local Supported Capabilities. | |
int | bt_le_cs_write_cached_remote_supported_capabilities (struct bt_conn *conn, const struct bt_conn_le_cs_capabilities *params) |
CS Write Cached Remote Supported Capabilities. | |
int | bt_le_cs_write_cached_remote_fae_table (struct bt_conn *conn, uint8_t remote_fae_table[72]) |
CS Write Cached Remote FAE Table. | |
LE Channel Sounding (CS) .
#define BT_LE_CS_CHANNEL_BIT_GET | ( | chmap, | |
bit ) |
#include <zephyr/bluetooth/cs.h>
Macro for getting a specific channel bit in CS channel map.
[in] | chmap | Channel map array |
[in] | bit | Bit number to be accessed |
#define BT_LE_CS_CHANNEL_BIT_SET_VAL | ( | chmap, | |
bit, | |||
val ) |
#include <zephyr/bluetooth/cs.h>
Macro for setting a specific channel bit value in CS channel map.
[in] | chmap | Channel map array |
[in] | bit | Bit number to be accessed |
[in] | val | Bit value to be set, either 1 or 0 |
#define BT_LE_CS_PROCEDURE_PREFERRED_PEER_ANTENNA_1 BIT(0) |
#include <zephyr/bluetooth/cs.h>
#define BT_LE_CS_PROCEDURE_PREFERRED_PEER_ANTENNA_2 BIT(1) |
#include <zephyr/bluetooth/cs.h>
#define BT_LE_CS_PROCEDURE_PREFERRED_PEER_ANTENNA_3 BIT(2) |
#include <zephyr/bluetooth/cs.h>
#define BT_LE_CS_PROCEDURE_PREFERRED_PEER_ANTENNA_4 BIT(3) |
#include <zephyr/bluetooth/cs.h>
#include <zephyr/bluetooth/cs.h>
CS config creation context.
#include <zephyr/bluetooth/cs.h>
CS Test Initiator SNR control options.
#include <zephyr/bluetooth/cs.h>
Enumerator | |
---|---|
BT_LE_CS_PROCEDURE_PHY_1M | |
BT_LE_CS_PROCEUDRE_PHY_2M | |
BT_LE_CS_PROCEDURE_PHY_CODED_S8 | |
BT_LE_CS_PROCEDURE_PHY_CODED_S2 |
#include <zephyr/bluetooth/cs.h>
CS Test Reflector SNR control options.
#include <zephyr/bluetooth/cs.h>
#include <zephyr/bluetooth/cs.h>
CS Test CS_SYNC Antenna Identifier.
Enumerator | |
---|---|
BT_LE_CS_TEST_CS_SYNC_ANTENNA_SELECTION_ONE | |
BT_LE_CS_TEST_CS_SYNC_ANTENNA_SELECTION_TWO | |
BT_LE_CS_TEST_CS_SYNC_ANTENNA_SELECTION_THREE | |
BT_LE_CS_TEST_CS_SYNC_ANTENNA_SELECTION_FOUR |
#include <zephyr/bluetooth/cs.h>
CS Test Override 3 T_PM Tone Extension.
#include <zephyr/bluetooth/cs.h>
CS Test Override 4 Tone Antenna Permutation.
These values represent indices in an antenna path permutation table.
Which table is applicable (and which indices are valid) depends on the maximum number of antenna paths (N_AP).
If N_AP = 2, the permutation table is:
+-----------------------------—+---------------------------------------—+ | Antenna Path Permutation Index | Antenna Path Positions After Permutation | +-----------------------------—+---------------------------------------—+ | 0 | A1 A2 | | 1 | A2 A1 | +-----------------------------—+---------------------------------------—+
If N_AP = 3, the permutation table is:
+-----------------------------—+---------------------------------------—+ | Antenna Path Permutation Index | Antenna Path Positions After Permutation | +-----------------------------—+---------------------------------------—+ | 0 | A1 A2 A3 | | 1 | A2 A1 A3 | | 2 | A1 A3 A2 | | 3 | A3 A1 A2 | | 4 | A3 A2 A1 | | 5 | A2 A3 A1 | +-----------------------------—+---------------------------------------—+
If N_AP = 4, the permutation table is:
+-----------------------------—+---------------------------------------—+ | Antenna Path Permutation Index | Antenna Path Positions After Permutation | +-----------------------------—+---------------------------------------—+ | 0 | A1 A2 A3 A4 | | 1 | A2 A1 A3 A4 | | 2 | A1 A3 A2 A4 | | 3 | A3 A1 A2 A4 | | 4 | A3 A2 A1 A4 | | 5 | A2 A3 A1 A4 | | 6 | A1 A2 A4 A3 | | 7 | A2 A1 A4 A3 | | 8 | A1 A4 A2 A3 | | 9 | A4 A1 A2 A3 | | 10 | A4 A2 A1 A3 | | 11 | A2 A4 A1 A3 | | 12 | A1 A4 A3 A2 | | 13 | A4 A1 A3 A2 | | 14 | A1 A3 A4 A2 | | 15 | A3 A1 A4 A2 | | 16 | A3 A4 A1 A2 | | 17 | A4 A3 A1 A2 | | 18 | A4 A2 A3 A1 | | 19 | A2 A4 A3 A1 | | 20 | A4 A3 A2 A1 | | 21 | A3 A4 A2 A1 | | 22 | A3 A2 A4 A1 | | 23 | A2 A3 A4 A1 | +-----------------------------—+---------------------------------------—+
#include <zephyr/bluetooth/cs.h>
CS Test Override 7 Sounding Sequence Marker Value.
#include <zephyr/bluetooth/cs.h>
CS Test Override 8 CS_SYNC Payload Pattern.
int bt_le_cs_create_config | ( | struct bt_conn * | conn, |
struct bt_le_cs_create_config_params * | params, | ||
enum bt_le_cs_create_config_context | context ) |
#include <zephyr/bluetooth/cs.h>
Create CS configuration.
This command is used to create a new CS configuration or update an existing one with the config id specified.
CONFIG_BT_CHANNEL_SOUNDINGmust be set.
conn | Connection Object. |
params | CS Create Config parameters |
context | Controls whether the configuration is written to the local controller or both the local and the remote controller |
struct bt_le_cs_iq_sample bt_le_cs_parse_pct | ( | const uint8_t | pct[3] | ) |
#include <zephyr/bluetooth/cs.h>
Extract in-phase and quadrature terms from HCI-formatted PCT.
Convenience function for processing 24-bit phase correction terms found in CS step data. The 12-bit signed real and imaginary components are converted to host endianness and sign-extended.
pct | 24-bit little-endian phase correction term. |
int bt_le_cs_procedure_enable | ( | struct bt_conn * | conn, |
const struct bt_le_cs_procedure_enable_param * | params ) |
#include <zephyr/bluetooth/cs.h>
CS Procedure Enable.
This command is used to enable or disable the scheduling of CS procedures by the local Controller, with the remote device identified in the conn parameter.
CONFIG_BT_CHANNEL_SOUNDINGmust be set.
conn | Connection Object. |
params | Parameters for the CS Procedure Enable command. |
int bt_le_cs_read_local_supported_capabilities | ( | struct bt_conn_le_cs_capabilities * | ret | ) |
#include <zephyr/bluetooth/cs.h>
CS Read Local Supported Capabilities.
This command is used to read the CS capabilities that are supported by the local Controller.
CONFIG_BT_CHANNEL_SOUNDINGmust be set.
ret | Return values for the CS Procedure Enable command. |
int bt_le_cs_read_remote_fae_table | ( | struct bt_conn * | conn | ) |
#include <zephyr/bluetooth/cs.h>
Read Remote FAE Table.
This command is used to read the per-channel mode-0 Frequency Actuation Error table of the remote Controller.
CONFIG_BT_CHANNEL_SOUNDINGmust be set.
conn | Connection Object. |
int bt_le_cs_read_remote_supported_capabilities | ( | struct bt_conn * | conn | ) |
#include <zephyr/bluetooth/cs.h>
Read Remote Supported Capabilities.
This command is used to query the CS capabilities that are supported by the remote controller.
CONFIG_BT_CHANNEL_SOUNDINGmust be set.
conn | Connection Object. |
int bt_le_cs_remove_config | ( | struct bt_conn * | conn, |
uint8_t | config_id ) |
#include <zephyr/bluetooth/cs.h>
Create CS configuration.
This command is used to remove a CS configuration from the local controller identified by the config_id
CONFIG_BT_CHANNEL_SOUNDINGmust be set.
conn | Connection Object. |
config_id | CS Config ID |
int bt_le_cs_security_enable | ( | struct bt_conn * | conn | ) |
#include <zephyr/bluetooth/cs.h>
CS Security Enable.
This commmand is used to start or restart the Channel Sounding Security Start procedure in the local Controller for the ACL connection identified in the conn parameter.
CONFIG_BT_CHANNEL_SOUNDINGmust be set.
conn | Connection Object. |
int bt_le_cs_set_channel_classification | ( | uint8_t | channel_classification[10] | ) |
#include <zephyr/bluetooth/cs.h>
CS Set Channel Classification.
This command is used to update the channel classification based on its local information.
The nth bitfield (in the range 0 to 78) contains the value for the CS channel index n. Channel Enabled = 1; Channel Disabled = 0.
Channels n = 0, 1, 23, 24, 25, 77, and 78 shall be reserved for future use and shall be set to zero. At least 15 channels shall be enabled.
The most significant bit (bit 79) is reserved for future use.
CONFIG_BT_CHANNEL_SOUNDINGmust be set.
channel_classification | Bit fields |
int bt_le_cs_set_default_settings | ( | struct bt_conn * | conn, |
const struct bt_le_cs_set_default_settings_param * | params ) |
#include <zephyr/bluetooth/cs.h>
Set Channel Sounding default settings.
This command is used to set default Channel Sounding settings for this connection.
CONFIG_BT_CHANNEL_SOUNDINGmust be set.
conn | Connection Object. |
params | Channel sounding default settings parameters. |
int bt_le_cs_set_procedure_parameters | ( | struct bt_conn * | conn, |
const struct bt_le_cs_set_procedure_parameters_param * | params ) |
#include <zephyr/bluetooth/cs.h>
CS Set Procedure Parameters.
This command is used to set the parameters for the scheduling of one or more CS procedures by the local controller.
CONFIG_BT_CHANNEL_SOUNDINGmust be set.
conn | Connection Object. |
params | Parameters for the CS Set Procedure Parameters command. |
void bt_le_cs_set_valid_chmap_bits | ( | uint8_t | channel_map[10] | ) |
#include <zephyr/bluetooth/cs.h>
Set all valid channel map bits.
This command is used to enable all valid channels in a given CS channel map
channel_map | Chanel map |
int bt_le_cs_start_test | ( | const struct bt_le_cs_test_param * | params | ) |
#include <zephyr/bluetooth/cs.h>
Start a CS test.
This command is used to start a CS test where the IUT is placed in the role of either the initiator or reflector.
The first mode-0 channel in the list is used as the starting channel for the test. At the beginning of any test, the IUT in the flector role shall listen on the first mode-0 channel until it receives the first transmission from the initiator. Similarly, with the IUT in the initiator role, the tester will start by listening on the first mode-0 channel and the IUT shall transmit on that channel for the first half of the first CS step. Thereafter, the parameters of this command describe the required transmit and receive behavior for the CS test.
CONFIG_BT_CHANNEL_SOUNDING_TESTmust be set.
params | CS Test parameters |
void bt_le_cs_step_data_parse | ( | struct net_buf_simple * | step_data_buf, |
bool(* | func )(struct bt_le_cs_subevent_step *step, void *user_data), | ||
void * | user_data ) |
#include <zephyr/bluetooth/cs.h>
Parse CS Subevent Step Data.
A helper for parsing HCI-formatted step data found in channel sounding subevent results.
A typical use-case is filtering out data which does not meet certain packet quality or NADM requirements.
step_data_buf | Pointer to a buffer containing the step data. |
func | Callback function which will be called for each step data found. The callback should return true to continue parsing, or false to stop. |
user_data | User data to be passed to the callback. |
int bt_le_cs_stop_test | ( | void | ) |
#include <zephyr/bluetooth/cs.h>
Stop ongoing CS Test.
This command is used to stop any CS test that is in progress.
The controller is expected to finish reporting any subevent results before completing this termination.
CONFIG_BT_CHANNEL_SOUNDING_TESTmust be set.
int bt_le_cs_test_cb_register | ( | struct bt_le_cs_test_cb | cs_test_cb | ) |
#include <zephyr/bluetooth/cs.h>
Register callbacks for the CS Test mode.
Existing callbacks can be unregistered by providing NULL function pointers.
CONFIG_BT_CHANNEL_SOUNDING_TESTmust be set.
cs_test_cb | Set of callbacks to be used with CS Test |
int bt_le_cs_write_cached_remote_fae_table | ( | struct bt_conn * | conn, |
uint8_t | remote_fae_table[72] ) |
#include <zephyr/bluetooth/cs.h>
CS Write Cached Remote FAE Table.
This command is used to write a cached copy of the per-channel mode-0 Frequency Actuation Error table of the remote device in the local Controller.
CONFIG_BT_CHANNEL_SOUNDINGmust be set.
conn | Connection Object. |
remote_fae_table | Per-channel mode-0 FAE table of the local Controller |
int bt_le_cs_write_cached_remote_supported_capabilities | ( | struct bt_conn * | conn, |
const struct bt_conn_le_cs_capabilities * | params ) |
#include <zephyr/bluetooth/cs.h>
CS Write Cached Remote Supported Capabilities.
This command is used to write the cached copy of the CS capabilities that are supported by the remote Controller for the connection identified.
CONFIG_BT_CHANNEL_SOUNDINGmust be set.
conn | Connection Object. |
params | Parameters for the CS Write Cached Remote Supported Capabilities command. |