Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] nimble/ll: Add initial Channel Sounding scheduling #1789

Draft
wants to merge 33 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d8dcb7c
nimble/ll: Add DRBG for Channel Sounding
mkasenberg Apr 11, 2024
ec2959e
nimble/ll: Add unit tests for CS DRBG
mkasenberg Feb 27, 2024
2a7ef5a
nimble/host: ble_cs: Fix 'defined but not used' warning
mkasenberg Mar 14, 2024
f22a4ad
nimble/hci: Update Channel Sounding HCI
mkasenberg Apr 14, 2024
f4801f8
nimble/ll: Add Channel Sounding state machine
mkasenberg Apr 14, 2024
e43b560
nimble/ll: Add Channel Sounding LL CTRL opcodes
mkasenberg Apr 14, 2024
83702c4
nimble/ll: Add Channel Sounding capabilities
mkasenberg Apr 14, 2024
2e84451
nimble/ll: Add CS Capabilities Exchange procedure
mkasenberg Apr 14, 2024
e57b5b8
nimble/ll: Add LE CS Set Default Settings command
mkasenberg Apr 15, 2024
87343fa
nimble/ll: Add CS Mode-0 FAE Table Request procedure
mkasenberg Apr 15, 2024
58ea93f
nimble/ll: Add CS Configuration procedure
mkasenberg Apr 15, 2024
7ffaf72
nimble/ll: Add CS Security Start procedure
mkasenberg Apr 16, 2024
84d508f
nimble/ll: Add LE CS Set Channel Classification command
mkasenberg Apr 16, 2024
e5c19a3
nimble/ll: Add LE CS Set Procedure Parameters command
mkasenberg Apr 16, 2024
5e68123
nimble/ll: Add CS Start procedure
mkasenberg Apr 16, 2024
681232e
nimble/ll: Add initial Channel Sounding scheduling
mkasenberg Apr 18, 2024
d205439
nimble/ll: Add CS step modes and states
mkasenberg Apr 19, 2024
9913b20
nimble/ll: Add to CS states support for multiple antenna paths
mkasenberg Apr 19, 2024
c3ab86a
nimble/ll: Add CS subevent states
mkasenberg Apr 19, 2024
8a432b4
nimble/ll: Add CS channel generation
mkasenberg Apr 23, 2024
e54a25e
nimble/ll: Add packets durations to CS scheduling
mkasenberg Apr 24, 2024
f7088cc
nimble/ll: Add CS_SYNC transmission/reception
mkasenberg Apr 24, 2024
7792bf8
nimble/ll: Add CS Procedure Repeat Termination procedure
mkasenberg Jun 3, 2024
8e94cb7
nimble/ll: Add CS backtracking resistance
mkasenberg Jun 3, 2024
d46d95c
nimble/phy: babblesim: Add missing g_ble_phy_t_txaddrdelay
mkasenberg Aug 22, 2024
993a8cd
babblesim: Configure TIMER3 to 16MHz
mkasenberg Aug 22, 2024
6fa75b9
nimble: host: CS fixes
mkasenberg Aug 22, 2024
fa8152a
nimble/apps: Add sample apps for CS initiator and reflector
mkasenberg Feb 5, 2024
56cea23
babblesim: targets: Add targets for CS apps
mkasenberg Feb 5, 2024
dbf1985
[wip] Quasi CS
mkasenberg Jun 5, 2024
d3b280d
[wip] nimble/phy: Add Channel Sounding to PHY
mkasenberg Jun 5, 2024
8bff1d8
[wip] nimble/ll: Add usage of CS PHY
mkasenberg Aug 22, 2024
db6987d
[wip]nimble/ll: Add HCI Subevent Result (Continue) events
mkasenberg Aug 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
nimble/hci: Update Channel Sounding HCI
Blueooth 6.0. spec contains Optional_TX_SNR_Capability field as
a CS capability. Companion signal parameter was removed.
  • Loading branch information
mkasenberg committed Dec 25, 2024
commit f22a4ad15dfcf0b743951b084ac0558b46166b43
5 changes: 1 addition & 4 deletions nimble/host/src/ble_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ struct ble_cs_create_config_cp {
uint8_t channel_selection_type;
uint8_t ch3c_shape;
uint8_t ch3c_jump;
uint8_t companion_signal_enable;
} __attribute__((packed));

struct ble_cs_remove_config_cp {
Expand Down Expand Up @@ -361,7 +360,7 @@ ble_cs_create_config(const struct ble_cs_create_config_cp *cmd)
cp.channel_selection_type = cmd->channel_selection_type;
cp.ch3c_shape = cmd->ch3c_shape;
cp.ch3c_jump = cmd->ch3c_jump;
cp.companion_signal_enable = cmd->companion_signal_enable;
cp.reserved = 0x00;

return ble_hs_hci_cmd_tx(BLE_HCI_OP(BLE_HCI_OGF_LE,
BLE_HCI_OCF_LE_CS_CREATE_CONFIG),
Expand Down Expand Up @@ -531,8 +530,6 @@ ble_hs_hci_evt_le_cs_rd_rem_fae_complete(uint8_t subevent, const void *data,
/* Ignore these as used only with #3c algorithm */
cmd.ch3c_shape = 0x00;
cmd.ch3c_jump = 0x00;
/* EDLC/ECLD attack protection not supported */
cmd.companion_signal_enable = 0x00;

/* Create CS config */
rc = ble_cs_create_config(&cmd);
Expand Down
14 changes: 11 additions & 3 deletions nimble/include/nimble/hci_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,7 @@ struct ble_hci_le_cs_rd_loc_supp_cap_rp {
uint16_t optional_t_fcs_times_supported;
uint16_t optional_t_pm_times_supported;
uint8_t t_sw_time_supported;
uint8_t optional_tx_snr_capability;
} __attribute__((packed));

#define BLE_HCI_OCF_LE_CS_RD_REM_SUPP_CAP (0x008A)
Expand Down Expand Up @@ -1207,6 +1208,7 @@ struct ble_hci_le_cs_wr_cached_rem_supp_cap_cp {
uint16_t optional_t_fcs_times_supported;
uint16_t optional_t_pm_times_supported;
uint8_t t_sw_time_supported;
uint8_t optional_tx_snr_capability;
} __attribute__((packed));
struct ble_hci_le_cs_wr_cached_rem_supp_cap_rp {
uint16_t conn_handle;
Expand Down Expand Up @@ -1261,7 +1263,7 @@ struct ble_hci_le_cs_create_config_cp {
uint8_t channel_selection_type;
uint8_t ch3c_shape;
uint8_t ch3c_jump;
uint8_t companion_signal_enable;
uint8_t reserved;
} __attribute__((packed));

#define BLE_HCI_OCF_LE_CS_REMOVE_CONFIG (0x0091)
Expand Down Expand Up @@ -1322,7 +1324,7 @@ struct ble_hci_le_cs_test_cp {
uint8_t t_pm_time;
uint8_t t_sw_time;
uint8_t tone_antenna_config_selection;
uint8_t companion_signal_enable;
uint8_t reserved;
uint16_t drbg_nonce;
uint16_t override_config;
uint8_t override_parameters_length;
Expand Down Expand Up @@ -2215,6 +2217,7 @@ struct ble_hci_ev_le_subev_cs_rd_rem_supp_cap_complete {
uint16_t optional_t_fcs_times_supported;
uint16_t optional_t_pm_times_supported;
uint8_t t_sw_time_supported;
uint8_t optional_tx_snr_capability;
} __attribute__((packed));

#define BLE_HCI_LE_SUBEV_CS_RD_REM_FAE_COMPLETE (0x2D)
Expand Down Expand Up @@ -2253,7 +2256,7 @@ struct ble_hci_ev_le_subev_cs_config_complete {
uint8_t channel_selection_type;
uint8_t ch3c_shape;
uint8_t ch3c_jump;
uint8_t companion_signal_enable;
uint8_t reserved;
uint8_t t_ip1_time;
uint8_t t_ip2_time;
uint8_t t_fcs_time;
Expand Down Expand Up @@ -2363,6 +2366,7 @@ struct ble_hci_ev_le_subev_cs_test_end_complete {
#define BLE_HCI_VER_BCS_5_2 (11)
#define BLE_HCI_VER_BCS_5_3 (12)
#define BLE_HCI_VER_BCS_5_4 (13)
#define BLE_HCI_VER_BCS_6_0 (14)

#define BLE_LMP_VER_BCS_1_0b (0)
#define BLE_LMP_VER_BCS_1_1 (1)
Expand All @@ -2378,6 +2382,7 @@ struct ble_hci_ev_le_subev_cs_test_end_complete {
#define BLE_LMP_VER_BCS_5_2 (11)
#define BLE_LMP_VER_BCS_5_3 (12)
#define BLE_LMP_VER_BCS_5_4 (13)
#define BLE_LMP_VER_BCS_6_0 (14)

/* selected HCI and LMP version */
#if MYNEWT_VAL(BLE_VERSION) == 50
Expand All @@ -2395,6 +2400,9 @@ struct ble_hci_ev_le_subev_cs_test_end_complete {
#elif MYNEWT_VAL(BLE_VERSION) == 54
#define BLE_HCI_VER_BCS BLE_HCI_VER_BCS_5_4
#define BLE_LMP_VER_BCS BLE_LMP_VER_BCS_5_4
#elif MYNEWT_VAL(BLE_VERSION) == 60
#define BLE_HCI_VER_BCS BLE_HCI_VER_BCS_6_0
#define BLE_LMP_VER_BCS BLE_LMP_VER_BCS_6_0
#endif

#define BLE_HCI_DATA_HDR_SZ 4
Expand Down
2 changes: 1 addition & 1 deletion nimble/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ syscfg.defs:
This allows to configure supported Bluetooth Core version. Some
features may not be available if version is too low. Version is
integer for easy comparison.
range: 50, 51, 52, 53, 54
range: 50, 51, 52, 53, 54, 60
value: 50
BLE_ISO:
description: >
Expand Down