summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
author Henri Chataing <henrichataing@google.com> 2024-10-28 15:05:54 -0700
committer Henri Chataing <henrichataing@google.com> 2024-11-07 23:07:35 +0000
commit6bc1005efe740833e1ed908b6b5e66544678e933 (patch)
tree3df2314fed8d8688ddb44b493b762622313c071a /tools
parenta0f0f3034546e8ee4ee5cc313dbb8147f6e97553 (diff)
RootCanal: Update to Core version 6.0
Bug: 339671227 Test: atest --host rootcanal_ll_test Flag: EXEMPT, tool change Change-Id: I5457dd63777ab9a2ca6bee6f69d3343ff86a4ec7
Diffstat (limited to 'tools')
-rw-r--r--tools/rootcanal/desktop/test_environment.cc2
-rw-r--r--tools/rootcanal/lib/hci/pcap_filter.cc4
-rw-r--r--tools/rootcanal/model/controller/controller_properties.cc40
-rw-r--r--tools/rootcanal/model/controller/dual_mode_controller.cc190
-rw-r--r--tools/rootcanal/model/controller/dual_mode_controller.h12
-rw-r--r--tools/rootcanal/model/controller/le_advertiser.cc18
-rw-r--r--tools/rootcanal/model/controller/link_layer_controller.cc82
-rw-r--r--tools/rootcanal/packets/hci_packets.pdl1096
-rw-r--r--tools/rootcanal/py/controller.py85
-rw-r--r--tools/rootcanal/rust/src/llcp/iso.rs6
-rw-r--r--tools/rootcanal/test/LL/CIS/CEN/BV_01_C.py32
-rw-r--r--tools/rootcanal/test/LL/CIS/CEN/BV_03_C.py4
-rw-r--r--tools/rootcanal/test/LL/CIS/CEN/BV_10_C.py64
-rw-r--r--tools/rootcanal/test/LL/CIS/CEN/BV_26_C.py64
-rw-r--r--tools/rootcanal/test/LL/CIS/PER/BV_01_C.py32
-rw-r--r--tools/rootcanal/test/LL/CON_/CEN/BV_41_C.py57
-rw-r--r--tools/rootcanal/test/LL/CON_/CEN/BV_43_C.py57
-rw-r--r--tools/rootcanal/test/LL/CON_/INI/BV_08_C.py20
-rw-r--r--tools/rootcanal/test/LL/CON_/INI/BV_09_C.py22
-rw-r--r--tools/rootcanal/test/LL/CON_/INI/BV_10_C.py20
-rw-r--r--tools/rootcanal/test/LL/CON_/INI/BV_11_C.py22
-rw-r--r--tools/rootcanal/test/LL/CON_/PER/BV_40_C.py18
-rw-r--r--tools/rootcanal/test/LL/CON_/PER/BV_42_C.py18
-rw-r--r--tools/rootcanal/test/LL/DDI/ADV/BV_06_C.py18
-rw-r--r--tools/rootcanal/test/LL/DDI/ADV/BV_07_C.py18
-rw-r--r--tools/rootcanal/test/LL/DDI/ADV/BV_09_C.py4
-rw-r--r--tools/rootcanal/test/LL/DDI/ADV/BV_11_C.py35
-rw-r--r--tools/rootcanal/test/LL/DDI/ADV/BV_19_C.py18
-rw-r--r--tools/rootcanal/test/LL/DDI/ADV/BV_21_C.py14
-rw-r--r--tools/rootcanal/test/LL/DDI/ADV/BV_22_C.py14
-rw-r--r--tools/rootcanal/test/LL/DDI/ADV/BV_26_C.py29
-rw-r--r--tools/rootcanal/test/LL/DDI/ADV/BV_47_C.py21
-rw-r--r--tools/rootcanal/test/LL/DDI/SCN/BV_79_C.py14
-rw-r--r--tools/rootcanal/test/LL/SEC/ADV/BV_11_C.py2
-rw-r--r--tools/rootcanal/test/controller/le/le_scanning_filter_duplicates_test.cc6
-rw-r--r--tools/rootcanal/test/controller/le/test_helpers.h2
36 files changed, 1527 insertions, 633 deletions
diff --git a/tools/rootcanal/desktop/test_environment.cc b/tools/rootcanal/desktop/test_environment.cc
index 91eae8a3e5..f556b84c4e 100644
--- a/tools/rootcanal/desktop/test_environment.cc
+++ b/tools/rootcanal/desktop/test_environment.cc
@@ -104,7 +104,7 @@ void TestEnvironment::SetUpHciServer(
AsyncDataChannelServer* server) {
// AddHciConnection needs to be executed in task thread to
// prevent data races on test model.
- async_manager_.ExecAsync(socket_user_id_, std::chrono::milliseconds(0), [=]() {
+ async_manager_.ExecAsync(socket_user_id_, std::chrono::milliseconds(0), [=, this]() {
auto transport = HciSocketTransport::Create(socket);
if (enable_hci_sniffer_) {
transport = HciSniffer::Create(transport);
diff --git a/tools/rootcanal/lib/hci/pcap_filter.cc b/tools/rootcanal/lib/hci/pcap_filter.cc
index ca14ef03c7..abd20ed7fc 100644
--- a/tools/rootcanal/lib/hci/pcap_filter.cc
+++ b/tools/rootcanal/lib/hci/pcap_filter.cc
@@ -97,9 +97,9 @@ std::vector<uint8_t> PcapFilter::FilterHciEvent(std::vector<uint8_t> const& pack
auto le_meta_event = LeMetaEventView::Create(event);
ASSERT(le_meta_event.IsValid());
switch (le_meta_event.GetSubeventCode()) {
- case SubeventCode::ADVERTISING_REPORT:
+ case SubeventCode::LE_ADVERTISING_REPORT:
return FilterLeAdvertisingReport(le_meta_event);
- case SubeventCode::EXTENDED_ADVERTISING_REPORT:
+ case SubeventCode::LE_EXTENDED_ADVERTISING_REPORT:
return FilterLeExtendedAdvertisingReport(le_meta_event);
default:
break;
diff --git a/tools/rootcanal/model/controller/controller_properties.cc b/tools/rootcanal/model/controller/controller_properties.cc
index 4ee868b159..26718a9747 100644
--- a/tools/rootcanal/model/controller/controller_properties.cc
+++ b/tools/rootcanal/model/controller/controller_properties.cc
@@ -259,12 +259,13 @@ static std::array<uint8_t, 64> SupportedCommands() {
// TESTING
OpCodeIndex::READ_LOOPBACK_MODE, OpCodeIndex::WRITE_LOOPBACK_MODE,
- OpCodeIndex::ENABLE_DEVICE_UNDER_TEST_MODE, OpCodeIndex::WRITE_SIMPLE_PAIRING_DEBUG_MODE,
+ OpCodeIndex::ENABLE_IMPLEMENTATION_UNDER_TEST_MODE,
+ OpCodeIndex::WRITE_SIMPLE_PAIRING_DEBUG_MODE,
OpCodeIndex::WRITE_SECURE_CONNECTIONS_TEST_MODE,
// LE_CONTROLLER
OpCodeIndex::LE_SET_EVENT_MASK, OpCodeIndex::LE_READ_BUFFER_SIZE_V1,
- OpCodeIndex::LE_READ_LOCAL_SUPPORTED_FEATURES, OpCodeIndex::LE_SET_RANDOM_ADDRESS,
+ OpCodeIndex::LE_READ_LOCAL_SUPPORTED_FEATURES_PAGE_0, OpCodeIndex::LE_SET_RANDOM_ADDRESS,
OpCodeIndex::LE_SET_ADVERTISING_PARAMETERS,
OpCodeIndex::LE_READ_ADVERTISING_PHYSICAL_CHANNEL_TX_POWER,
OpCodeIndex::LE_SET_ADVERTISING_DATA, OpCodeIndex::LE_SET_SCAN_RESPONSE_DATA,
@@ -275,8 +276,9 @@ static std::array<uint8_t, 64> SupportedCommands() {
OpCodeIndex::LE_ADD_DEVICE_TO_FILTER_ACCEPT_LIST,
OpCodeIndex::LE_REMOVE_DEVICE_FROM_FILTER_ACCEPT_LIST, OpCodeIndex::LE_CONNECTION_UPDATE,
OpCodeIndex::LE_SET_HOST_CHANNEL_CLASSIFICATION, OpCodeIndex::LE_READ_CHANNEL_MAP,
- OpCodeIndex::LE_READ_REMOTE_FEATURES, OpCodeIndex::LE_ENCRYPT, OpCodeIndex::LE_RAND,
- OpCodeIndex::LE_START_ENCRYPTION, OpCodeIndex::LE_LONG_TERM_KEY_REQUEST_REPLY,
+ OpCodeIndex::LE_READ_REMOTE_FEATURES_PAGE_0, OpCodeIndex::LE_ENCRYPT,
+ OpCodeIndex::LE_RAND, OpCodeIndex::LE_START_ENCRYPTION,
+ OpCodeIndex::LE_LONG_TERM_KEY_REQUEST_REPLY,
OpCodeIndex::LE_LONG_TERM_KEY_REQUEST_NEGATIVE_REPLY,
OpCodeIndex::LE_READ_SUPPORTED_STATES, OpCodeIndex::LE_RECEIVER_TEST_V1,
OpCodeIndex::LE_TRANSMITTER_TEST_V1, OpCodeIndex::LE_TEST_END,
@@ -298,18 +300,18 @@ static std::array<uint8_t, 64> SupportedCommands() {
// OpCodeIndex::LE_RECEIVER_TEST_V2,
// OpCodeIndex::LE_TRANSMITTER_TEST_V2,
OpCodeIndex::LE_SET_ADVERTISING_SET_RANDOM_ADDRESS,
- OpCodeIndex::LE_SET_EXTENDED_ADVERTISING_PARAMETERS,
+ OpCodeIndex::LE_SET_EXTENDED_ADVERTISING_PARAMETERS_V1,
OpCodeIndex::LE_SET_EXTENDED_ADVERTISING_DATA,
OpCodeIndex::LE_SET_EXTENDED_SCAN_RESPONSE_DATA,
OpCodeIndex::LE_SET_EXTENDED_ADVERTISING_ENABLE,
OpCodeIndex::LE_READ_MAXIMUM_ADVERTISING_DATA_LENGTH,
OpCodeIndex::LE_READ_NUMBER_OF_SUPPORTED_ADVERTISING_SETS,
OpCodeIndex::LE_REMOVE_ADVERTISING_SET, OpCodeIndex::LE_CLEAR_ADVERTISING_SETS,
- OpCodeIndex::LE_SET_PERIODIC_ADVERTISING_PARAMETERS,
+ OpCodeIndex::LE_SET_PERIODIC_ADVERTISING_PARAMETERS_V1,
OpCodeIndex::LE_SET_PERIODIC_ADVERTISING_DATA,
OpCodeIndex::LE_SET_PERIODIC_ADVERTISING_ENABLE,
OpCodeIndex::LE_SET_EXTENDED_SCAN_PARAMETERS, OpCodeIndex::LE_SET_EXTENDED_SCAN_ENABLE,
- OpCodeIndex::LE_EXTENDED_CREATE_CONNECTION,
+ OpCodeIndex::LE_EXTENDED_CREATE_CONNECTION_V1,
OpCodeIndex::LE_PERIODIC_ADVERTISING_CREATE_SYNC,
OpCodeIndex::LE_PERIODIC_ADVERTISING_CREATE_SYNC_CANCEL,
OpCodeIndex::LE_PERIODIC_ADVERTISING_TERMINATE_SYNC,
@@ -353,7 +355,7 @@ static std::array<uint8_t, 64> SupportedCommands() {
// OpCodeIndex::LE_ISO_RECEIVE_TEST,
// OpCodeIndex::LE_ISO_READ_TEST_COUNTERS,
// OpCodeIndex::LE_ISO_TEST_END,
- OpCodeIndex::LE_SET_HOST_FEATURE,
+ OpCodeIndex::LE_SET_HOST_FEATURE_V1,
// OpCodeIndex::LE_READ_ISO_LINK_QUALITY,
// OpCodeIndex::LE_ENHANCED_READ_TRANSMIT_POWER_LEVEL,
// OpCodeIndex::LE_READ_REMOTE_TRANSMIT_POWER_LEVEL,
@@ -984,7 +986,7 @@ bool ControllerProperties::CheckSupportedCommands() const {
// C94: Mandatory if the LE Create Connection or LE Extended Create Connection
// command is supported, otherwise excluded.
auto c94 = mandatory_or_excluded(SupportsCommand(OpCodeIndex::LE_CREATE_CONNECTION) ||
- SupportsCommand(OpCodeIndex::LE_EXTENDED_CREATE_CONNECTION));
+ SupportsCommand(OpCodeIndex::LE_EXTENDED_CREATE_CONNECTION_V1));
// C95: Mandatory if the LE Request Peer SCA command is supported, otherwise
// excluded.
//
@@ -1235,7 +1237,7 @@ bool ControllerProperties::CheckSupportedCommands() const {
check_command_(DELETE_RESERVED_LT_ADDR, c201, excluded);
check_command_(DELETE_STORED_LINK_KEY, c121, excluded);
check_command_(DISCONNECT, mandatory, c3);
- check_command_(ENABLE_DEVICE_UNDER_TEST_MODE, c123, excluded);
+ check_command_(ENABLE_IMPLEMENTATION_UNDER_TEST_MODE, c123, excluded);
// Table 3.1: Alphabetical list of commands and events (Sheet 5 of 49)
check_command_(ENHANCED_ACCEPT_SYNCHRONOUS_CONNECTION, c135, excluded);
check_command_(ENHANCED_FLUSH, mandatory, excluded);
@@ -1280,7 +1282,7 @@ bool ControllerProperties::CheckSupportedCommands() const {
check_command_(LE_ENCRYPT, excluded, c4);
// Table 3.1: Alphabetical list of commands and events (Sheet 12 of 49)
check_command_(LE_ENHANCED_READ_TRANSMIT_POWER_LEVEL, excluded, c51);
- check_command_(LE_EXTENDED_CREATE_CONNECTION, excluded, c20);
+ check_command_(LE_EXTENDED_CREATE_CONNECTION_V1, excluded, c20);
check_command_(LE_GENERATE_DHKEY_V1, excluded, c99);
check_command_(LE_GENERATE_DHKEY_V2, excluded, optional);
check_command_(LE_ISO_READ_TEST_COUNTERS, excluded, c46);
@@ -1309,14 +1311,14 @@ bool ControllerProperties::CheckSupportedCommands() const {
check_command_(LE_READ_ISO_TX_SYNC, excluded, c45);
check_command_(LE_READ_LOCAL_RESOLVABLE_ADDRESS, excluded, c10);
// Table 3.1: Alphabetical list of commands and events (Sheet 16 of 49)
- check_command_(LE_READ_LOCAL_SUPPORTED_FEATURES, excluded, mandatory);
+ check_command_(LE_READ_LOCAL_SUPPORTED_FEATURES_PAGE_0, excluded, mandatory);
check_command_(LE_READ_MAXIMUM_ADVERTISING_DATA_LENGTH, excluded, c17);
check_command_(LE_READ_MAXIMUM_DATA_LENGTH, excluded, c8);
check_command_(LE_READ_NUMBER_OF_SUPPORTED_ADVERTISING_SETS, excluded, c17);
check_command_(LE_READ_PEER_RESOLVABLE_ADDRESS, excluded, c10);
check_command_(LE_READ_PERIODIC_ADVERTISER_LIST_SIZE, excluded, c21);
check_command_(LE_READ_PHY, excluded, c11);
- check_command_(LE_READ_REMOTE_FEATURES, excluded, c3);
+ check_command_(LE_READ_REMOTE_FEATURES_PAGE_0, excluded, c3);
// Table 3.1: Alphabetical list of commands and events (Sheet 17 of 49)
check_command_(LE_READ_REMOTE_TRANSMIT_POWER_LEVEL, excluded, c51);
check_command_(LE_READ_RESOLVING_LIST_SIZE, excluded, c9);
@@ -1361,18 +1363,18 @@ bool ControllerProperties::CheckSupportedCommands() const {
check_command_(LE_SET_EVENT_MASK, excluded, mandatory);
check_command_(LE_SET_EXTENDED_ADVERTISING_DATA, excluded, c17);
check_command_(LE_SET_EXTENDED_ADVERTISING_ENABLE, excluded, c17);
- check_command_(LE_SET_EXTENDED_ADVERTISING_PARAMETERS, excluded, c17);
+ check_command_(LE_SET_EXTENDED_ADVERTISING_PARAMETERS_V1, excluded, c17);
check_command_(LE_SET_EXTENDED_SCAN_ENABLE, excluded, c19);
// Table 3.1: Alphabetical list of commands and events (Sheet 22 of 49)
check_command_(LE_SET_EXTENDED_SCAN_PARAMETERS, excluded, c19);
check_command_(LE_SET_EXTENDED_SCAN_RESPONSE_DATA, excluded, c17);
check_command_(LE_SET_HOST_CHANNEL_CLASSIFICATION, excluded, c36);
- check_command_(LE_SET_HOST_FEATURE, excluded, c49);
+ check_command_(LE_SET_HOST_FEATURE_V1, excluded, c49);
check_command_(LE_SET_PATH_LOSS_REPORTING_ENABLE, excluded, c52);
check_command_(LE_SET_PATH_LOSS_REPORTING_PARAMETERS, excluded, c52);
check_command_(LE_SET_PERIODIC_ADVERTISING_DATA, excluded, c18);
check_command_(LE_SET_PERIODIC_ADVERTISING_ENABLE, excluded, c18);
- check_command_(LE_SET_PERIODIC_ADVERTISING_PARAMETERS, excluded, c18);
+ check_command_(LE_SET_PERIODIC_ADVERTISING_PARAMETERS_V1, excluded, c18);
// Table 3.1: Alphabetical list of commands and events (Sheet 23 of 49)
check_command_(LE_SET_PERIODIC_ADVERTISING_RECEIVE_ENABLE, excluded, c32);
check_command_(LE_SET_PERIODIC_ADVERTISING_SYNC_TRANSFER_PARAMETERS, excluded, c35);
@@ -1593,7 +1595,7 @@ ControllerProperties::ControllerProperties()
// Commands enabled by the LE Extended Advertising feature bit.
static std::vector<OpCodeIndex> le_extended_advertising_commands_ = {
OpCodeIndex::LE_CLEAR_ADVERTISING_SETS,
- OpCodeIndex::LE_EXTENDED_CREATE_CONNECTION,
+ OpCodeIndex::LE_EXTENDED_CREATE_CONNECTION_V1,
OpCodeIndex::LE_READ_MAXIMUM_ADVERTISING_DATA_LENGTH,
OpCodeIndex::LE_READ_NUMBER_OF_SUPPORTED_ADVERTISING_SETS,
OpCodeIndex::LE_RECEIVER_TEST_V2,
@@ -1602,7 +1604,7 @@ static std::vector<OpCodeIndex> le_extended_advertising_commands_ = {
OpCodeIndex::LE_SET_DATA_RELATED_ADDRESS_CHANGES,
OpCodeIndex::LE_SET_EXTENDED_ADVERTISING_DATA,
OpCodeIndex::LE_SET_EXTENDED_ADVERTISING_ENABLE,
- OpCodeIndex::LE_SET_EXTENDED_ADVERTISING_PARAMETERS,
+ OpCodeIndex::LE_SET_EXTENDED_ADVERTISING_PARAMETERS_V1,
OpCodeIndex::LE_SET_EXTENDED_SCAN_ENABLE,
OpCodeIndex::LE_SET_EXTENDED_SCAN_PARAMETERS,
OpCodeIndex::LE_SET_EXTENDED_SCAN_RESPONSE_DATA,
@@ -1621,7 +1623,7 @@ static std::vector<OpCodeIndex> le_periodic_advertising_commands_ = {
OpCodeIndex::LE_SET_DATA_RELATED_ADDRESS_CHANGES,
OpCodeIndex::LE_SET_PERIODIC_ADVERTISING_DATA,
OpCodeIndex::LE_SET_PERIODIC_ADVERTISING_ENABLE,
- OpCodeIndex::LE_SET_PERIODIC_ADVERTISING_PARAMETERS,
+ OpCodeIndex::LE_SET_PERIODIC_ADVERTISING_PARAMETERS_V1,
};
// Commands enabled by the LL Privacy feature bit.
diff --git a/tools/rootcanal/model/controller/dual_mode_controller.cc b/tools/rootcanal/model/controller/dual_mode_controller.cc
index 5563d8319d..15f788b438 100644
--- a/tools/rootcanal/model/controller/dual_mode_controller.cc
+++ b/tools/rootcanal/model/controller/dual_mode_controller.cc
@@ -1725,8 +1725,8 @@ void DualModeController::LeRequestPeerSca(CommandView command) {
}
}
-void DualModeController::LeSetHostFeature(CommandView command) {
- auto command_view = bluetooth::hci::LeSetHostFeatureView::Create(command);
+void DualModeController::LeSetHostFeatureV1(CommandView command) {
+ auto command_view = bluetooth::hci::LeSetHostFeatureV1View::Create(command);
CHECK_PACKET_VIEW(command_view);
uint8_t bit_number = static_cast<uint8_t>(command_view.GetBitNumber());
uint8_t bit_value = static_cast<uint8_t>(command_view.GetBitValue());
@@ -1736,7 +1736,8 @@ void DualModeController::LeSetHostFeature(CommandView command) {
DEBUG(id_, " bit_value={}", bit_value);
ErrorCode status = link_layer_controller_.LeSetHostFeature(bit_number, bit_value);
- send_event_(bluetooth::hci::LeSetHostFeatureCompleteBuilder::Create(kNumCommandPackets, status));
+ send_event_(
+ bluetooth::hci::LeSetHostFeatureV1CompleteBuilder::Create(kNumCommandPackets, status));
}
void DualModeController::LeReadBufferSizeV1(CommandView command) {
@@ -1796,14 +1797,14 @@ void DualModeController::LeSetResolvablePrivateAddressTimeout(CommandView comman
kNumCommandPackets, status));
}
-void DualModeController::LeReadLocalSupportedFeatures(CommandView command) {
- auto command_view = bluetooth::hci::LeReadLocalSupportedFeaturesView::Create(command);
+void DualModeController::LeReadLocalSupportedFeaturesPage0(CommandView command) {
+ auto command_view = bluetooth::hci::LeReadLocalSupportedFeaturesPage0View::Create(command);
CHECK_PACKET_VIEW(command_view);
- DEBUG(id_, "<< LE Read Local Supported Features");
+ DEBUG(id_, "<< LE Read Local Supported Features Page 0");
uint64_t le_features = link_layer_controller_.GetLeSupportedFeatures();
- send_event_(bluetooth::hci::LeReadLocalSupportedFeaturesCompleteBuilder::Create(
+ send_event_(bluetooth::hci::LeReadLocalSupportedFeaturesPage0CompleteBuilder::Create(
kNumCommandPackets, ErrorCode::SUCCESS, le_features));
}
@@ -2300,17 +2301,17 @@ void DualModeController::LeRemoveDeviceFromResolvingList(CommandView command) {
kNumCommandPackets, status));
}
-void DualModeController::LeSetPeriodicAdvertisingParameters(CommandView command) {
- auto command_view = bluetooth::hci::LeSetPeriodicAdvertisingParametersView::Create(command);
+void DualModeController::LeSetPeriodicAdvertisingParametersV1(CommandView command) {
+ auto command_view = bluetooth::hci::LeSetPeriodicAdvertisingParametersV1View::Create(command);
CHECK_PACKET_VIEW(command_view);
- DEBUG(id_, "<< LE Set Periodic Advertising Parameters");
+ DEBUG(id_, "<< LE Set Periodic Advertising Parameters V1");
DEBUG(id_, " advertising_handle={}", command_view.GetAdvertisingHandle());
ErrorCode status = link_layer_controller_.LeSetPeriodicAdvertisingParameters(
command_view.GetAdvertisingHandle(), command_view.GetPeriodicAdvertisingIntervalMin(),
command_view.GetPeriodicAdvertisingIntervalMax(), command_view.GetIncludeTxPower());
- send_event_(bluetooth::hci::LeSetPeriodicAdvertisingParametersCompleteBuilder::Create(
+ send_event_(bluetooth::hci::LeSetPeriodicAdvertisingParametersV1CompleteBuilder::Create(
kNumCommandPackets, status));
}
@@ -2464,11 +2465,11 @@ void DualModeController::LeSetExtendedScanEnable(CommandView command) {
status));
}
-void DualModeController::LeExtendedCreateConnection(CommandView command) {
- auto command_view = bluetooth::hci::LeExtendedCreateConnectionView::Create(command);
+void DualModeController::LeExtendedCreateConnectionV1(CommandView command) {
+ auto command_view = bluetooth::hci::LeExtendedCreateConnectionV1View::Create(command);
CHECK_PACKET_VIEW(command_view);
- DEBUG(id_, "<< LE Extended Create Connection");
+ DEBUG(id_, "<< LE Extended Create Connection V1");
DEBUG(id_, " peer_address={}", command_view.GetPeerAddress());
DEBUG(id_, " peer_address_type={}",
bluetooth::hci::PeerAddressTypeText(command_view.GetPeerAddressType()));
@@ -2493,8 +2494,8 @@ void DualModeController::LeExtendedCreateConnection(CommandView command) {
peer_address_type,
},
command_view.GetInitiatingPhys(), command_view.GetInitiatingPhyParameters());
- send_event_(bluetooth::hci::LeExtendedCreateConnectionStatusBuilder::Create(status,
- kNumCommandPackets));
+ send_event_(bluetooth::hci::LeExtendedCreateConnectionV1StatusBuilder::Create(
+ status, kNumCommandPackets));
}
void DualModeController::LeSetPrivacyMode(CommandView command) {
@@ -2513,19 +2514,19 @@ void DualModeController::LeSetPrivacyMode(CommandView command) {
send_event_(bluetooth::hci::LeSetPrivacyModeCompleteBuilder::Create(kNumCommandPackets, status));
}
-void DualModeController::LeReadRemoteFeatures(CommandView command) {
- auto command_view = bluetooth::hci::LeReadRemoteFeaturesView::Create(command);
+void DualModeController::LeReadRemoteFeaturesPage0(CommandView command) {
+ auto command_view = bluetooth::hci::LeReadRemoteFeaturesPage0View::Create(command);
CHECK_PACKET_VIEW(command_view);
uint16_t handle = command_view.GetConnectionHandle();
- DEBUG(id_, "<< LE Read Remote Features");
+ DEBUG(id_, "<< LE Read Remote Features Page 0");
DEBUG(id_, " connection_handle=0x{:x}", handle);
- auto status = link_layer_controller_.SendCommandToRemoteByHandle(OpCode::LE_READ_REMOTE_FEATURES,
- command_view.bytes(), handle);
+ auto status = link_layer_controller_.SendCommandToRemoteByHandle(
+ OpCode::LE_READ_REMOTE_FEATURES_PAGE_0, command_view.bytes(), handle);
- send_event_(
- bluetooth::hci::LeReadRemoteFeaturesStatusBuilder::Create(status, kNumCommandPackets));
+ send_event_(bluetooth::hci::LeReadRemoteFeaturesPage0StatusBuilder::Create(status,
+ kNumCommandPackets));
}
void DualModeController::LeEncrypt(CommandView command) {
@@ -3079,11 +3080,11 @@ void DualModeController::LeSetAdvertisingSetRandomAddress(CommandView command) {
kNumCommandPackets, status));
}
-void DualModeController::LeSetExtendedAdvertisingParameters(CommandView command) {
- auto command_view = bluetooth::hci::LeSetExtendedAdvertisingParametersView::Create(command);
+void DualModeController::LeSetExtendedAdvertisingParametersV1(CommandView command) {
+ auto command_view = bluetooth::hci::LeSetExtendedAdvertisingParametersV1View::Create(command);
CHECK_PACKET_VIEW(command_view);
- DEBUG(id_, "<< LE Set Extended Advertising Parameters");
+ DEBUG(id_, "<< LE Set Extended Advertising Parameters V1");
DEBUG(id_, " advertising_handle={}", command_view.GetAdvertisingHandle());
ErrorCode status = link_layer_controller_.LeSetExtendedAdvertisingParameters(
@@ -3098,7 +3099,7 @@ void DualModeController::LeSetExtendedAdvertisingParameters(CommandView command)
command_view.GetScanRequestNotificationEnable() == Enable::ENABLED);
// The selected TX power is always the requested TX power
// at the moment.
- send_event_(bluetooth::hci::LeSetExtendedAdvertisingParametersCompleteBuilder::Create(
+ send_event_(bluetooth::hci::LeSetExtendedAdvertisingParametersV1CompleteBuilder::Create(
kNumCommandPackets, status, command_view.GetAdvertisingTxPower()));
}
@@ -3508,7 +3509,8 @@ const std::unordered_map<OpCode, OpCodeIndex> DualModeController::hci_command_op
// TESTING
{OpCode::READ_LOOPBACK_MODE, OpCodeIndex::READ_LOOPBACK_MODE},
{OpCode::WRITE_LOOPBACK_MODE, OpCodeIndex::WRITE_LOOPBACK_MODE},
- {OpCode::ENABLE_DEVICE_UNDER_TEST_MODE, OpCodeIndex::ENABLE_DEVICE_UNDER_TEST_MODE},
+ {OpCode::ENABLE_IMPLEMENTATION_UNDER_TEST_MODE,
+ OpCodeIndex::ENABLE_IMPLEMENTATION_UNDER_TEST_MODE},
{OpCode::WRITE_SIMPLE_PAIRING_DEBUG_MODE, OpCodeIndex::WRITE_SIMPLE_PAIRING_DEBUG_MODE},
{OpCode::WRITE_SECURE_CONNECTIONS_TEST_MODE,
OpCodeIndex::WRITE_SECURE_CONNECTIONS_TEST_MODE},
@@ -3516,7 +3518,8 @@ const std::unordered_map<OpCode, OpCodeIndex> DualModeController::hci_command_op
// LE_CONTROLLER
{OpCode::LE_SET_EVENT_MASK, OpCodeIndex::LE_SET_EVENT_MASK},
{OpCode::LE_READ_BUFFER_SIZE_V1, OpCodeIndex::LE_READ_BUFFER_SIZE_V1},
- {OpCode::LE_READ_LOCAL_SUPPORTED_FEATURES, OpCodeIndex::LE_READ_LOCAL_SUPPORTED_FEATURES},
+ {OpCode::LE_READ_LOCAL_SUPPORTED_FEATURES_PAGE_0,
+ OpCodeIndex::LE_READ_LOCAL_SUPPORTED_FEATURES_PAGE_0},
{OpCode::LE_SET_RANDOM_ADDRESS, OpCodeIndex::LE_SET_RANDOM_ADDRESS},
{OpCode::LE_SET_ADVERTISING_PARAMETERS, OpCodeIndex::LE_SET_ADVERTISING_PARAMETERS},
{OpCode::LE_READ_ADVERTISING_PHYSICAL_CHANNEL_TX_POWER,
@@ -3538,7 +3541,7 @@ const std::unordered_map<OpCode, OpCodeIndex> DualModeController::hci_command_op
{OpCode::LE_SET_HOST_CHANNEL_CLASSIFICATION,
OpCodeIndex::LE_SET_HOST_CHANNEL_CLASSIFICATION},
{OpCode::LE_READ_CHANNEL_MAP, OpCodeIndex::LE_READ_CHANNEL_MAP},
- {OpCode::LE_READ_REMOTE_FEATURES, OpCodeIndex::LE_READ_REMOTE_FEATURES},
+ {OpCode::LE_READ_REMOTE_FEATURES_PAGE_0, OpCodeIndex::LE_READ_REMOTE_FEATURES_PAGE_0},
{OpCode::LE_ENCRYPT, OpCodeIndex::LE_ENCRYPT},
{OpCode::LE_RAND, OpCodeIndex::LE_RAND},
{OpCode::LE_START_ENCRYPTION, OpCodeIndex::LE_START_ENCRYPTION},
@@ -3578,8 +3581,8 @@ const std::unordered_map<OpCode, OpCodeIndex> DualModeController::hci_command_op
{OpCode::LE_TRANSMITTER_TEST_V2, OpCodeIndex::LE_TRANSMITTER_TEST_V2},
{OpCode::LE_SET_ADVERTISING_SET_RANDOM_ADDRESS,
OpCodeIndex::LE_SET_ADVERTISING_SET_RANDOM_ADDRESS},
- {OpCode::LE_SET_EXTENDED_ADVERTISING_PARAMETERS,
- OpCodeIndex::LE_SET_EXTENDED_ADVERTISING_PARAMETERS},
+ {OpCode::LE_SET_EXTENDED_ADVERTISING_PARAMETERS_V1,
+ OpCodeIndex::LE_SET_EXTENDED_ADVERTISING_PARAMETERS_V1},
{OpCode::LE_SET_EXTENDED_ADVERTISING_DATA, OpCodeIndex::LE_SET_EXTENDED_ADVERTISING_DATA},
{OpCode::LE_SET_EXTENDED_SCAN_RESPONSE_DATA,
OpCodeIndex::LE_SET_EXTENDED_SCAN_RESPONSE_DATA},
@@ -3591,14 +3594,14 @@ const std::unordered_map<OpCode, OpCodeIndex> DualModeController::hci_command_op
OpCodeIndex::LE_READ_NUMBER_OF_SUPPORTED_ADVERTISING_SETS},
{OpCode::LE_REMOVE_ADVERTISING_SET, OpCodeIndex::LE_REMOVE_ADVERTISING_SET},
{OpCode::LE_CLEAR_ADVERTISING_SETS, OpCodeIndex::LE_CLEAR_ADVERTISING_SETS},
- {OpCode::LE_SET_PERIODIC_ADVERTISING_PARAMETERS,
- OpCodeIndex::LE_SET_PERIODIC_ADVERTISING_PARAMETERS},
+ {OpCode::LE_SET_PERIODIC_ADVERTISING_PARAMETERS_V1,
+ OpCodeIndex::LE_SET_PERIODIC_ADVERTISING_PARAMETERS_V1},
{OpCode::LE_SET_PERIODIC_ADVERTISING_DATA, OpCodeIndex::LE_SET_PERIODIC_ADVERTISING_DATA},
{OpCode::LE_SET_PERIODIC_ADVERTISING_ENABLE,
OpCodeIndex::LE_SET_PERIODIC_ADVERTISING_ENABLE},
{OpCode::LE_SET_EXTENDED_SCAN_PARAMETERS, OpCodeIndex::LE_SET_EXTENDED_SCAN_PARAMETERS},
{OpCode::LE_SET_EXTENDED_SCAN_ENABLE, OpCodeIndex::LE_SET_EXTENDED_SCAN_ENABLE},
- {OpCode::LE_EXTENDED_CREATE_CONNECTION, OpCodeIndex::LE_EXTENDED_CREATE_CONNECTION},
+ {OpCode::LE_EXTENDED_CREATE_CONNECTION_V1, OpCodeIndex::LE_EXTENDED_CREATE_CONNECTION_V1},
{OpCode::LE_PERIODIC_ADVERTISING_CREATE_SYNC,
OpCodeIndex::LE_PERIODIC_ADVERTISING_CREATE_SYNC},
{OpCode::LE_PERIODIC_ADVERTISING_CREATE_SYNC_CANCEL,
@@ -3665,7 +3668,7 @@ const std::unordered_map<OpCode, OpCodeIndex> DualModeController::hci_command_op
{OpCode::LE_ISO_RECEIVE_TEST, OpCodeIndex::LE_ISO_RECEIVE_TEST},
{OpCode::LE_ISO_READ_TEST_COUNTERS, OpCodeIndex::LE_ISO_READ_TEST_COUNTERS},
{OpCode::LE_ISO_TEST_END, OpCodeIndex::LE_ISO_TEST_END},
- {OpCode::LE_SET_HOST_FEATURE, OpCodeIndex::LE_SET_HOST_FEATURE},
+ {OpCode::LE_SET_HOST_FEATURE_V1, OpCodeIndex::LE_SET_HOST_FEATURE_V1},
{OpCode::LE_READ_ISO_LINK_QUALITY, OpCodeIndex::LE_READ_ISO_LINK_QUALITY},
{OpCode::LE_ENHANCED_READ_TRANSMIT_POWER_LEVEL,
OpCodeIndex::LE_ENHANCED_READ_TRANSMIT_POWER_LEVEL},
@@ -3681,6 +3684,49 @@ const std::unordered_map<OpCode, OpCodeIndex> DualModeController::hci_command_op
OpCodeIndex::LE_SET_DATA_RELATED_ADDRESS_CHANGES},
{OpCode::LE_SET_DEFAULT_SUBRATE, OpCodeIndex::LE_SET_DEFAULT_SUBRATE},
{OpCode::LE_SUBRATE_REQUEST, OpCodeIndex::LE_SUBRATE_REQUEST},
+ {OpCode::LE_SET_EXTENDED_ADVERTISING_PARAMETERS_V2,
+ OpCodeIndex::LE_SET_EXTENDED_ADVERTISING_PARAMETERS_V2},
+ {OpCode::LE_SET_DECISION_DATA, OpCodeIndex::LE_SET_DECISION_DATA},
+ {OpCode::LE_SET_DECISION_INSTRUCTIONS, OpCodeIndex::LE_SET_DECISION_INSTRUCTIONS},
+ {OpCode::LE_SET_PERIODIC_ADVERTISING_SUBEVENT_DATA,
+ OpCodeIndex::LE_SET_PERIODIC_ADVERTISING_SUBEVENT_DATA},
+ {OpCode::LE_SET_PERIODIC_ADVERTISING_RESPONSE_DATA,
+ OpCodeIndex::LE_SET_PERIODIC_ADVERTISING_RESPONSE_DATA},
+ {OpCode::LE_SET_PERIODIC_SYNC_SUBEVENT, OpCodeIndex::LE_SET_PERIODIC_SYNC_SUBEVENT},
+ {OpCode::LE_EXTENDED_CREATE_CONNECTION_V2, OpCodeIndex::LE_EXTENDED_CREATE_CONNECTION_V2},
+ {OpCode::LE_SET_PERIODIC_ADVERTISING_PARAMETERS_V2,
+ OpCodeIndex::LE_SET_PERIODIC_ADVERTISING_PARAMETERS_V2},
+ {OpCode::LE_READ_ALL_LOCAL_SUPPORTED_FEATURES,
+ OpCodeIndex::LE_READ_ALL_LOCAL_SUPPORTED_FEATURES},
+ {OpCode::LE_READ_ALL_REMOTE_FEATURES, OpCodeIndex::LE_READ_ALL_REMOTE_FEATURES},
+ {OpCode::LE_CS_READ_LOCAL_SUPPORTED_CAPABILITIES,
+ OpCodeIndex::LE_CS_READ_LOCAL_SUPPORTED_CAPABILITIES},
+ {OpCode::LE_CS_READ_REMOTE_SUPPORTED_CAPABILITIES,
+ OpCodeIndex::LE_CS_READ_REMOTE_SUPPORTED_CAPABILITIES},
+ {OpCode::LE_CS_WRITE_CACHED_REMOTE_SUPPORTED_CAPABILITIES,
+ OpCodeIndex::LE_CS_WRITE_CACHED_REMOTE_SUPPORTED_CAPABILITIES},
+ {OpCode::LE_CS_SECURITY_ENABLE, OpCodeIndex::LE_CS_SECURITY_ENABLE},
+ {OpCode::LE_CS_SET_DEFAULT_SETTINGS, OpCodeIndex::LE_CS_SET_DEFAULT_SETTINGS},
+ {OpCode::LE_CS_READ_REMOTE_FAE_TABLE, OpCodeIndex::LE_CS_READ_REMOTE_FAE_TABLE},
+ {OpCode::LE_CS_WRITE_CACHED_REMOTE_FAE_TABLE,
+ OpCodeIndex::LE_CS_WRITE_CACHED_REMOTE_FAE_TABLE},
+ {OpCode::LE_CS_CREATE_CONFIG, OpCodeIndex::LE_CS_CREATE_CONFIG},
+ {OpCode::LE_CS_REMOVE_CONFIG, OpCodeIndex::LE_CS_REMOVE_CONFIG},
+ {OpCode::LE_CS_SET_CHANNEL_CLASSIFICATION, OpCodeIndex::LE_CS_SET_CHANNEL_CLASSIFICATION},
+ {OpCode::LE_CS_SET_PROCEDURE_PARAMETERS, OpCodeIndex::LE_CS_SET_PROCEDURE_PARAMETERS},
+ {OpCode::LE_CS_PROCEDURE_ENABLE, OpCodeIndex::LE_CS_PROCEDURE_ENABLE},
+ {OpCode::LE_CS_TEST, OpCodeIndex::LE_CS_TEST},
+ {OpCode::LE_CS_TEST_END, OpCodeIndex::LE_CS_TEST_END},
+ {OpCode::LE_ADD_DEVICE_TO_MONITORED_ADVERTISERS_LIST,
+ OpCodeIndex::LE_ADD_DEVICE_TO_MONITORED_ADVERTISERS_LIST},
+ {OpCode::LE_REMOVE_DEVICE_FROM_MONITORED_ADVERTISERS_LIST,
+ OpCodeIndex::LE_REMOVE_DEVICE_FROM_MONITORED_ADVERTISERS_LIST},
+ {OpCode::LE_CLEAR_MONITORED_ADVERTISERS_LIST,
+ OpCodeIndex::LE_CLEAR_MONITORED_ADVERTISERS_LIST},
+ {OpCode::LE_READ_MONITORED_ADVERTISERS_LIST_SIZE,
+ OpCodeIndex::LE_READ_MONITORED_ADVERTISERS_LIST_SIZE},
+ {OpCode::LE_ENABLE_MONITORING_ADVERTISERS, OpCodeIndex::LE_ENABLE_MONITORING_ADVERTISERS},
+ {OpCode::LE_FRAME_SPACE_UPDATE, OpCodeIndex::LE_FRAME_SPACE_UPDATE},
};
const std::unordered_map<OpCode, DualModeController::CommandHandler>
@@ -3970,8 +4016,8 @@ const std::unordered_map<OpCode, DualModeController::CommandHandler>
// LE_CONTROLLER
{OpCode::LE_SET_EVENT_MASK, &DualModeController::LeSetEventMask},
{OpCode::LE_READ_BUFFER_SIZE_V1, &DualModeController::LeReadBufferSizeV1},
- {OpCode::LE_READ_LOCAL_SUPPORTED_FEATURES,
- &DualModeController::LeReadLocalSupportedFeatures},
+ {OpCode::LE_READ_LOCAL_SUPPORTED_FEATURES_PAGE_0,
+ &DualModeController::LeReadLocalSupportedFeaturesPage0},
{OpCode::LE_SET_RANDOM_ADDRESS, &DualModeController::LeSetRandomAddress},
{OpCode::LE_SET_ADVERTISING_PARAMETERS,
&DualModeController::LeSetAdvertisingParameters},
@@ -3996,7 +4042,8 @@ const std::unordered_map<OpCode, DualModeController::CommandHandler>
//{OpCode::LE_SET_HOST_CHANNEL_CLASSIFICATION,
//&DualModeController::LeSetHostChannelClassification},
//{OpCode::LE_READ_CHANNEL_MAP, &DualModeController::LeReadChannelMap},
- {OpCode::LE_READ_REMOTE_FEATURES, &DualModeController::LeReadRemoteFeatures},
+ {OpCode::LE_READ_REMOTE_FEATURES_PAGE_0,
+ &DualModeController::LeReadRemoteFeaturesPage0},
{OpCode::LE_ENCRYPT, &DualModeController::LeEncrypt},
{OpCode::LE_RAND, &DualModeController::LeRand},
{OpCode::LE_START_ENCRYPTION, &DualModeController::LeStartEncryption},
@@ -4045,8 +4092,8 @@ const std::unordered_map<OpCode, DualModeController::CommandHandler>
//&DualModeController::LeTransmitterTestV2},
{OpCode::LE_SET_ADVERTISING_SET_RANDOM_ADDRESS,
&DualModeController::LeSetAdvertisingSetRandomAddress},
- {OpCode::LE_SET_EXTENDED_ADVERTISING_PARAMETERS,
- &DualModeController::LeSetExtendedAdvertisingParameters},
+ {OpCode::LE_SET_EXTENDED_ADVERTISING_PARAMETERS_V1,
+ &DualModeController::LeSetExtendedAdvertisingParametersV1},
{OpCode::LE_SET_EXTENDED_ADVERTISING_DATA,
&DualModeController::LeSetExtendedAdvertisingData},
{OpCode::LE_SET_EXTENDED_SCAN_RESPONSE_DATA,
@@ -4059,8 +4106,8 @@ const std::unordered_map<OpCode, DualModeController::CommandHandler>
&DualModeController::LeReadNumberOfSupportedAdvertisingSets},
{OpCode::LE_REMOVE_ADVERTISING_SET, &DualModeController::LeRemoveAdvertisingSet},
{OpCode::LE_CLEAR_ADVERTISING_SETS, &DualModeController::LeClearAdvertisingSets},
- {OpCode::LE_SET_PERIODIC_ADVERTISING_PARAMETERS,
- &DualModeController::LeSetPeriodicAdvertisingParameters},
+ {OpCode::LE_SET_PERIODIC_ADVERTISING_PARAMETERS_V1,
+ &DualModeController::LeSetPeriodicAdvertisingParametersV1},
{OpCode::LE_SET_PERIODIC_ADVERTISING_DATA,
&DualModeController::LeSetPeriodicAdvertisingData},
{OpCode::LE_SET_PERIODIC_ADVERTISING_ENABLE,
@@ -4068,8 +4115,8 @@ const std::unordered_map<OpCode, DualModeController::CommandHandler>
{OpCode::LE_SET_EXTENDED_SCAN_PARAMETERS,
&DualModeController::LeSetExtendedScanParameters},
{OpCode::LE_SET_EXTENDED_SCAN_ENABLE, &DualModeController::LeSetExtendedScanEnable},
- {OpCode::LE_EXTENDED_CREATE_CONNECTION,
- &DualModeController::LeExtendedCreateConnection},
+ {OpCode::LE_EXTENDED_CREATE_CONNECTION_V1,
+ &DualModeController::LeExtendedCreateConnectionV1},
{OpCode::LE_PERIODIC_ADVERTISING_CREATE_SYNC,
&DualModeController::LePeriodicAdvertisingCreateSync},
{OpCode::LE_PERIODIC_ADVERTISING_CREATE_SYNC_CANCEL,
@@ -4147,7 +4194,7 @@ const std::unordered_map<OpCode, DualModeController::CommandHandler>
//{OpCode::LE_ISO_READ_TEST_COUNTERS,
//&DualModeController::LeIsoReadTestCounters},
//{OpCode::LE_ISO_TEST_END, &DualModeController::LeIsoTestEnd},
- {OpCode::LE_SET_HOST_FEATURE, &DualModeController::LeSetHostFeature},
+ {OpCode::LE_SET_HOST_FEATURE_V1, &DualModeController::LeSetHostFeatureV1},
//{OpCode::LE_READ_ISO_LINK_QUALITY,
//&DualModeController::LeReadIsoLinkQuality},
//{OpCode::LE_ENHANCED_READ_TRANSMIT_POWER_LEVEL,
@@ -4167,6 +4214,57 @@ const std::unordered_map<OpCode, DualModeController::CommandHandler>
//{OpCode::LE_SET_DEFAULT_SUBRATE,
//&DualModeController::LeSetDefaultSubrate},
//{OpCode::LE_SUBRATE_REQUEST, &DualModeController::LeSubrateRequest},
+ //{OpCode::LE_SET_EXTENDED_ADVERTISING_PARAMETERS_V2,
+ //&DualModeController::LeSetExtendedAdvertisingParametersV2},
+ //{OpCode::LE_SET_DECISION_DATA, &DualModeController::LeSetDecisionData},
+ //{OpCode::LE_SET_DECISION_INSTRUCTIONS,
+ //&DualModeController::LeSetDecisionInstructions},
+ //{OpCode::LE_SET_PERIODIC_ADVERTISING_SUBEVENT_DATA,
+ //&DualModeController::LeSetPeriodicAdvertisingSubeventData},
+ //{OpCode::LE_SET_PERIODIC_ADVERTISING_RESPONSE_DATA,
+ //&DualModeController::LeSetPeriodicAdvertisingResponseData},
+ //{OpCode::LE_SET_PERIODIC_SYNC_SUBEVENT,
+ //&DualModeController::LeSetPeriodicSyncSubevent},
+ //{OpCode::LE_EXTENDED_CREATE_CONNECTION_V2,
+ //&DualModeController::LeExtendedCreateConnectionV2},
+ //{OpCode::LE_SET_PERIODIC_ADVERTISING_PARAMETERS_V2,
+ //&DualModeController::LeSetPeriodicAdvertisingParametersV2},
+ //{OpCode::LE_READ_ALL_LOCAL_SUPPORTED_FEATURES,
+ //&DualModeController::LeReadAllLocalSupportedFeatures},
+ //{OpCode::LE_READ_ALL_REMOTE_FEATURES,
+ //&DualModeController::LeReadAllRemoteFeatures},
+ //{OpCode::LE_CS_READ_LOCAL_SUPPORTED_CAPABILITIES,
+ //&DualModeController::LeCsReadLocalSupportedCapabilities},
+ //{OpCode::LE_CS_READ_REMOTE_SUPPORTED_CAPABILITIES,
+ //&DualModeController::LeCsReadRemoteSupportedCapabilities},
+ //{OpCode::LE_CS_WRITE_CACHED_REMOTE_SUPPORTED_CAPABILITIES,
+ //&DualModeController::LeCsWriteCachedRemoteSupportedCapabilities},
+ //{OpCode::LE_CS_SECURITY_ENABLE, &DualModeController::LeCsSecurityEnable},
+ //{OpCode::LE_CS_SET_DEFAULT_SETTINGS, &DualModeController::LeCsSetDefaultSettings},
+ //{OpCode::LE_CS_READ_REMOTE_FAE_TABLE,
+ //&DualModeController::LeCsReadRemoteFaeTable},
+ //{OpCode::LE_CS_WRITE_CACHED_REMOTE_FAE_TABLE,
+ //&DualModeController::LeCsWriteCachedRemoteFaeTable},
+ //{OpCode::LE_CS_CREATE_CONFIG, &DualModeController::LeCsCreateConfig},
+ //{OpCode::LE_CS_REMOVE_CONFIG, &DualModeController::LeCsRemoveConfig},
+ //{OpCode::LE_CS_SET_CHANNEL_CLASSIFICATION,
+ //&DualModeController::LeCsSetChannelClassification},
+ //{OpCode::LE_CS_SET_PROCEDURE_PARAMETERS,
+ //&DualModeController::LeCsSetProcedureParameters},
+ //{OpCode::LE_CS_PROCEDURE_ENABLE, &DualModeController::LeCsProcedureEnable},
+ //{OpCode::LE_CS_TEST, &DualModeController::LeCsTest},
+ //{OpCode::LE_CS_TEST_END, &DualModeController::LeCsTestEnd},
+ //{OpCode::LE_ADD_DEVICE_TO_MONITORED_ADVERTISERS_LIST,
+ //&DualModeController::LeAddDeviceToMonitoredAdvertisersList},
+ //{OpCode::LE_REMOVE_DEVICE_FROM_MONITORED_ADVERTISERS_LIST,
+ //&DualModeController::LeRemoveDeviceFromMonitoredAdvertisersList},
+ //{OpCode::LE_CLEAR_MONITORED_ADVERTISERS_LIST,
+ //&DualModeController::LeClearMonitoredAdvertisersList},
+ //{OpCode::LE_READ_MONITORED_ADVERTISERS_LIST_SIZE,
+ //&DualModeController::LeReadMonitoredAdvertisersListSize},
+ //{OpCode::LE_ENABLE_MONITORED_ADVERTISERS,
+ //&DualModeController::LeEnableMonitoredAdvertisers},
+ //{OpCode::LE_FRAME_SPACE_UPDATE, &DualModeController::LeFrameSpaceUpdate},
// VENDOR
{OpCode(CSR_VENDOR), &DualModeController::CsrVendorCommand},
diff --git a/tools/rootcanal/model/controller/dual_mode_controller.h b/tools/rootcanal/model/controller/dual_mode_controller.h
index 901d13d802..d0394a7bfd 100644
--- a/tools/rootcanal/model/controller/dual_mode_controller.h
+++ b/tools/rootcanal/model/controller/dual_mode_controller.h
@@ -394,7 +394,7 @@ public:
void LeReadBufferSizeV2(CommandView command);
// 7.8.3
- void LeReadLocalSupportedFeatures(CommandView command);
+ void LeReadLocalSupportedFeaturesPage0(CommandView command);
// 7.8.4
void LeSetRandomAddress(CommandView command);
@@ -424,7 +424,7 @@ public:
void LeConnectionUpdate(CommandView command);
// 7.8.21
- void LeReadRemoteFeatures(CommandView command);
+ void LeReadRemoteFeaturesPage0(CommandView command);
// 7.8.22
void LeEncrypt(CommandView command);
@@ -477,7 +477,7 @@ public:
// 7.8.52 - 7.8.60
void LeSetAdvertisingSetRandomAddress(CommandView command);
- void LeSetExtendedAdvertisingParameters(CommandView command);
+ void LeSetExtendedAdvertisingParametersV1(CommandView command);
void LeSetExtendedAdvertisingData(CommandView command);
void LeSetExtendedScanResponseData(CommandView command);
void LeSetExtendedAdvertisingEnable(CommandView command);
@@ -487,7 +487,7 @@ public:
void LeClearAdvertisingSets(CommandView command);
// 7.8.61 - 7.8.63
- void LeSetPeriodicAdvertisingParameters(CommandView command);
+ void LeSetPeriodicAdvertisingParametersV1(CommandView command);
void LeSetPeriodicAdvertisingData(CommandView command);
void LeSetPeriodicAdvertisingEnable(CommandView command);
@@ -507,7 +507,7 @@ public:
void LeSetExtendedScanEnable(CommandView command);
// 7.8.66
- void LeExtendedCreateConnection(CommandView command);
+ void LeExtendedCreateConnectionV1(CommandView command);
// 7.8.77
void LeSetPrivacyMode(CommandView command);
@@ -516,7 +516,7 @@ public:
void LeRequestPeerSca(CommandView command);
// 7.8.115
- void LeSetHostFeature(CommandView command);
+ void LeSetHostFeatureV1(CommandView command);
// Vendor-specific Commands
void LeGetVendorCapabilities(CommandView command);
diff --git a/tools/rootcanal/model/controller/le_advertiser.cc b/tools/rootcanal/model/controller/le_advertiser.cc
index 7f5a89fd12..cd9ae5610c 100644
--- a/tools/rootcanal/model/controller/le_advertiser.cc
+++ b/tools/rootcanal/model/controller/le_advertiser.cc
@@ -1199,7 +1199,7 @@ uint16_t ExtendedAdvertiser::GetMaxAdvertisingDataLength(
max_advertising_data_length -= 6; // AdvA
max_advertising_data_length -= 2; // ADI
max_advertising_data_length -= 6 * properties.directed_; // TargetA
- max_advertising_data_length -= 1 * properties.tx_power_; // TxPower
+ max_advertising_data_length -= 1 * properties.include_tx_power_; // TxPower
// TODO(pedantic): configure the ACAD field in order to leave the least
// amount of AdvData space to the user (191).
}
@@ -1252,7 +1252,7 @@ uint16_t ExtendedAdvertiser::GetRawAdvertisingEventProperties(
if (properties.anonymous_) {
mask |= 0x20;
}
- if (properties.tx_power_) {
+ if (properties.include_tx_power_) {
mask |= 0x40;
}
return mask;
@@ -1584,13 +1584,13 @@ void LinkLayerController::LeAdvertising() {
// is unmasked.
#if 0
if (IsLeEventUnmasked(SubeventCode::ENHANCED_CONNECTION_COMPLETE)) {
- send_event_(bluetooth::hci::LeEnhancedConnectionCompleteBuilder::Create(
+ send_event_(bluetooth::hci::LeEnhancedConnectionCompleteV1Builder::Create(
ErrorCode::ADVERTISING_TIMEOUT, 0, Role::CENTRAL,
AddressType::PUBLIC_DEVICE_ADDRESS, Address(), Address(), Address(),
0, 0, 0, ClockAccuracy::PPM_500));
} else
#endif
- if (IsLeEventUnmasked(SubeventCode::CONNECTION_COMPLETE)) {
+ if (IsLeEventUnmasked(SubeventCode::LE_CONNECTION_COMPLETE)) {
send_event_(bluetooth::hci::LeConnectionCompleteBuilder::Create(
ErrorCode::ADVERTISING_TIMEOUT, 0, Role::CENTRAL, AddressType::PUBLIC_DEVICE_ADDRESS,
Address(), 0, 0, 0, ClockAccuracy::PPM_500));
@@ -1662,19 +1662,19 @@ void LinkLayerController::LeAdvertising() {
// HCI_LE_Enhanced_Connection_Complete event (see Section 7.7.65.10)
// is unmasked.
if (high_duty_cycle_connectable_directed_advertising &&
- IsLeEventUnmasked(SubeventCode::ENHANCED_CONNECTION_COMPLETE)) {
- send_event_(bluetooth::hci::LeEnhancedConnectionCompleteBuilder::Create(
+ IsLeEventUnmasked(SubeventCode::LE_ENHANCED_CONNECTION_COMPLETE_V1)) {
+ send_event_(bluetooth::hci::LeEnhancedConnectionCompleteV1Builder::Create(
ErrorCode::ADVERTISING_TIMEOUT, 0, Role::CENTRAL,
AddressType::PUBLIC_DEVICE_ADDRESS, Address(), Address(), Address(), 0, 0, 0,
ClockAccuracy::PPM_500));
} else if (high_duty_cycle_connectable_directed_advertising &&
- IsLeEventUnmasked(SubeventCode::CONNECTION_COMPLETE)) {
+ IsLeEventUnmasked(SubeventCode::LE_CONNECTION_COMPLETE)) {
send_event_(bluetooth::hci::LeConnectionCompleteBuilder::Create(
ErrorCode::ADVERTISING_TIMEOUT, 0, Role::CENTRAL,
AddressType::PUBLIC_DEVICE_ADDRESS, Address(), 0, 0, 0, ClockAccuracy::PPM_500));
}
- if (IsLeEventUnmasked(SubeventCode::ADVERTISING_SET_TERMINATED)) {
+ if (IsLeEventUnmasked(SubeventCode::LE_ADVERTISING_SET_TERMINATED)) {
// The parameter Num_Completed_Extended_Advertising_Events is set
// only when Max_Extended_Advertising_Events was configured as
// non-zero in the advertising parameters.
@@ -1698,7 +1698,7 @@ void LinkLayerController::LeAdvertising() {
INFO(id_, "Max Extended Advertising count reached");
advertiser.Disable();
- if (IsLeEventUnmasked(SubeventCode::ADVERTISING_SET_TERMINATED)) {
+ if (IsLeEventUnmasked(SubeventCode::LE_ADVERTISING_SET_TERMINATED)) {
send_event_(bluetooth::hci::LeAdvertisingSetTerminatedBuilder::Create(
ErrorCode::ADVERTISING_TIMEOUT, advertiser.advertising_handle, 0,
advertiser.num_completed_extended_advertising_events));
diff --git a/tools/rootcanal/model/controller/link_layer_controller.cc b/tools/rootcanal/model/controller/link_layer_controller.cc
index e793ac16e3..04416e84c4 100644
--- a/tools/rootcanal/model/controller/link_layer_controller.cc
+++ b/tools/rootcanal/model/controller/link_layer_controller.cc
@@ -132,7 +132,7 @@ bool LinkLayerController::FilterAcceptListBusy() {
// command is pending.
if (initiator_.IsEnabled() &&
initiator_.initiator_filter_policy ==
- bluetooth::hci::InitiatorFilterPolicy::USE_FILTER_ACCEPT_LIST) {
+ bluetooth::hci::InitiatorFilterPolicy::USE_FILTER_ACCEPT_LIST_WITH_PEER_ADDRESS) {
return true;
}
@@ -522,7 +522,7 @@ void LinkLayerController::IncomingLlPhyReq(model::packets::LinkLayerPacketView i
// Notify the host when the phy selection has changed
// (responder in this case).
if ((phy_c_to_p != connection.GetTxPhy() || phy_p_to_c != connection.GetRxPhy()) &&
- IsLeEventUnmasked(SubeventCode::PHY_UPDATE_COMPLETE)) {
+ IsLeEventUnmasked(SubeventCode::LE_PHY_UPDATE_COMPLETE)) {
send_event_(bluetooth::hci::LePhyUpdateCompleteBuilder::Create(
ErrorCode::SUCCESS, connection_handle, phy_c_to_p, phy_p_to_c));
}
@@ -569,7 +569,7 @@ void LinkLayerController::IncomingLlPhyRsp(model::packets::LinkLayerPacketView i
// Always notify the host, even if the phy selection has not changed
// (initiator in this case).
- if (IsLeEventUnmasked(SubeventCode::PHY_UPDATE_COMPLETE)) {
+ if (IsLeEventUnmasked(SubeventCode::LE_PHY_UPDATE_COMPLETE)) {
send_event_(bluetooth::hci::LePhyUpdateCompleteBuilder::Create(
ErrorCode::SUCCESS, connection_handle, phy_c_to_p, phy_p_to_c));
}
@@ -600,7 +600,7 @@ void LinkLayerController::IncomingLlPhyUpdateInd(model::packets::LinkLayerPacket
// Update local state, and notify the host.
// The notification is sent only when the local host is initiator
// of the Phy update procedure or the phy selection has changed.
- if (IsLeEventUnmasked(SubeventCode::PHY_UPDATE_COMPLETE) &&
+ if (IsLeEventUnmasked(SubeventCode::LE_PHY_UPDATE_COMPLETE) &&
(tx_phy != connection.GetTxPhy() || rx_phy != connection.GetRxPhy() ||
connection.InitiatedPhyUpdate())) {
send_event_(bluetooth::hci::LePhyUpdateCompleteBuilder::Create(
@@ -1126,9 +1126,9 @@ ErrorCode LinkLayerController::LePeriodicAdvertisingCreateSyncCancel() {
// successful, the Controller sends an HCI_LE_Periodic_Advertising_Sync_-
// Established event to the Host with the error code Operation Cancelled
// by Host (0x44).
- if (IsLeEventUnmasked(SubeventCode::PERIODIC_ADVERTISING_SYNC_ESTABLISHED)) {
+ if (IsLeEventUnmasked(SubeventCode::LE_PERIODIC_ADVERTISING_SYNC_ESTABLISHED_V1)) {
ScheduleTask(0ms, [this] {
- send_event_(bluetooth::hci::LePeriodicAdvertisingSyncEstablishedBuilder::Create(
+ send_event_(bluetooth::hci::LePeriodicAdvertisingSyncEstablishedV1Builder::Create(
ErrorCode::OPERATION_CANCELLED_BY_HOST, 0, 0, AddressType::PUBLIC_DEVICE_ADDRESS,
Address::kEmpty, bluetooth::hci::SecondaryPhyType::NO_PACKETS, 0,
bluetooth::hci::ClockAccuracy::PPM_500));
@@ -1625,13 +1625,13 @@ ErrorCode LinkLayerController::LeCreateConnectionCancel() {
// Connection Complete or an HCI_LE_Enhanced_Connection_Complete event
// shall be generated. In either case, the event shall be sent with the error
// code Unknown Connection Identifier (0x02).
- if (IsLeEventUnmasked(SubeventCode::ENHANCED_CONNECTION_COMPLETE)) {
+ if (IsLeEventUnmasked(SubeventCode::LE_ENHANCED_CONNECTION_COMPLETE_V1)) {
ScheduleTask(0ms, [this] {
- send_event_(bluetooth::hci::LeEnhancedConnectionCompleteBuilder::Create(
+ send_event_(bluetooth::hci::LeEnhancedConnectionCompleteV1Builder::Create(
ErrorCode::UNKNOWN_CONNECTION, 0, Role::CENTRAL, AddressType::PUBLIC_DEVICE_ADDRESS,
Address(), Address(), Address(), 0, 0, 0, bluetooth::hci::ClockAccuracy::PPM_500));
});
- } else if (IsLeEventUnmasked(SubeventCode::CONNECTION_COMPLETE)) {
+ } else if (IsLeEventUnmasked(SubeventCode::LE_CONNECTION_COMPLETE)) {
ScheduleTask(0ms, [this] {
send_event_(bluetooth::hci::LeConnectionCompleteBuilder::Create(
ErrorCode::UNKNOWN_CONNECTION, 0, Role::CENTRAL, AddressType::PUBLIC_DEVICE_ADDRESS,
@@ -2049,7 +2049,7 @@ ErrorCode LinkLayerController::SendLeCommandToRemoteByAddress(OpCode opcode,
const Address& own_address,
const Address& peer_address) {
switch (opcode) {
- case (OpCode::LE_READ_REMOTE_FEATURES):
+ case (OpCode::LE_READ_REMOTE_FEATURES_PAGE_0):
SendLeLinkLayerPacket(
model::packets::LeReadRemoteFeaturesBuilder::Create(own_address, peer_address));
break;
@@ -2105,7 +2105,7 @@ ErrorCode LinkLayerController::SendCommandToRemoteByHandle(OpCode opcode, pdl::p
}
switch (opcode) {
- case (OpCode::LE_READ_REMOTE_FEATURES):
+ case (OpCode::LE_READ_REMOTE_FEATURES_PAGE_0):
return SendLeCommandToRemoteByAddress(opcode, connections_.GetOwnAddress(handle).GetAddress(),
connections_.GetAddress(handle).GetAddress());
default:
@@ -2849,7 +2849,7 @@ void LinkLayerController::ScanIncomingLeLegacyAdvertisingPdu(
// Legacy scanning, directed advertising.
if (LegacyAdvertising() && should_send_advertising_report &&
should_send_directed_advertising_report &&
- IsLeEventUnmasked(SubeventCode::DIRECTED_ADVERTISING_REPORT)) {
+ IsLeEventUnmasked(SubeventCode::LE_DIRECTED_ADVERTISING_REPORT)) {
bluetooth::hci::LeDirectedAdvertisingResponse response;
response.event_type_ = bluetooth::hci::DirectAdvertisingEventType::ADV_DIRECT_IND;
response.address_type_ = static_cast<bluetooth::hci::DirectAdvertisingAddressType>(
@@ -2865,7 +2865,7 @@ void LinkLayerController::ScanIncomingLeLegacyAdvertisingPdu(
// Legacy scanning, un-directed advertising.
if (LegacyAdvertising() && should_send_advertising_report &&
!should_send_directed_advertising_report &&
- IsLeEventUnmasked(SubeventCode::ADVERTISING_REPORT)) {
+ IsLeEventUnmasked(SubeventCode::LE_ADVERTISING_REPORT)) {
bluetooth::hci::LeAdvertisingResponse response;
response.address_type_ = resolved_advertising_address.GetAddressType();
response.address_ = resolved_advertising_address.GetAddress();
@@ -2892,7 +2892,7 @@ void LinkLayerController::ScanIncomingLeLegacyAdvertisingPdu(
// Extended scanning.
if (ExtendedAdvertising() && should_send_advertising_report &&
- IsLeEventUnmasked(SubeventCode::EXTENDED_ADVERTISING_REPORT)) {
+ IsLeEventUnmasked(SubeventCode::LE_EXTENDED_ADVERTISING_REPORT)) {
bluetooth::hci::LeExtendedAdvertisingResponse response;
response.connectable_ = connectable_advertising;
response.scannable_ = scannable_advertising;
@@ -3061,7 +3061,7 @@ void LinkLayerController::ConnectIncomingLeLegacyAdvertisingPdu(
return;
}
break;
- case bluetooth::hci::InitiatorFilterPolicy::USE_FILTER_ACCEPT_LIST:
+ case bluetooth::hci::InitiatorFilterPolicy::USE_FILTER_ACCEPT_LIST_WITH_PEER_ADDRESS:
if (!LeFilterAcceptListContainsDevice(resolved_advertising_address)) {
DEBUG(id_,
"Legacy advertising ignored by initiator because the "
@@ -3070,6 +3070,12 @@ void LinkLayerController::ConnectIncomingLeLegacyAdvertisingPdu(
return;
}
break;
+ case bluetooth::hci::InitiatorFilterPolicy::USE_DECISION_PDUS:
+ case bluetooth::hci::InitiatorFilterPolicy::USE_FILTER_ACCEPT_LIST_WITH_DECISION_PDUS:
+ DEBUG(id_,
+ "Legacy advertising ignored by initiated because the "
+ "initiator filter policy is unsupported");
+ return;
}
// When an initiator receives a directed connectable advertising event that
@@ -3295,7 +3301,7 @@ void LinkLayerController::ScanIncomingLeExtendedAdvertisingPdu(
}
if (should_send_advertising_report &&
- IsLeEventUnmasked(SubeventCode::EXTENDED_ADVERTISING_REPORT)) {
+ IsLeEventUnmasked(SubeventCode::LE_EXTENDED_ADVERTISING_REPORT)) {
bluetooth::hci::LeExtendedAdvertisingResponse response;
response.connectable_ = connectable_advertising;
response.scannable_ = scannable_advertising;
@@ -3476,7 +3482,7 @@ void LinkLayerController::ConnectIncomingLeExtendedAdvertisingPdu(
return;
}
break;
- case bluetooth::hci::InitiatorFilterPolicy::USE_FILTER_ACCEPT_LIST:
+ case bluetooth::hci::InitiatorFilterPolicy::USE_FILTER_ACCEPT_LIST_WITH_PEER_ADDRESS:
if (!LeFilterAcceptListContainsDevice(resolved_advertising_address)) {
DEBUG(id_,
"Extended advertising ignored by initiator because the "
@@ -3485,6 +3491,12 @@ void LinkLayerController::ConnectIncomingLeExtendedAdvertisingPdu(
return;
}
break;
+ case bluetooth::hci::InitiatorFilterPolicy::USE_DECISION_PDUS:
+ case bluetooth::hci::InitiatorFilterPolicy::USE_FILTER_ACCEPT_LIST_WITH_DECISION_PDUS:
+ DEBUG(id_,
+ "Extended advertising ignored by initiator because the "
+ "initiator filter policy is not supported");
+ return;
}
// When an initiator receives a directed connectable advertising event that
@@ -3654,8 +3666,8 @@ void LinkLayerController::IncomingLePeriodicAdvertisingPdu(
}
// Notify of the new Synchronized train.
- if (IsLeEventUnmasked(SubeventCode::PERIODIC_ADVERTISING_SYNC_ESTABLISHED)) {
- send_event_(bluetooth::hci::LePeriodicAdvertisingSyncEstablishedBuilder::Create(
+ if (IsLeEventUnmasked(SubeventCode::LE_PERIODIC_ADVERTISING_SYNC_ESTABLISHED_V1)) {
+ send_event_(bluetooth::hci::LePeriodicAdvertisingSyncEstablishedV1Builder::Create(
ErrorCode::SUCCESS, sync_handle, advertising_sid,
resolved_advertiser_address.GetAddressType(),
resolved_advertiser_address.GetAddress(), bluetooth::hci::SecondaryPhyType::LE_1M,
@@ -3696,7 +3708,7 @@ void LinkLayerController::IncomingLePeriodicAdvertisingPdu(
// and refresh the timeout for sync termination. The periodic
// advertising event might need to be fragmented to fit the maximum
// size of an HCI event.
- if (IsLeEventUnmasked(SubeventCode::PERIODIC_ADVERTISING_REPORT)) {
+ if (IsLeEventUnmasked(SubeventCode::LE_PERIODIC_ADVERTISING_REPORT_V1)) {
// Each extended advertising report can only pass 229 bytes of
// advertising data (255 - 8 = size of report fields).
std::vector<uint8_t> advertising_data = pdu.GetAdvertisingData();
@@ -3712,7 +3724,7 @@ void LinkLayerController::IncomingLePeriodicAdvertisingPdu(
std::vector<uint8_t> fragment_data(advertising_data.begin() + offset,
advertising_data.begin() + offset + fragment_size);
offset += fragment_size;
- send_event_(bluetooth::hci::LePeriodicAdvertisingReportBuilder::Create(
+ send_event_(bluetooth::hci::LePeriodicAdvertisingReportV1Builder::Create(
sync.sync_handle, pdu.GetTxPower(), rssi,
bluetooth::hci::CteType::NO_CONSTANT_TONE_EXTENSION, data_status, fragment_data));
} while (offset < advertising_data.size());
@@ -4001,7 +4013,7 @@ uint16_t LinkLayerController::HandleLeConnection(
return kReservedHandle;
}
- if (IsLeEventUnmasked(SubeventCode::ENHANCED_CONNECTION_COMPLETE)) {
+ if (IsLeEventUnmasked(SubeventCode::LE_ENHANCED_CONNECTION_COMPLETE_V1)) {
AddressWithType peer_resolved_address = connections_.GetResolvedAddress(handle);
Address peer_resolvable_private_address;
Address connection_address = address.GetAddress();
@@ -4016,12 +4028,12 @@ uint16_t LinkLayerController::HandleLeConnection(
local_resolved_address = Address::kEmpty;
}
- send_event_(bluetooth::hci::LeEnhancedConnectionCompleteBuilder::Create(
+ send_event_(bluetooth::hci::LeEnhancedConnectionCompleteV1Builder::Create(
ErrorCode::SUCCESS, handle, role, peer_address_type, connection_address,
local_resolved_address, peer_resolvable_private_address, connection_interval,
connection_latency, supervision_timeout,
static_cast<bluetooth::hci::ClockAccuracy>(0x00)));
- } else if (IsLeEventUnmasked(SubeventCode::CONNECTION_COMPLETE)) {
+ } else if (IsLeEventUnmasked(SubeventCode::LE_CONNECTION_COMPLETE)) {
send_event_(bluetooth::hci::LeConnectionCompleteBuilder::Create(
ErrorCode::SUCCESS, handle, role, address.GetAddressType(), address.GetAddress(),
connection_interval, connection_latency, supervision_timeout,
@@ -4037,7 +4049,7 @@ uint16_t LinkLayerController::HandleLeConnection(
// an HCI_LE_Channel_Selection_Algorithm event if the connection is created
// using the LE_Extended_Create_Connection command (see Section 7.7.8.66).
if (send_le_channel_selection_algorithm_event &&
- IsLeEventUnmasked(SubeventCode::CHANNEL_SELECTION_ALGORITHM)) {
+ IsLeEventUnmasked(SubeventCode::LE_CHANNEL_SELECTION_ALGORITHM)) {
// The selection channel algorithm probably will have no impact
// on emulation.
send_event_(bluetooth::hci::LeChannelSelectionAlgorithmBuilder::Create(
@@ -4269,7 +4281,7 @@ bool LinkLayerController::ProcessIncomingExtendedConnectRequest(
// event with the Status parameter set to 0x00. The Controller should not send
// any other events in between these two events
- if (IsLeEventUnmasked(SubeventCode::ADVERTISING_SET_TERMINATED)) {
+ if (IsLeEventUnmasked(SubeventCode::LE_ADVERTISING_SET_TERMINATED)) {
send_event_(bluetooth::hci::LeAdvertisingSetTerminatedBuilder::Create(
ErrorCode::SUCCESS, advertiser.advertising_handle, connection_handle,
advertiser.num_completed_extended_advertising_events));
@@ -4328,7 +4340,7 @@ void LinkLayerController::IncomingLeConnectionParameterRequest(
return;
}
- if (IsLeEventUnmasked(SubeventCode::REMOTE_CONNECTION_PARAMETER_REQUEST)) {
+ if (IsLeEventUnmasked(SubeventCode::LE_REMOTE_CONNECTION_PARAMETER_REQUEST)) {
send_event_(bluetooth::hci::LeRemoteConnectionParameterRequestBuilder::Create(
handle, request.GetIntervalMin(), request.GetIntervalMax(), request.GetLatency(),
request.GetTimeout()));
@@ -4352,7 +4364,7 @@ void LinkLayerController::IncomingLeConnectionParameterUpdate(
INFO(id_, "@{}: Unknown connection @{}", incoming.GetDestinationAddress(), peer);
return;
}
- if (IsLeEventUnmasked(SubeventCode::CONNECTION_UPDATE_COMPLETE)) {
+ if (IsLeEventUnmasked(SubeventCode::LE_CONNECTION_UPDATE_COMPLETE)) {
send_event_(bluetooth::hci::LeConnectionUpdateCompleteBuilder::Create(
static_cast<ErrorCode>(update.GetStatus()), handle, update.GetInterval(),
update.GetLatency(), update.GetTimeout()));
@@ -4446,7 +4458,7 @@ void LinkLayerController::IncomingLeReadRemoteFeaturesResponse(
status = static_cast<ErrorCode>(response.GetStatus());
}
if (IsEventUnmasked(EventCode::LE_META_EVENT)) {
- send_event_(bluetooth::hci::LeReadRemoteFeaturesCompleteBuilder::Create(
+ send_event_(bluetooth::hci::LeReadRemoteFeaturesPage0CompleteBuilder::Create(
status, handle, response.GetFeatures()));
}
}
@@ -4668,7 +4680,7 @@ void LinkLayerController::IncomingLeScanResponsePacket(model::packets::LinkLayer
}
if (LegacyAdvertising() && should_send_advertising_report &&
- IsLeEventUnmasked(SubeventCode::ADVERTISING_REPORT)) {
+ IsLeEventUnmasked(SubeventCode::LE_ADVERTISING_REPORT)) {
bluetooth::hci::LeAdvertisingResponse response;
response.event_type_ = bluetooth::hci::AdvertisingEventType::SCAN_RESPONSE;
response.address_ = resolved_advertising_address.GetAddress();
@@ -4679,7 +4691,7 @@ void LinkLayerController::IncomingLeScanResponsePacket(model::packets::LinkLayer
}
if (ExtendedAdvertising() && should_send_advertising_report &&
- IsLeEventUnmasked(SubeventCode::EXTENDED_ADVERTISING_REPORT)) {
+ IsLeEventUnmasked(SubeventCode::LE_EXTENDED_ADVERTISING_REPORT)) {
bluetooth::hci::LeExtendedAdvertisingResponse response;
response.address_ = resolved_advertising_address.GetAddress();
response.address_type_ = static_cast<bluetooth::hci::DirectAdvertisingAddressType>(
@@ -4741,7 +4753,7 @@ void LinkLayerController::LeScanning() {
scanner_.scan_enable = false;
scanner_.pending_scan_request = {};
scanner_.history.clear();
- if (IsLeEventUnmasked(SubeventCode::SCAN_TIMEOUT)) {
+ if (IsLeEventUnmasked(SubeventCode::LE_SCAN_TIMEOUT)) {
send_event_(bluetooth::hci::LeScanTimeoutBuilder::Create());
}
}
@@ -4779,7 +4791,7 @@ void LinkLayerController::LeSynchronization() {
INFO(id_, "Periodic advertising sync with handle 0x{:x} lost", sync.sync_handle);
removed_sync_handles.push_back(sync.sync_handle);
}
- if (IsLeEventUnmasked(SubeventCode::PERIODIC_ADVERTISING_SYNC_LOST)) {
+ if (IsLeEventUnmasked(SubeventCode::LE_PERIODIC_ADVERTISING_SYNC_LOST)) {
send_event_(bluetooth::hci::LePeriodicAdvertisingSyncLostBuilder::Create(sync.sync_handle));
}
}
@@ -5525,7 +5537,7 @@ void LinkLayerController::LeConnectionUpdateComplete(uint16_t handle, uint16_t i
connections_.GetAddress(handle).GetAddress(), static_cast<uint8_t>(ErrorCode::SUCCESS),
interval, latency, supervision_timeout));
- if (IsLeEventUnmasked(SubeventCode::CONNECTION_UPDATE_COMPLETE)) {
+ if (IsLeEventUnmasked(SubeventCode::LE_CONNECTION_UPDATE_COMPLETE)) {
send_event_(bluetooth::hci::LeConnectionUpdateCompleteBuilder::Create(
status, handle, interval, latency, supervision_timeout));
}
@@ -5548,7 +5560,7 @@ ErrorCode LinkLayerController::LeConnectionUpdate(uint16_t handle, uint16_t inte
connections_.GetAddress(handle).GetAddress(), static_cast<uint8_t>(ErrorCode::SUCCESS),
interval_max, latency, supervision_timeout));
- if (IsLeEventUnmasked(SubeventCode::CONNECTION_UPDATE_COMPLETE)) {
+ if (IsLeEventUnmasked(SubeventCode::LE_CONNECTION_UPDATE_COMPLETE)) {
send_event_(bluetooth::hci::LeConnectionUpdateCompleteBuilder::Create(
ErrorCode::SUCCESS, handle, interval_max, latency, supervision_timeout));
}
diff --git a/tools/rootcanal/packets/hci_packets.pdl b/tools/rootcanal/packets/hci_packets.pdl
index db7c51d294..23abb93b29 100644
--- a/tools/rootcanal/packets/hci_packets.pdl
+++ b/tools/rootcanal/packets/hci_packets.pdl
@@ -236,14 +236,14 @@ enum OpCode : 16 {
// TESTING
READ_LOOPBACK_MODE = 0x1801,
WRITE_LOOPBACK_MODE = 0x1802,
- ENABLE_DEVICE_UNDER_TEST_MODE = 0x1803,
+ ENABLE_IMPLEMENTATION_UNDER_TEST_MODE = 0x1803,
WRITE_SIMPLE_PAIRING_DEBUG_MODE = 0x1804,
WRITE_SECURE_CONNECTIONS_TEST_MODE = 0x180A,
// LE_CONTROLLER
LE_SET_EVENT_MASK = 0x2001,
LE_READ_BUFFER_SIZE_V1 = 0x2002,
- LE_READ_LOCAL_SUPPORTED_FEATURES = 0x2003,
+ LE_READ_LOCAL_SUPPORTED_FEATURES_PAGE_0 = 0x2003,
LE_SET_RANDOM_ADDRESS = 0x2005,
LE_SET_ADVERTISING_PARAMETERS = 0x2006,
LE_READ_ADVERTISING_PHYSICAL_CHANNEL_TX_POWER = 0x2007,
@@ -261,7 +261,7 @@ enum OpCode : 16 {
LE_CONNECTION_UPDATE = 0x2013,
LE_SET_HOST_CHANNEL_CLASSIFICATION = 0x2014,
LE_READ_CHANNEL_MAP = 0x2015,
- LE_READ_REMOTE_FEATURES = 0x2016,
+ LE_READ_REMOTE_FEATURES_PAGE_0 = 0x2016,
LE_ENCRYPT = 0x2017,
LE_RAND = 0x2018,
LE_START_ENCRYPTION = 0x2019,
@@ -293,7 +293,7 @@ enum OpCode : 16 {
LE_RECEIVER_TEST_V2 = 0x2033,
LE_TRANSMITTER_TEST_V2 = 0x2034,
LE_SET_ADVERTISING_SET_RANDOM_ADDRESS = 0x2035,
- LE_SET_EXTENDED_ADVERTISING_PARAMETERS = 0x2036,
+ LE_SET_EXTENDED_ADVERTISING_PARAMETERS_V1 = 0x2036,
LE_SET_EXTENDED_ADVERTISING_DATA = 0x2037,
LE_SET_EXTENDED_SCAN_RESPONSE_DATA = 0x2038,
LE_SET_EXTENDED_ADVERTISING_ENABLE = 0x2039,
@@ -301,12 +301,12 @@ enum OpCode : 16 {
LE_READ_NUMBER_OF_SUPPORTED_ADVERTISING_SETS = 0x203B,
LE_REMOVE_ADVERTISING_SET = 0x203C,
LE_CLEAR_ADVERTISING_SETS = 0x203D,
- LE_SET_PERIODIC_ADVERTISING_PARAMETERS = 0x203E,
+ LE_SET_PERIODIC_ADVERTISING_PARAMETERS_V1 = 0x203E,
LE_SET_PERIODIC_ADVERTISING_DATA = 0x203F,
LE_SET_PERIODIC_ADVERTISING_ENABLE = 0x2040,
LE_SET_EXTENDED_SCAN_PARAMETERS = 0x2041,
LE_SET_EXTENDED_SCAN_ENABLE = 0x2042,
- LE_EXTENDED_CREATE_CONNECTION = 0x2043,
+ LE_EXTENDED_CREATE_CONNECTION_V1 = 0x2043,
LE_PERIODIC_ADVERTISING_CREATE_SYNC = 0x2044,
LE_PERIODIC_ADVERTISING_CREATE_SYNC_CANCEL = 0x2045,
LE_PERIODIC_ADVERTISING_TERMINATE_SYNC = 0x2046,
@@ -355,7 +355,7 @@ enum OpCode : 16 {
LE_ISO_RECEIVE_TEST = 0x2071,
LE_ISO_READ_TEST_COUNTERS = 0x2072,
LE_ISO_TEST_END = 0x2073,
- LE_SET_HOST_FEATURE = 0x2074,
+ LE_SET_HOST_FEATURE_V1 = 0x2074,
LE_READ_ISO_LINK_QUALITY = 0x2075,
LE_ENHANCED_READ_TRANSMIT_POWER_LEVEL = 0x2076,
LE_READ_REMOTE_TRANSMIT_POWER_LEVEL = 0x2077,
@@ -366,6 +366,36 @@ enum OpCode : 16 {
LE_SET_DATA_RELATED_ADDRESS_CHANGES = 0x207C,
LE_SET_DEFAULT_SUBRATE = 0x207D,
LE_SUBRATE_REQUEST = 0x207E,
+ LE_SET_EXTENDED_ADVERTISING_PARAMETERS_V2 = 0x207F,
+ LE_SET_DECISION_DATA = 0x2080,
+ LE_SET_DECISION_INSTRUCTIONS = 0x2081,
+ LE_SET_PERIODIC_ADVERTISING_SUBEVENT_DATA = 0x2082,
+ LE_SET_PERIODIC_ADVERTISING_RESPONSE_DATA = 0x2083,
+ LE_SET_PERIODIC_SYNC_SUBEVENT = 0x2084,
+ LE_EXTENDED_CREATE_CONNECTION_V2 = 0x2085,
+ LE_SET_PERIODIC_ADVERTISING_PARAMETERS_V2 = 0x2086,
+ LE_READ_ALL_LOCAL_SUPPORTED_FEATURES = 0x2087,
+ LE_READ_ALL_REMOTE_FEATURES = 0x2088,
+ LE_CS_READ_LOCAL_SUPPORTED_CAPABILITIES = 0x2089,
+ LE_CS_READ_REMOTE_SUPPORTED_CAPABILITIES = 0x208A,
+ LE_CS_WRITE_CACHED_REMOTE_SUPPORTED_CAPABILITIES = 0x208B,
+ LE_CS_SECURITY_ENABLE = 0x208C,
+ LE_CS_SET_DEFAULT_SETTINGS = 0x208D,
+ LE_CS_READ_REMOTE_FAE_TABLE = 0x208E,
+ LE_CS_WRITE_CACHED_REMOTE_FAE_TABLE = 0x208F,
+ LE_CS_CREATE_CONFIG = 0x2090,
+ LE_CS_REMOVE_CONFIG = 0x0291,
+ LE_CS_SET_CHANNEL_CLASSIFICATION = 0x2092,
+ LE_CS_SET_PROCEDURE_PARAMETERS = 0x2093,
+ LE_CS_PROCEDURE_ENABLE = 0x2094,
+ LE_CS_TEST = 0x2095,
+ LE_CS_TEST_END = 0x2096,
+ LE_ADD_DEVICE_TO_MONITORED_ADVERTISERS_LIST = 0x2098,
+ LE_REMOVE_DEVICE_FROM_MONITORED_ADVERTISERS_LIST = 0x2099,
+ LE_CLEAR_MONITORED_ADVERTISERS_LIST = 0x209A,
+ LE_READ_MONITORED_ADVERTISERS_LIST_SIZE = 0x209B,
+ LE_ENABLE_MONITORING_ADVERTISERS = 0x209C,
+ LE_FRAME_SPACE_UPDATE = 0x209D,
// VENDOR_SPECIFIC
// MSFT_OPCODE_xxxx below is needed for the tests.
@@ -466,6 +496,8 @@ enum OpCodeIndex : 16 {
READ_CURRENT_IAC_LAP = 113,
WRITE_CURRENT_IAC_LAP = 114,
SET_AFH_HOST_CHANNEL_CLASSIFICATION = 121,
+ LE_CS_READ_REMOTE_FAE_TABLE = 122,
+ LE_CS_WRITE_CACHED_REMOTE_FAE_TABLE = 123,
READ_INQUIRY_SCAN_TYPE = 124,
WRITE_INQUIRY_SCAN_TYPE = 125,
READ_INQUIRY_MODE = 126,
@@ -487,10 +519,12 @@ enum OpCodeIndex : 16 {
READ_CLOCK = 157,
READ_LOOPBACK_MODE = 160,
WRITE_LOOPBACK_MODE = 161,
- ENABLE_DEVICE_UNDER_TEST_MODE = 162,
+ ENABLE_IMPLEMENTATION_UNDER_TEST_MODE = 162,
SETUP_SYNCHRONOUS_CONNECTION = 163,
ACCEPT_SYNCHRONOUS_CONNECTION = 164,
REJECT_SYNCHRONOUS_CONNECTION = 165,
+ LE_CS_CREATE_CONFIG = 166,
+ LE_CS_REMOVE_CONFIG = 167,
READ_EXTENDED_INQUIRY_RESPONSE = 170,
WRITE_EXTENDED_INQUIRY_RESPONSE = 171,
REFRESH_ENCRYPTION_KEY = 172,
@@ -514,16 +548,23 @@ enum OpCodeIndex : 16 {
SEND_KEYPRESS_NOTIFICATION = 202,
IO_CAPABILITY_REQUEST_NEGATIVE_REPLY = 203,
READ_ENCRYPTION_KEY_SIZE = 204,
+ LE_CS_READ_LOCAL_SUPPORTED_CAPABILITIES = 205,
+ LE_CS_READ_REMOTE_SUPPORTED_CAPABILITIES = 206,
+ LE_CS_WRITE_CACHED_REMOTE_SUPPORTED_CAPABILITIES = 207,
SET_EVENT_MASK_PAGE_2 = 222,
READ_FLOW_CONTROL_MODE = 230,
WRITE_FLOW_CONTROL_MODE = 231,
READ_DATA_BLOCK_SIZE = 232,
+ LE_CS_TEST = 233,
+ LE_CS_TEST_END = 234,
READ_ENHANCED_TRANSMIT_POWER_LEVEL = 240,
+ LE_CS_SECURITY_ENABLE = 241,
READ_LE_HOST_SUPPORT = 245,
WRITE_LE_HOST_SUPPORT = 246,
+ LE_CS_SET_DEFAULT_SETTINGS = 247,
LE_SET_EVENT_MASK = 250,
LE_READ_BUFFER_SIZE_V1 = 251,
- LE_READ_LOCAL_SUPPORTED_FEATURES = 252,
+ LE_READ_LOCAL_SUPPORTED_FEATURES_PAGE_0 = 252,
LE_SET_RANDOM_ADDRESS = 254,
LE_SET_ADVERTISING_PARAMETERS = 255,
LE_READ_ADVERTISING_PHYSICAL_CHANNEL_TX_POWER = 256,
@@ -541,7 +582,7 @@ enum OpCodeIndex : 16 {
LE_CONNECTION_UPDATE = 272,
LE_SET_HOST_CHANNEL_CLASSIFICATION = 273,
LE_READ_CHANNEL_MAP = 274,
- LE_READ_REMOTE_FEATURES = 275,
+ LE_READ_REMOTE_FEATURES_PAGE_0 = 275,
LE_ENCRYPT = 276,
LE_RAND = 277,
LE_START_ENCRYPTION = 280,
@@ -551,6 +592,10 @@ enum OpCodeIndex : 16 {
LE_RECEIVER_TEST_V1 = 284,
LE_TRANSMITTER_TEST_V1 = 285,
LE_TEST_END = 286,
+ LE_ENABLE_MONITORING_ADVERTISERS = 287,
+ LE_CS_SET_CHANNEL_CLASSIFICATION = 290,
+ LE_CS_SET_PROCEDURE_PARAMETERS = 291,
+ LE_CS_PROCEDURE_ENABLE = 292,
ENHANCED_SETUP_SYNCHRONOUS_CONNECTION = 293,
ENHANCED_ACCEPT_SYNCHRONOUS_CONNECTION = 294,
READ_LOCAL_SUPPORTED_CODECS_V1 = 295,
@@ -606,7 +651,7 @@ enum OpCodeIndex : 16 {
LE_RECEIVER_TEST_V2 = 357,
LE_TRANSMITTER_TEST_V2 = 360,
LE_SET_ADVERTISING_SET_RANDOM_ADDRESS = 361,
- LE_SET_EXTENDED_ADVERTISING_PARAMETERS = 362,
+ LE_SET_EXTENDED_ADVERTISING_PARAMETERS_V1 = 362,
LE_SET_EXTENDED_ADVERTISING_DATA = 363,
LE_SET_EXTENDED_SCAN_RESPONSE_DATA = 364,
LE_SET_EXTENDED_ADVERTISING_ENABLE = 365,
@@ -614,12 +659,12 @@ enum OpCodeIndex : 16 {
LE_READ_NUMBER_OF_SUPPORTED_ADVERTISING_SETS = 367,
LE_REMOVE_ADVERTISING_SET = 370,
LE_CLEAR_ADVERTISING_SETS = 371,
- LE_SET_PERIODIC_ADVERTISING_PARAMETERS = 372,
+ LE_SET_PERIODIC_ADVERTISING_PARAMETERS_V1 = 372,
LE_SET_PERIODIC_ADVERTISING_DATA = 373,
LE_SET_PERIODIC_ADVERTISING_ENABLE = 374,
LE_SET_EXTENDED_SCAN_PARAMETERS = 375,
LE_SET_EXTENDED_SCAN_ENABLE = 376,
- LE_EXTENDED_CREATE_CONNECTION = 377,
+ LE_EXTENDED_CREATE_CONNECTION_V1 = 377,
LE_PERIODIC_ADVERTISING_CREATE_SYNC = 380,
LE_PERIODIC_ADVERTISING_CREATE_SYNC_CANCEL = 381,
LE_PERIODIC_ADVERTISING_TERMINATE_SYNC = 382,
@@ -669,7 +714,7 @@ enum OpCodeIndex : 16 {
LE_ISO_RECEIVE_TEST = 436,
LE_ISO_READ_TEST_COUNTERS = 437,
LE_ISO_TEST_END = 440,
- LE_SET_HOST_FEATURE = 441,
+ LE_SET_HOST_FEATURE_V1 = 441,
LE_READ_ISO_LINK_QUALITY = 442,
LE_ENHANCED_READ_TRANSMIT_POWER_LEVEL = 443,
LE_READ_REMOTE_TRANSMIT_POWER_LEVEL = 444,
@@ -686,6 +731,22 @@ enum OpCodeIndex : 16 {
SET_MIN_ENCRYPTION_KEY_SIZE = 457,
LE_SET_DEFAULT_SUBRATE = 460,
LE_SUBRATE_REQUEST = 461,
+ LE_SET_EXTENDED_ADVERTISING_PARAMETERS_V2 = 462,
+ LE_SET_DECISION_DATA = 463,
+ LE_SET_DECISION_INSTRUCTIONS = 464,
+ LE_SET_PERIODIC_ADVERTISING_SUBEVENT_DATA = 465,
+ LE_SET_PERIODIC_ADVERTISING_RESPONSE_DATA = 466,
+ LE_SET_PERIODIC_SYNC_SUBEVENT = 467,
+ LE_EXTENDED_CREATE_CONNECTION_V2 = 470,
+ LE_SET_PERIODIC_ADVERTISING_PARAMETERS_V2 = 471,
+ LE_READ_ALL_LOCAL_SUPPORTED_FEATURES = 472,
+ LE_READ_ALL_REMOTE_FEATURES = 473,
+ LE_SET_HOST_FEATURE_V2 = 474,
+ LE_ADD_DEVICE_TO_MONITORED_ADVERTISERS_LIST = 475,
+ LE_REMOVE_DEVICE_FROM_MONITORED_ADVERTISERS_LIST = 476,
+ LE_CLEAR_MONITORED_ADVERTISERS_LIST = 477,
+ LE_READ_MONITORED_ADVERTISERS_LIST_SIZE = 480,
+ LE_FRAME_SPACE_UPDATE = 481,
}
packet Command {
@@ -756,41 +817,59 @@ enum EventCode : 8 {
// LE events
enum SubeventCode : 8 {
- CONNECTION_COMPLETE = 0x01,
- ADVERTISING_REPORT = 0x02,
- CONNECTION_UPDATE_COMPLETE = 0x03,
- READ_REMOTE_FEATURES_COMPLETE = 0x04,
- LONG_TERM_KEY_REQUEST = 0x05,
- REMOTE_CONNECTION_PARAMETER_REQUEST = 0x06,
- DATA_LENGTH_CHANGE = 0x07,
- READ_LOCAL_P256_PUBLIC_KEY_COMPLETE = 0x08,
- GENERATE_DHKEY_COMPLETE = 0x09,
- ENHANCED_CONNECTION_COMPLETE = 0x0a,
- DIRECTED_ADVERTISING_REPORT = 0x0b,
- PHY_UPDATE_COMPLETE = 0x0c,
- EXTENDED_ADVERTISING_REPORT = 0x0D,
- PERIODIC_ADVERTISING_SYNC_ESTABLISHED = 0x0E,
- PERIODIC_ADVERTISING_REPORT = 0x0F,
- PERIODIC_ADVERTISING_SYNC_LOST = 0x10,
- SCAN_TIMEOUT = 0x11,
- ADVERTISING_SET_TERMINATED = 0x12,
- SCAN_REQUEST_RECEIVED = 0x13,
- CHANNEL_SELECTION_ALGORITHM = 0x14,
- CONNECTIONLESS_IQ_REPORT = 0x15,
- CONNECTION_IQ_REPORT = 0x16,
- CTE_REQUEST_FAILED = 0x17,
- PERIODIC_ADVERTISING_SYNC_TRANSFER_RECEIVED = 0x18,
- CIS_ESTABLISHED = 0x19,
- CIS_REQUEST = 0x1A,
- CREATE_BIG_COMPLETE = 0x1B,
- TERMINATE_BIG_COMPLETE = 0x1C,
- BIG_SYNC_ESTABLISHED = 0x1D,
- BIG_SYNC_LOST = 0x1E,
- REQUEST_PEER_SCA_COMPLETE = 0x1F,
- PATH_LOSS_THRESHOLD = 0x20,
- TRANSMIT_POWER_REPORTING = 0x21,
- BIG_INFO_ADVERTISING_REPORT = 0x22,
+ LE_CONNECTION_COMPLETE = 0x01,
+ LE_ADVERTISING_REPORT = 0x02,
+ LE_CONNECTION_UPDATE_COMPLETE = 0x03,
+ LE_READ_REMOTE_FEATURES_PAGE_0_COMPLETE = 0x04,
+ LE_LONG_TERM_KEY_REQUEST = 0x05,
+ LE_REMOTE_CONNECTION_PARAMETER_REQUEST = 0x06,
+ LE_DATA_LENGTH_CHANGE = 0x07,
+ LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE = 0x08,
+ LE_GENERATE_DHKEY_COMPLETE = 0x09,
+ LE_ENHANCED_CONNECTION_COMPLETE_V1 = 0x0a,
+ LE_DIRECTED_ADVERTISING_REPORT = 0x0b,
+ LE_PHY_UPDATE_COMPLETE = 0x0c,
+ LE_EXTENDED_ADVERTISING_REPORT = 0x0D,
+ LE_PERIODIC_ADVERTISING_SYNC_ESTABLISHED_V1 = 0x0E,
+ LE_PERIODIC_ADVERTISING_REPORT_V1 = 0x0F,
+ LE_PERIODIC_ADVERTISING_SYNC_LOST = 0x10,
+ LE_SCAN_TIMEOUT = 0x11,
+ LE_ADVERTISING_SET_TERMINATED = 0x12,
+ LE_SCAN_REQUEST_RECEIVED = 0x13,
+ LE_CHANNEL_SELECTION_ALGORITHM = 0x14,
+ LE_CONNECTIONLESS_IQ_REPORT = 0x15,
+ LE_CONNECTION_IQ_REPORT = 0x16,
+ LE_CTE_REQUEST_FAILED = 0x17,
+ LE_PERIODIC_ADVERTISING_SYNC_TRANSFER_RECEIVED_V1 = 0x18,
+ LE_CIS_ESTABLISHED_V1 = 0x19,
+ LE_CIS_REQUEST = 0x1A,
+ LE_CREATE_BIG_COMPLETE = 0x1B,
+ LE_TERMINATE_BIG_COMPLETE = 0x1C,
+ LE_BIG_SYNC_ESTABLISHED = 0x1D,
+ LE_BIG_SYNC_LOST = 0x1E,
+ LE_REQUEST_PEER_SCA_COMPLETE = 0x1F,
+ LE_PATH_LOSS_THRESHOLD = 0x20,
+ LE_TRANSMIT_POWER_REPORTING = 0x21,
+ LE_BIG_INFO_ADVERTISING_REPORT = 0x22,
LE_SUBRATE_CHANGE = 0x23,
+ LE_PERIODIC_ADVERTISING_SYNC_ESTABLISHED_V2 = 0x24,
+ LE_PERIODIC_ADVERTISING_REPORT_V2 = 0x25,
+ LE_PERIODIC_ADVERTISING_SYNC_TRANSFER_RECEIVED_V2 = 0x26,
+ LE_PERIODIC_ADVERTISING_SUBEVENT_DATA_REQUEST = 0x27,
+ LE_PERIODIC_ADVERTISING_RESPONSE_REPORT = 0x28,
+ LE_ENHANCED_CONNECTION_COMPLETE_V2 = 0x29,
+ LE_CIS_ESTABLISHED_V2 = 0x2A,
+ LE_READ_ALL_REMOTE_FEATURES_COMPLETE = 0x2B,
+ LE_CS_READ_REMOTE_SUPPORTED_CAPABILITIES_COMPLETE = 0x2C,
+ LE_CS_READ_REMOTE_FAE_TABLE_COMPLETE = 0x2D,
+ LE_CS_SECURITY_ENABLE_COMPLETE = 0x2E,
+ LE_CS_CONFIG_COMPLETE = 0x2F,
+ LE_CS_PROCEDURE_ENABLE_COMPLETE = 0x30,
+ LE_CS_SUBEVENT_RESULT = 0x31,
+ LE_CS_SUBEVENT_RESULT_CONTINUE = 0x32,
+ LE_CS_TEST_END_COMPLETE = 0x33,
+ LE_MONITORED_ADVERTISERS_REPORT = 0x34,
+ LE_FRAME_SPACE_UPDATE_COMPLETE = 0x35,
}
// Vendor specific events
@@ -808,6 +887,11 @@ packet Event {
_payload_,
}
+packet LeMetaEvent : Event (event_code = LE_META_EVENT) {
+ subevent_code : SubeventCode,
+ _body_,
+}
+
// Common definitions for commands and events
enum FeatureFlag : 1 {
@@ -2590,6 +2674,7 @@ enum HciVersion : 8 {
V_5_2 = 0x0b,
V_5_3 = 0x0c,
V_5_4 = 0x0d,
+ V_6_0 = 0x0e,
}
enum LmpVersion : 8 {
@@ -2607,6 +2692,7 @@ enum LmpVersion : 8 {
V_5_2 = 0x0b,
V_5_3 = 0x0c,
V_5_4 = 0x0d,
+ V_6_0 = 0x0e,
}
struct LocalVersionInformation {
@@ -3015,10 +3101,10 @@ packet WriteLoopbackModeComplete : CommandComplete (command_op_code = WRITE_LOOP
status : ErrorCode,
}
-packet EnableDeviceUnderTestMode : Command (op_code = ENABLE_DEVICE_UNDER_TEST_MODE) {
+packet EnableImplementationUnderTestMode : Command (op_code = ENABLE_IMPLEMENTATION_UNDER_TEST_MODE) {
}
-packet EnableDeviceUnderTestModeComplete : CommandComplete (command_op_code = ENABLE_DEVICE_UNDER_TEST_MODE) {
+packet EnableImplementationUnderTestModeComplete : CommandComplete (command_op_code = ENABLE_IMPLEMENTATION_UNDER_TEST_MODE) {
status : ErrorCode,
}
@@ -3071,66 +3157,86 @@ test LeReadBufferSizeV1Complete {
"\x0e\x07\x01\x02\x20\x00\xfb\x00\x10",
}
+/// Core Specification Vol 6, Part B 4.6 § Feature support
enum LLFeaturesBits : 64 {
// Byte 0
- LE_ENCRYPTION = 0x0000000000000001,
- CONNECTION_PARAMETERS_REQUEST_PROCEDURE = 0x0000000000000002,
- EXTENDED_REJECT_INDICATION = 0x0000000000000004,
- PERIPHERAL_INITIATED_FEATURES_EXCHANGE = 0x0000000000000008,
- LE_PING = 0x0000000000000010,
- LE_DATA_PACKET_LENGTH_EXTENSION = 0x0000000000000020,
- LL_PRIVACY = 0x0000000000000040,
- EXTENDED_SCANNER_FILTER_POLICIES = 0x0000000000000080,
+ LE_ENCRYPTION = 0x0000000000000001,
+ CONNECTION_PARAMETERS_REQUEST_PROCEDURE = 0x0000000000000002,
+ EXTENDED_REJECT_INDICATION = 0x0000000000000004,
+ PERIPHERAL_INITIATED_FEATURES_EXCHANGE = 0x0000000000000008,
+ LE_PING = 0x0000000000000010,
+ LE_DATA_PACKET_LENGTH_EXTENSION = 0x0000000000000020,
+ LL_PRIVACY = 0x0000000000000040,
+ EXTENDED_SCANNER_FILTER_POLICIES = 0x0000000000000080,
// Byte 1
- LE_2M_PHY = 0x0000000000000100,
- STABLE_MODULATION_INDEX_TRANSMITTER = 0x0000000000000200,
- STABLE_MODULATION_INDEX_RECEIVER = 0x0000000000000400,
- LE_CODED_PHY = 0x0000000000000800,
- LE_EXTENDED_ADVERTISING = 0x0000000000001000,
- LE_PERIODIC_ADVERTISING = 0x0000000000002000,
- CHANNEL_SELECTION_ALGORITHM_2 = 0x0000000000004000,
- LE_POWER_CLASS_1 = 0x0000000000008000,
+ LE_2M_PHY = 0x0000000000000100,
+ STABLE_MODULATION_INDEX_TRANSMITTER = 0x0000000000000200,
+ STABLE_MODULATION_INDEX_RECEIVER = 0x0000000000000400,
+ LE_CODED_PHY = 0x0000000000000800,
+ LE_EXTENDED_ADVERTISING = 0x0000000000001000,
+ LE_PERIODIC_ADVERTISING = 0x0000000000002000,
+ CHANNEL_SELECTION_ALGORITHM_2 = 0x0000000000004000,
+ LE_POWER_CLASS_1 = 0x0000000000008000,
// Byte 2
- MINIMUM_NUMBER_OF_USED_CHANNELS_PROCEDURE = 0x0000000000010000,
- CONNECTION_CTE_REQUEST = 0x0000000000020000,
- CONNECTION_CTE_RESPONSE = 0x0000000000040000,
- CONNECTIONLESS_CTE_TRANSMITTER = 0x0000000000080000,
- CONNECTIONLESS_CTE_RECEIVER = 0x0000000000100000,
- ANTENNA_SWITCHING_DURING_CTE_TRANSMISSION = 0x0000000000200000,
- ANTENNA_SWITCHING_DURING_CTE_RECEPTION = 0x0000000000400000,
- RECEIVING_CONSTANT_TONE_EXTENSIONS = 0x0000000000800000,
+ MINIMUM_NUMBER_OF_USED_CHANNELS_PROCEDURE = 0x0000000000010000,
+ CONNECTION_CTE_REQUEST = 0x0000000000020000,
+ CONNECTION_CTE_RESPONSE = 0x0000000000040000,
+ CONNECTIONLESS_CTE_TRANSMITTER = 0x0000000000080000,
+ CONNECTIONLESS_CTE_RECEIVER = 0x0000000000100000,
+ ANTENNA_SWITCHING_DURING_CTE_TRANSMISSION = 0x0000000000200000,
+ ANTENNA_SWITCHING_DURING_CTE_RECEPTION = 0x0000000000400000,
+ RECEIVING_CONSTANT_TONE_EXTENSIONS = 0x0000000000800000,
// Byte 3
- PERIODIC_ADVERTISING_SYNC_TRANSFER_SENDER = 0x0000000001000000,
- PERIODIC_ADVERTISING_SYNC_TRANSFER_RECIPIENT = 0x0000000002000000,
- SLEEP_CLOCK_ACCURACY_UPDATES = 0x0000000004000000,
- REMOTE_PUBLIC_KEY_VALIDATION = 0x0000000008000000,
- CONNECTED_ISOCHRONOUS_STREAM_CENTRAL = 0x0000000010000000,
- CONNECTED_ISOCHRONOUS_STREAM_PERIPHERAL = 0x0000000020000000,
- ISOCHRONOUS_BROADCASTER = 0x0000000040000000,
- SYNCHRONIZED_RECEIVER = 0x0000000080000000,
+ PERIODIC_ADVERTISING_SYNC_TRANSFER_SENDER = 0x0000000001000000,
+ PERIODIC_ADVERTISING_SYNC_TRANSFER_RECIPIENT = 0x0000000002000000,
+ SLEEP_CLOCK_ACCURACY_UPDATES = 0x0000000004000000,
+ REMOTE_PUBLIC_KEY_VALIDATION = 0x0000000008000000,
+ CONNECTED_ISOCHRONOUS_STREAM_CENTRAL = 0x0000000010000000,
+ CONNECTED_ISOCHRONOUS_STREAM_PERIPHERAL = 0x0000000020000000,
+ ISOCHRONOUS_BROADCASTER = 0x0000000040000000,
+ SYNCHRONIZED_RECEIVER = 0x0000000080000000,
// Byte 4
- CONNECTED_ISOCHRONOUS_STREAM_HOST_SUPPORT = 0x0000000100000000,
- LE_POWER_CONTROL_REQUEST = 0x0000000200000000,
- LE_POWER_CONTROL_REQUEST_BIS = 0x0000000400000000,
- LE_PATH_LOSS_MONITORING = 0x0000000800000000,
- PERIODIC_ADVERTISING_ADI_SUPPORT = 0x0000001000000000,
- CONNECTION_SUBRATING = 0x0000002000000000,
- CONNECTION_SUBRATING_HOST_SUPPORT = 0x0000004000000000,
- CHANNEL_CLASSIFICATION = 0x0000008000000000,
+ CONNECTED_ISOCHRONOUS_STREAM_HOST_SUPPORT = 0x0000000100000000,
+ LE_POWER_CONTROL_REQUEST = 0x0000000200000000,
+ LE_POWER_CONTROL_REQUEST_BIS = 0x0000000400000000,
+ LE_PATH_LOSS_MONITORING = 0x0000000800000000,
+ PERIODIC_ADVERTISING_ADI_SUPPORT = 0x0000001000000000,
+ CONNECTION_SUBRATING = 0x0000002000000000,
+ CONNECTION_SUBRATING_HOST_SUPPORT = 0x0000004000000000,
+ CHANNEL_CLASSIFICATION = 0x0000008000000000,
+
+ // Byte 5
+ ADVERTISING_CODING_SELECTION = 0x0000010000000000,
+ ADVERTISING_CODING_SELECTION_HOST_SUPPORT = 0x0000020000000000,
+ DECISION_BASED_ADVERTISING_FILTERING = 0x0000040000000000,
+ PERIODIC_ADVERTISING_WITH_RESPONSES_ADVERTISER = 0x0000080000000000,
+ PERIODIC_ADVERTISING_WITH_RESPONSES_SCANNER = 0x0000100000000000,
+ UNSEGMENTED_FRAMED_MODE = 0x0000200000000000,
+ CHANNEL_SOUNDING = 0x0000400000000000,
+ CHANNEL_SOUNDING_HOST_SUPPORT = 0x0000800000000000,
}
-packet LeReadLocalSupportedFeatures : Command (op_code = LE_READ_LOCAL_SUPPORTED_FEATURES) {
+packet LeReadLocalSupportedFeaturesPage0 : Command (op_code = LE_READ_LOCAL_SUPPORTED_FEATURES_PAGE_0) {
}
-packet LeReadLocalSupportedFeaturesComplete : CommandComplete (command_op_code = LE_READ_LOCAL_SUPPORTED_FEATURES) {
+packet LeReadLocalSupportedFeaturesPage0Complete : CommandComplete (command_op_code = LE_READ_LOCAL_SUPPORTED_FEATURES_PAGE_0) {
status : ErrorCode,
le_features : 64,
}
+packet LeReadAllLocalSupportedFeatures : Command (op_code = LE_READ_ALL_LOCAL_SUPPORTED_FEATURES) {
+}
+
+packet LeReadAllLocalSupportedFeaturesComplete : CommandComplete (command_op_code = LE_READ_ALL_LOCAL_SUPPORTED_FEATURES) {
+ status : ErrorCode,
+ max_page : 8,
+ le_features : 8[248],
+}
+
packet LeSetRandomAddress : Command (op_code = LE_SET_RANDOM_ADDRESS) {
random_address : Address,
}
@@ -3268,7 +3374,9 @@ packet LeSetScanEnableComplete : CommandComplete (command_op_code = LE_SET_SCAN_
enum InitiatorFilterPolicy : 8 {
USE_PEER_ADDRESS = 0x00,
- USE_FILTER_ACCEPT_LIST = 0x01,
+ USE_FILTER_ACCEPT_LIST_WITH_PEER_ADDRESS = 0x01,
+ USE_DECISION_PDUS = 0x02,
+ USE_FILTER_ACCEPT_LIST_WITH_DECISION_PDUS = 0x03,
}
packet LeCreateConnection : Command (op_code = LE_CREATE_CONNECTION) {
@@ -3375,12 +3483,37 @@ packet LeReadChannelMapComplete : CommandComplete (command_op_code = LE_READ_CHA
channel_map : 8[5],
}
-packet LeReadRemoteFeatures : Command (op_code = LE_READ_REMOTE_FEATURES) {
+packet LeReadRemoteFeaturesPage0 : Command (op_code = LE_READ_REMOTE_FEATURES_PAGE_0) {
connection_handle : 12,
_reserved_ : 4,
}
-packet LeReadRemoteFeaturesStatus : CommandStatus (command_op_code = LE_READ_REMOTE_FEATURES) {
+packet LeReadRemoteFeaturesPage0Status : CommandStatus (command_op_code = LE_READ_REMOTE_FEATURES_PAGE_0) {
+}
+
+packet LeReadRemoteFeaturesPage0Complete : LeMetaEvent (subevent_code = LE_READ_REMOTE_FEATURES_PAGE_0_COMPLETE) {
+ status : ErrorCode,
+ connection_handle : 12,
+ _reserved_ : 4,
+ le_features : 64,
+}
+
+packet LeReadAllRemoteFeatures : Command (op_code = LE_READ_ALL_REMOTE_FEATURES) {
+ connection_handle : 12,
+ _reserved_ : 4,
+ pages_requested : 8,
+}
+
+packet LeReadAllRemoteFeaturesStatus : CommandStatus (command_op_code = LE_READ_ALL_REMOTE_FEATURES) {
+}
+
+packet LeReadAllRemoteFeaturesComplete : LeMetaEvent (subevent_code = LE_READ_ALL_REMOTE_FEATURES_COMPLETE) {
+ status : ErrorCode,
+ connection_handle : 12,
+ _reserved_ : 4,
+ max_remote_page : 8,
+ max_valid_page : 8,
+ le_features : 8[248],
}
packet LeEncrypt : Command (op_code = LE_ENCRYPT) {
@@ -3743,6 +3876,20 @@ enum LegacyAdvertisingEventProperties : 4 {
ADV_NONCONN_IND = 0,
}
+struct AdvertisingEventProperties {
+ connectable : 1,
+ scannable : 1,
+ directed : 1,
+ high_duty_cycle : 1,
+ legacy : 1,
+ anonymous : 1,
+ include_tx_power : 1,
+ decision : 1,
+ include_adva : 1,
+ include_adi : 1,
+ _reserved_ : 6,
+}
+
enum PrimaryPhyType : 8 {
LE_1M = 0x01,
LE_CODED = 0x03,
@@ -3755,11 +3902,17 @@ enum SecondaryPhyType : 8 {
LE_CODED = 0x03,
}
-packet LeSetExtendedAdvertisingParametersLegacy : Command (op_code = LE_SET_EXTENDED_ADVERTISING_PARAMETERS) {
+enum AdvertisingPhyOptions : 8 {
+ NO_PREFERENCE = 0x00,
+ S2_CODING_PREFERRED = 0x01,
+ S8_CODING_PREFERRED = 0x02,
+ S2_CODING_REQUIRED = 0x03,
+ S8_CODING_REQUIRED = 0x04,
+}
+
+packet LeSetExtendedAdvertisingParametersV1 : Command (op_code = LE_SET_EXTENDED_ADVERTISING_PARAMETERS_V1) {
advertising_handle : 8,
- legacy_advertising_event_properties : LegacyAdvertisingEventProperties,
- _fixed_ = 0x1 : 1, // legacy bit set
- _reserved_ : 11, // advertising_event_properties reserved bits
+ advertising_event_properties : AdvertisingEventProperties,
primary_advertising_interval_min : 24, // 0x20 - 0xFFFFFF N * 0.625 ms
primary_advertising_interval_max : 24, // 0x20 - 0xFFFFFF N * 0.625 ms
primary_advertising_channel_map : 3, // bit 0 - Channel 37, bit 1 - 38, bit 2 - 39
@@ -3770,30 +3923,24 @@ packet LeSetExtendedAdvertisingParametersLegacy : Command (op_code = LE_SET_EXTE
advertising_filter_policy : AdvertisingFilterPolicy,
_reserved_ : 6,
advertising_tx_power : 8, // -127 to +20, 0x7F - no preference
- _fixed_ = 0x1 : 8, // PrimaryPhyType LE_1M
- _reserved_ : 8, // secondary_advertising_max_skip
- _fixed_ = 0x1 : 8, // secondary_advertising_phy LE_1M
+ primary_advertising_phy : PrimaryPhyType,
+ secondary_advertising_max_skip : 8, // 1 to 255, 0x00 - AUX_ADV_IND sent before next advertising event
+ secondary_advertising_phy : SecondaryPhyType,
advertising_sid : 8, // SID subfield from the ADI field of the PDU
scan_request_notification_enable : Enable,
}
-test LeSetExtendedAdvertisingParametersLegacy {
- "\x36\x20\x19\x00\x13\x00\x90\x01\x00\xc2\x01\x00\x07\x01\x00\x00\x00\x00\x00\x00\x00\x00\xf9\x01\x00\x01\x01\x00",
- "\x36\x20\x19\x01\x13\x00\x90\x01\x00\xc2\x01\x00\x07\x01\x00\x00\x00\x00\x00\x00\x00\x00\xf9\x01\x00\x01\x01\x00",
+packet LeSetExtendedAdvertisingParametersV1Complete : CommandComplete (command_op_code = LE_SET_EXTENDED_ADVERTISING_PARAMETERS_V1) {
+ status : ErrorCode,
+ selected_tx_power : 8, // -127 to +20
}
-struct AdvertisingEventProperties {
- connectable : 1,
- scannable : 1,
- directed : 1,
- high_duty_cycle : 1,
- legacy : 1,
- anonymous : 1,
- tx_power : 1,
- _reserved_ : 9,
+test LeSetExtendedAdvertisingParametersV1 {
+ "\x36\x20\x19\x00\x13\x00\x90\x01\x00\xc2\x01\x00\x07\x01\x00\x00\x00\x00\x00\x00\x00\x00\xf9\x01\x00\x01\x01\x00",
+ "\x36\x20\x19\x01\x13\x00\x90\x01\x00\xc2\x01\x00\x07\x01\x00\x00\x00\x00\x00\x00\x00\x00\xf9\x01\x00\x01\x01\x00",
}
-packet LeSetExtendedAdvertisingParameters : Command (op_code = LE_SET_EXTENDED_ADVERTISING_PARAMETERS) {
+packet LeSetExtendedAdvertisingParametersV2 : Command (op_code = LE_SET_EXTENDED_ADVERTISING_PARAMETERS_V2) {
advertising_handle : 8,
advertising_event_properties : AdvertisingEventProperties,
primary_advertising_interval_min : 24, // 0x20 - 0xFFFFFF N * 0.625 ms
@@ -3811,9 +3958,11 @@ packet LeSetExtendedAdvertisingParameters : Command (op_code = LE_SET_EXTENDED_A
secondary_advertising_phy : SecondaryPhyType,
advertising_sid : 8, // SID subfield from the ADI field of the PDU
scan_request_notification_enable : Enable,
+ primary_advertising_phy_options : AdvertisingPhyOptions,
+ secondary_advertising_phy_options : AdvertisingPhyOptions,
}
-packet LeSetExtendedAdvertisingParametersComplete : CommandComplete (command_op_code = LE_SET_EXTENDED_ADVERTISING_PARAMETERS) {
+packet LeSetExtendedAdvertisingParametersV2Complete : CommandComplete (command_op_code = LE_SET_EXTENDED_ADVERTISING_PARAMETERS_V2) {
status : ErrorCode,
selected_tx_power : 8, // -127 to +20
}
@@ -3951,7 +4100,7 @@ packet LeClearAdvertisingSetsComplete : CommandComplete (command_op_code = LE_CL
status : ErrorCode,
}
-packet LeSetPeriodicAdvertisingParameters : Command (op_code = LE_SET_PERIODIC_ADVERTISING_PARAMETERS) {
+packet LeSetPeriodicAdvertisingParametersV1 : Command (op_code = LE_SET_PERIODIC_ADVERTISING_PARAMETERS_V1) {
advertising_handle : 8,
periodic_advertising_interval_min : 16, // 0x006 to 0xFFFF (7.5 ms to 82s)
periodic_advertising_interval_max : 16, // 0x006 to 0xFFFF (7.5 ms to 82s)
@@ -3960,7 +4109,26 @@ packet LeSetPeriodicAdvertisingParameters : Command (op_code = LE_SET_PERIODIC_A
_reserved_ : 9,
}
-packet LeSetPeriodicAdvertisingParametersComplete : CommandComplete (command_op_code = LE_SET_PERIODIC_ADVERTISING_PARAMETERS) {
+packet LeSetPeriodicAdvertisingParametersV1Complete : CommandComplete (command_op_code = LE_SET_PERIODIC_ADVERTISING_PARAMETERS_V1) {
+ status : ErrorCode,
+}
+
+packet LeSetPeriodicAdvertisingParametersV2 : Command (op_code = LE_SET_PERIODIC_ADVERTISING_PARAMETERS_V2) {
+ advertising_handle : 8,
+ periodic_advertising_interval_min : 16, // 0x006 to 0xFFFF (7.5 ms to 82s)
+ periodic_advertising_interval_max : 16, // 0x006 to 0xFFFF (7.5 ms to 82s)
+ _reserved_ : 6,
+ include_tx_power : 1,
+ _reserved_ : 9,
+ num_subevents : 8, // 0x00 disabled, 0x01 to 0x80
+ subevent_interval : 8, // 0x06 to 0xFF × 1.25 ms
+ response_slot_delay : 8, // 0x01 to 0xFE × 1.25 ms
+ response_slot_spacing : 8, // 0x02 to 0xFF × 1.25 ms
+ num_response_slots : 8,
+}
+
+packet LeSetPeriodicAdvertisingParametersV2Complete : CommandComplete (command_op_code = LE_SET_PERIODIC_ADVERTISING_PARAMETERS_V2) {
+ advertising_handle : 8,
status : ErrorCode,
}
@@ -4050,7 +4218,7 @@ struct InitiatingPhyParameters {
max_ce_length : 16, // 0.625ms
}
-packet LeExtendedCreateConnection : Command (op_code = LE_EXTENDED_CREATE_CONNECTION) {
+packet LeExtendedCreateConnectionV1 : Command (op_code = LE_EXTENDED_CREATE_CONNECTION_V1) {
initiator_filter_policy : InitiatorFilterPolicy,
own_address_type : OwnAddressType,
peer_address_type : PeerAddressType,
@@ -4063,7 +4231,21 @@ test LeExtendedCreateConnection {
"\x43\x20\x2a\x01\x01\x00\x00\x00\x00\x00\x00\x00\x03\x00\x08\x30\x00\x18\x00\x28\x00\x00\x00\xf4\x01\x00\x00\x00\x00\x00\x08\x30\x00\x18\x00\x28\x00\x00\x00\xf4\x01\x00\x00\x00\x00",
}
-packet LeExtendedCreateConnectionStatus : CommandStatus (command_op_code = LE_EXTENDED_CREATE_CONNECTION) {
+packet LeExtendedCreateConnectionV1Status : CommandStatus (command_op_code = LE_EXTENDED_CREATE_CONNECTION_V1) {
+}
+
+packet LeExtendedCreateConnectionV2 : Command (op_code = LE_EXTENDED_CREATE_CONNECTION_V2) {
+ advertising_handle : 8,
+ subevent : 8,
+ initiator_filter_policy : InitiatorFilterPolicy,
+ own_address_type : OwnAddressType,
+ peer_address_type : PeerAddressType,
+ peer_address : Address,
+ initiating_phys : 8,
+ initiating_phy_parameters : InitiatingPhyParameters[],
+}
+
+packet LeExtendedCreateConnectionV2Status : CommandStatus (command_op_code = LE_EXTENDED_CREATE_CONNECTION_V2) {
}
enum PeriodicSyncCteType : 8 {
@@ -4546,12 +4728,12 @@ enum LeHostFeatureBits : 8 {
CONNECTION_SUBRATING_HOST_SUPPORT = 38,
}
-packet LeSetHostFeature : Command (op_code = LE_SET_HOST_FEATURE) {
+packet LeSetHostFeatureV1 : Command (op_code = LE_SET_HOST_FEATURE_V1) {
bit_number : LeHostFeatureBits,
bit_value: Enable,
}
-packet LeSetHostFeatureComplete : CommandComplete (command_op_code = LE_SET_HOST_FEATURE) {
+packet LeSetHostFeatureV1Complete : CommandComplete (command_op_code = LE_SET_HOST_FEATURE_V1) {
status : ErrorCode,
}
@@ -4689,6 +4871,501 @@ packet LeSubrateRequest : Command (op_code = LE_SUBRATE_REQUEST) {
packet LeSubrateRequestStatus : CommandStatus (command_op_code = LE_SUBRATE_REQUEST) {
}
+packet LeCsReadLocalSupportedCapabilities : Command (op_code = LE_CS_READ_LOCAL_SUPPORTED_CAPABILITIES) {
+}
+
+struct CsRolesSupported {
+ initiator : 1,
+ reflector : 1,
+ _reserved_ : 6,
+}
+
+struct CsModesSupported {
+ mode_3 : 1,
+ _reserved_ : 7,
+}
+
+struct CsRttCapability {
+ rtt_aa_only_n : 1,
+ rtt_sounding_n : 1,
+ rtt_random_payload_n : 1,
+ _reserved_ : 5,
+}
+
+struct CsNadmSoundingCapability {
+ normalized_attack_detector_metric : 1,
+ _reserved_ : 15,
+}
+
+struct CsNadmRandomCapability {
+ normalized_attack_detector_metric : 1,
+ _reserved_ : 15,
+}
+
+struct CsSyncPhysSupported {
+ le_2m_phy : 1,
+ le_2m_2bt_phy : 1,
+ _reserved_ : 6,
+}
+
+struct CsSubfeaturesSupported {
+ companion_signal : 1,
+ frequency_actuation_error : 1,
+ channel_selection_algorithm : 1,
+ phase_based_ranging : 1,
+ _reserved_ : 12,
+}
+
+struct CsTIp1TimesSupported {
+ support_10_microsecond : 1,
+ support_20_microsecond : 1,
+ support_30_microsecond : 1,
+ support_40_microsecond : 1,
+ support_50_microsecond : 1,
+ support_60_microsecond : 1,
+ support_80_microsecond : 1,
+ _reserved_ : 9,
+}
+
+struct CsTIp2TimesSupported {
+ support_10_microsecond : 1,
+ support_20_microsecond : 1,
+ support_30_microsecond : 1,
+ support_40_microsecond : 1,
+ support_50_microsecond : 1,
+ support_60_microsecond : 1,
+ support_80_microsecond : 1,
+ _reserved_ : 9,
+}
+
+struct CsTFcsTimesSupported {
+ support_15_microsecond : 1,
+ support_20_microsecond : 1,
+ support_30_microsecond : 1,
+ support_40_microsecond : 1,
+ support_50_microsecond : 1,
+ support_60_microsecond : 1,
+ support_80_microsecond : 1,
+ support_100_microsecond : 1,
+ support_120_microsecond : 1,
+ _reserved_ : 7,
+}
+
+struct CsTPmTimesSupported {
+ support_10_microsecond : 1,
+ support_20_microsecond : 1,
+ _reserved_ : 14,
+}
+
+struct CsTxSnrCapability {
+ support_18db : 1,
+ support_21db : 1,
+ support_24db : 1,
+ support_27db : 1,
+ support_30db : 1,
+ _reserved_ : 3,
+}
+
+packet LeCsReadLocalSupportedCapabilitiesComplete : CommandComplete (command_op_code = LE_CS_READ_LOCAL_SUPPORTED_CAPABILITIES) {
+ status : ErrorCode,
+ num_config_supported : 8,
+ max_consecutive_procedures_supported : 16,
+ num_antennas_supported : 8,
+ max_antenna_paths_supported : 8,
+ roles_supported : CsRolesSupported,
+ modes_supported : CsModesSupported,
+ rtt_capability : CsRttCapability,
+ rtt_aa_only_n : 8,
+ rtt_sounding_n : 8,
+ rtt_random_payload_n : 8,
+ nadm_sounding_capability : CsNadmSoundingCapability,
+ nadm_random_capability : CsNadmRandomCapability,
+ cs_sync_phys_supported : CsSyncPhysSupported,
+ subfeatures_supported : CsSubfeaturesSupported,
+ t_ip1_times_supported : CsTIp1TimesSupported,
+ t_ip2_times_supported : CsTIp2TimesSupported,
+ t_fcs_times_supported : CsTFcsTimesSupported,
+ t_pm_times_supported : CsTPmTimesSupported,
+ t_sw_time_supported : 8,
+ tx_snr_capability : CsTxSnrCapability,
+}
+
+packet LeCsReadRemoteSupportedCapabilities : Command (op_code = LE_CS_READ_REMOTE_SUPPORTED_CAPABILITIES) {
+ connection_handle: 12,
+ _reserved_ : 4,
+}
+
+packet LeCsReadRemoteSupportedCapabilitiesStatus : CommandStatus (command_op_code = LE_CS_READ_REMOTE_SUPPORTED_CAPABILITIES) {
+}
+
+packet LeCsReadRemoteSupportedCapabilitiesComplete : LeMetaEvent (subevent_code = LE_CS_READ_REMOTE_SUPPORTED_CAPABILITIES_COMPLETE) {
+ status : ErrorCode,
+ connection_handle : 12,
+ _reserved_ : 4,
+ num_config_supported : 8,
+ max_consecutive_procedures_supported : 16,
+ num_antennas_supported : 8,
+ max_antenna_paths_supported : 8,
+ roles_supported : CsRolesSupported,
+ modes_supported : CsModesSupported,
+ rtt_capability : CsRttCapability,
+ rtt_aa_only_n : 8,
+ rtt_sounding_n : 8,
+ rtt_random_payload_n : 8,
+ nadm_sounding_capability : CsNadmSoundingCapability,
+ nadm_random_capability : CsNadmRandomCapability,
+ cs_sync_phys_supported : CsSyncPhysSupported,
+ subfeatures_supported : CsSubfeaturesSupported,
+ t_ip1_times_supported : CsTIp1TimesSupported,
+ t_ip2_times_supported : CsTIp2TimesSupported,
+ t_fcs_times_supported : CsTFcsTimesSupported,
+ t_pm_times_supported : CsTPmTimesSupported,
+ t_sw_time_supported : 8,
+ tx_snr_capability : CsTxSnrCapability,
+}
+
+packet LeCsWriteCachedRemoteSupportedCapabilities : Command (op_code = LE_CS_WRITE_CACHED_REMOTE_SUPPORTED_CAPABILITIES) {
+ connection_handle: 12,
+ _reserved_ : 4,
+ num_config_supported : 8,
+ max_consecutive_procedures_supported : 16,
+ num_antennas_supported : 8,
+ max_antenna_paths_supported : 8,
+ roles_supported : CsRolesSupported,
+ modes_supported : CsModesSupported,
+ rtt_capability : CsRttCapability,
+ rtt_aa_only_n : 8,
+ rtt_sounding_n : 8,
+ rtt_random_payload_n : 8,
+ nadm_sounding_capability : CsNadmSoundingCapability,
+ nadm_random_capability : CsNadmRandomCapability,
+ cs_sync_phys_supported : CsSyncPhysSupported,
+ subfeatures_supported : CsSubfeaturesSupported,
+ t_ip1_times_supported : CsTIp1TimesSupported,
+ t_ip2_times_supported : CsTIp2TimesSupported,
+ t_fcs_times_supported : CsTFcsTimesSupported,
+ t_pm_times_supported : CsTPmTimesSupported,
+ t_sw_time_supported : 8,
+ tx_snr_capability : CsTxSnrCapability,
+}
+
+packet LeCsWriteCachedRemoteSupportedCapabilitiesComplete : CommandComplete (command_op_code = LE_CS_WRITE_CACHED_REMOTE_SUPPORTED_CAPABILITIES) {
+ status : ErrorCode,
+ connection_handle: 12,
+ _reserved_ : 4,
+}
+
+packet LeCsSecurityEnable : Command (op_code = LE_CS_SECURITY_ENABLE) {
+ connection_handle: 12,
+ _reserved_ : 4,
+}
+
+packet LeCsSecurityEnableStatus : CommandStatus (command_op_code = LE_CS_SECURITY_ENABLE) {
+}
+
+packet LeCsSecurityEnableComplete : LeMetaEvent (subevent_code = LE_CS_SECURITY_ENABLE_COMPLETE) {
+ status : ErrorCode,
+ connection_handle : 12,
+ _reserved_ : 4,
+}
+
+struct CsRoleEnable {
+ initiator : 1,
+ reflector : 1,
+ _reserved_ : 6,
+}
+
+enum CsSyncAntennaSelection : 8 {
+ ANTENNA_1 = 0x01,
+ ANTENNA_2 = 0x02,
+ ANTENNA_3 = 0x03,
+ ANTENNA_4 = 0x04,
+ ANTENNAS_IN_ORDER = 0xFE,
+ NO_RECOMMENDATION = 0xFF,
+}
+
+packet LeCsSetDefaultSettings : Command (op_code = LE_CS_SET_DEFAULT_SETTINGS) {
+ connection_handle: 12,
+ _reserved_ : 4,
+ role_enable : CsRoleEnable,
+ cs_sync_antenna_selection : CsSyncAntennaSelection,
+ max_tx_power : 8,
+}
+
+packet LeCsSetDefaultSettingsComplete : CommandComplete (command_op_code = LE_CS_SET_DEFAULT_SETTINGS) {
+ status : ErrorCode,
+ connection_handle: 12,
+ _reserved_ : 4,
+}
+
+packet LeCsReadRemoteFaeTable : Command (op_code = LE_CS_READ_REMOTE_FAE_TABLE) {
+ connection_handle: 12,
+ _reserved_ : 4,
+}
+
+packet LeCsReadRemoteFaeTableStatus : CommandStatus (command_op_code = LE_CS_READ_REMOTE_FAE_TABLE) {
+}
+
+packet LeCsReadRemoteFaeTableComplete : LeMetaEvent (subevent_code = LE_CS_READ_REMOTE_FAE_TABLE_COMPLETE) {
+ status : ErrorCode,
+ connection_handle : 12,
+ _reserved_ : 4,
+ remote_fae_table : 8[72],
+}
+
+packet LeCsWriteCachedRemoteFaeTable : Command (op_code = LE_CS_WRITE_CACHED_REMOTE_FAE_TABLE) {
+ connection_handle: 12,
+ _reserved_ : 4,
+ remote_fae_table : 8[72],
+}
+
+packet LeCsWriteCachedRemoteFaeTableComplete : CommandComplete (command_op_code = LE_CS_WRITE_CACHED_REMOTE_FAE_TABLE) {
+ status : ErrorCode,
+ connection_handle: 12,
+ _reserved_ : 4,
+}
+
+enum CsCreateContext: 8 {
+ LOCAL_CONTROLLER_ONLY = 0x00,
+ BOTH_LOCAL_AND_REMOTE_CONTROLLER = 0x01,
+}
+
+enum CsMainModeType: 8 {
+ MODE_1 = 0x01,
+ MODE_2 = 0x02,
+ MODE_3 = 0x03,
+}
+
+enum CsSubModeType: 8 {
+ MODE_1 = 0x01,
+ MODE_2 = 0x02,
+ MODE_3 = 0x03,
+ UNUSED = 0xff,
+}
+
+enum CsRole : 8 {
+ INITIATOR = 0x00,
+ REFLECTOR = 0x01,
+}
+
+enum CsRttType : 8 {
+ RTT_AA_ONLY = 0x00,
+ RTT_WITH_32_BIT_SOUNDING_SEQUENCE = 0x01,
+ RTT_WITH_96_BIT_SOUNDING_SEQUENCE = 0x02,
+ RTT_WITH_32_BIT_RANDOM_SEQUENCE = 0x03,
+ RTT_WITH_64_BIT_RANDOM_SEQUENCE = 0x04,
+ RTT_WITH_96_BIT_RANDOM_SEQUENCE = 0x05,
+ RTT_WITH_128_BIT_RANDOM_SEQUENCE = 0x06,
+}
+
+enum CsSyncPhy : 8 {
+ LE_1M_PHY = 0x01,
+ LE_2M_PHY = 0x02,
+ LE_2M_2BT_PHY = 0x03,
+}
+
+enum CsChannelSelectionType : 8 {
+ TYPE_3B = 0x00,
+ TYPE_3C = 0x01,
+}
+
+enum CsCh3cShape : 8 {
+ HAT_SHAPE = 0x00,
+ X_SHAPE = 0x01,
+}
+
+enum CsAction : 8 {
+ CONFIG_REMOVED = 0x00,
+ CONFIG_CREATED = 0x01,
+}
+
+packet LeCsConfigComplete : LeMetaEvent (subevent_code = LE_CS_CONFIG_COMPLETE) {
+ status : ErrorCode,
+ connection_handle : 12,
+ _reserved_ : 4,
+ config_id : 8,
+ action : CsAction,
+ main_mode_type : CsMainModeType,
+ sub_mode_type : CsSubModeType,
+ min_main_mode_steps : 8,
+ max_main_mode_steps : 8,
+ main_mode_repetition : 8,
+ mode_0_steps : 8,
+ role : CsRole,
+ rtt_type : CsRttType,
+ cs_sync_phy : CsSyncPhy,
+ channel_map : 8[10],
+ channel_map_repetition : 8,
+ channel_selection_type : CsChannelSelectionType,
+ ch3c_shape : CsCh3cShape,
+ ch3c_jump : 8,
+ _reserved_ : 8,
+ t_ip1_time : 8,
+ t_ip2_time : 8,
+ t_fcs_time : 8,
+ t_pm_time : 8,
+}
+
+packet LeCsCreateConfig : Command (op_code = LE_CS_CREATE_CONFIG) {
+ connection_handle: 12,
+ _reserved_ : 4,
+ config_id : 8,
+ create_context : CsCreateContext,
+ main_mode_type : CsMainModeType,
+ sub_mode_type : CsSubModeType,
+ min_main_mode_steps : 8,
+ max_main_mode_steps : 8,
+ main_mode_repetition : 8,
+ mode_0_steps : 8,
+ role : CsRole,
+ rtt_type : CsRttType,
+ cs_sync_phy : CsSyncPhy,
+ channel_map : 8[10],
+ channel_map_repetition : 8,
+ channel_selection_type : CsChannelSelectionType,
+ ch3c_shape : CsCh3cShape,
+ ch3c_jump : 8,
+ _reserved_ : 8,
+}
+
+packet LeCsCreateConfigStatus : CommandStatus (command_op_code = LE_CS_CREATE_CONFIG) {
+}
+
+
+packet LeCsRemoveConfig : Command (op_code = LE_CS_REMOVE_CONFIG) {
+ connection_handle: 12,
+ _reserved_ : 4,
+ config_id : 8,
+}
+
+packet LeCsRemoveConfigStatus : CommandStatus (command_op_code = LE_CS_REMOVE_CONFIG) {
+}
+
+packet LeCsSetChannelClassification : Command (op_code = LE_CS_SET_CHANNEL_CLASSIFICATION) {
+ channel_classification : 8[10],
+}
+
+packet LeCsSetChannelClassificationComplete : CommandComplete (command_op_code = LE_CS_SET_CHANNEL_CLASSIFICATION) {
+}
+
+enum CsPhy : 8 {
+ LE_1M_PHY = 0x01,
+ LE_2M_PHY = 0x02,
+ LE_CODED_PHY_S2 = 0x03,
+ LE_CODED_PHY_S8 = 0x04,
+}
+
+struct CsPreferredPeerAntenna {
+ use_first_ordered_antenna_element : 1,
+ use_second_ordered_antenna_element : 1,
+ use_third_ordered_antenna_element : 1,
+ use_fourth_ordered_antenna_element : 1,
+ _reserved_ : 4,
+}
+
+enum CsSnrControl : 8 {
+ ADJUST_18_DB = 0x00,
+ ADJUST_21_DB = 0x01,
+ ADJUST_24_DB = 0x02,
+ ADJUST_27_DB = 0x03,
+ ADJUST_30_DB = 0x04,
+ NOT_APPLIED = 0xFF,
+}
+
+packet LeCsSetProcedureParameters : Command (op_code = LE_CS_SET_PROCEDURE_PARAMETERS) {
+ connection_handle: 12,
+ _reserved_ : 4,
+ config_id : 8,
+ max_procedure_len : 16,
+ min_procedure_interval : 16,
+ max_procedure_interval : 16,
+ max_procedure_count : 16,
+ min_subevent_len : 24,
+ max_subevent_len : 24,
+ tone_antenna_config_selection : 8,
+ phy : CsPhy,
+ tx_power_delta : 8,
+ preferred_peer_antenna : CsPreferredPeerAntenna,
+ snr_control_initiator: CsSnrControl,
+ snr_control_reflector: CsSnrControl,
+}
+
+packet LeCsSetProcedureParametersComplete : CommandComplete (command_op_code = LE_CS_SET_PROCEDURE_PARAMETERS) {
+ status : ErrorCode,
+ connection_handle: 12,
+ _reserved_ : 4,
+}
+
+packet LeCsProcedureEnable : Command (op_code = LE_CS_PROCEDURE_ENABLE) {
+ connection_handle: 12,
+ _reserved_ : 4,
+ config_id : 8,
+ procedure_enable : Enable,
+}
+
+packet LeCsProcedureEnableStatus : CommandStatus (command_op_code = LE_CS_PROCEDURE_ENABLE) {
+}
+
+packet LeCsProcedureEnableComplete : LeMetaEvent (subevent_code = LE_CS_PROCEDURE_ENABLE_COMPLETE) {
+ status : ErrorCode,
+ connection_handle : 12,
+ _reserved_ : 4,
+ config_id : 8,
+ state : Enable,
+ tone_antenna_config_selection : 8,
+ selected_tx_power : 8,
+ subevent_len : 24,
+ subevents_per_event : 8,
+ subevent_interval : 16,
+ event_interval : 16,
+ procedure_interval : 16,
+ procedure_count : 16,
+ max_procedure_len : 16,
+}
+
+packet LeCsTest : Command (op_code = LE_CS_TEST) {
+ main_mode_type : CsMainModeType,
+ sub_mode_type : CsSubModeType,
+ main_mode_repetition : 8,
+ mode_0_steps : 8,
+ role : CsRole,
+ rtt_type : CsRttType,
+ cs_sync_phy : CsSyncPhy,
+ cs_sync_antenna_selection : 8,
+ subevent_len : 24,
+ subevent_interval : 16,
+ max_num_subevents : 8,
+ transmit_power_level : 8,
+ t_ip1_time : 8,
+ t_ip2_time : 8,
+ t_fcs_time : 8,
+ t_pm_time : 8,
+ t_sw_time : 8,
+ tone_antenna_config_selection : 8,
+ _reserved_ : 8,
+ snr_control_initiator: CsSnrControl,
+ snr_control_reflector: CsSnrControl,
+ drbg_nonce : 16,
+ channel_map_repetition : 8,
+ override_config : 16,
+ _size_(override_parameters_data) : 8,
+ override_parameters_data : 8[],
+}
+
+packet LeCsTestComplete : CommandComplete (command_op_code = LE_CS_TEST) {
+ status : ErrorCode,
+}
+
+packet LeCsTestEnd : Command (op_code = LE_CS_TEST_END) {
+}
+
+packet LeCsTestEndStatus : CommandStatus (command_op_code = LE_CS_TEST_END) {
+}
+
+packet LeCsTestEndComplete : LeMetaEvent (subevent_code = LE_CS_TEST_END_COMPLETE) {
+ status : ErrorCode,
+}
+
// HCI Event Packets
packet InquiryComplete : Event (event_code = INQUIRY_COMPLETE) {
@@ -5125,11 +5802,6 @@ packet RemoteHostSupportedFeaturesNotification : Event (event_code = REMOTE_HOST
host_supported_features : 64,
}
-packet LeMetaEvent : Event (event_code = LE_META_EVENT) {
- subevent_code : SubeventCode,
- _body_,
-}
-
packet NumberOfCompletedDataBlocks : Event (event_code = NUMBER_OF_COMPLETED_DATA_BLOCKS) {
total_num_data_blocks : 16,
_payload_, // placeholder (unimplemented)
@@ -5141,7 +5813,7 @@ packet AuthenticatedPayloadTimeoutExpired : Event (event_code = AUTHENTICATED_PA
}
// LE Events
-packet LeConnectionComplete : LeMetaEvent (subevent_code = CONNECTION_COMPLETE) {
+packet LeConnectionComplete : LeMetaEvent (subevent_code = LE_CONNECTION_COMPLETE) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
@@ -5171,12 +5843,12 @@ struct LeAdvertisingResponse {
rssi : 8,
}
-packet LeAdvertisingReport : LeMetaEvent (subevent_code = ADVERTISING_REPORT) {
+packet LeAdvertisingReport : LeMetaEvent (subevent_code = LE_ADVERTISING_REPORT) {
_count_(responses) : 8,
responses : LeAdvertisingResponse[],
}
-packet LeConnectionUpdateComplete : LeMetaEvent (subevent_code = CONNECTION_UPDATE_COMPLETE) {
+packet LeConnectionUpdateComplete : LeMetaEvent (subevent_code = LE_CONNECTION_UPDATE_COMPLETE) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
@@ -5185,21 +5857,14 @@ packet LeConnectionUpdateComplete : LeMetaEvent (subevent_code = CONNECTION_UPDA
supervision_timeout : 16, // 0x000A to 0x0C80 (100ms to 32s)
}
-packet LeReadRemoteFeaturesComplete : LeMetaEvent (subevent_code = READ_REMOTE_FEATURES_COMPLETE) {
- status : ErrorCode,
- connection_handle : 12,
- _reserved_ : 4,
- le_features : 64,
-}
-
-packet LeLongTermKeyRequest : LeMetaEvent (subevent_code = LONG_TERM_KEY_REQUEST) {
+packet LeLongTermKeyRequest : LeMetaEvent (subevent_code = LE_LONG_TERM_KEY_REQUEST) {
connection_handle : 12,
_reserved_ : 4,
random_number : 8[8],
encrypted_diversifier : 16,
}
-packet LeRemoteConnectionParameterRequest : LeMetaEvent (subevent_code = REMOTE_CONNECTION_PARAMETER_REQUEST) {
+packet LeRemoteConnectionParameterRequest : LeMetaEvent (subevent_code = LE_REMOTE_CONNECTION_PARAMETER_REQUEST) {
connection_handle : 12,
_reserved_ : 4,
interval_min : 16, // 0x006 - 0x0C80 (7.5ms - 4s)
@@ -5208,7 +5873,7 @@ packet LeRemoteConnectionParameterRequest : LeMetaEvent (subevent_code = REMOTE_
timeout : 16, // 0x000A to 0x0C80 (100ms to 32s)
}
-packet LeDataLengthChange : LeMetaEvent (subevent_code = DATA_LENGTH_CHANGE) {
+packet LeDataLengthChange : LeMetaEvent (subevent_code = LE_DATA_LENGTH_CHANGE) {
connection_handle : 12,
_reserved_ : 4,
max_tx_octets : 16, // 0x001B - 0x00FB
@@ -5217,18 +5882,18 @@ packet LeDataLengthChange : LeMetaEvent (subevent_code = DATA_LENGTH_CHANGE) {
max_rx_time : 16, // 0x0148 - 0x4290
}
-packet LeReadLocalP256PublicKeyComplete : LeMetaEvent (subevent_code = READ_LOCAL_P256_PUBLIC_KEY_COMPLETE) {
+packet LeReadLocalP256PublicKeyComplete : LeMetaEvent (subevent_code = LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE) {
status : ErrorCode,
key_x_coordinate : 8[32],
key_y_coordinate : 8[32],
}
-packet LeGenerateDhKeyComplete : LeMetaEvent (subevent_code = GENERATE_DHKEY_COMPLETE) {
+packet LeGenerateDhKeyComplete : LeMetaEvent (subevent_code = LE_GENERATE_DHKEY_COMPLETE) {
status : ErrorCode,
dh_key : 8[32],
}
-packet LeEnhancedConnectionComplete : LeMetaEvent (subevent_code = ENHANCED_CONNECTION_COMPLETE) {
+packet LeEnhancedConnectionCompleteV1 : LeMetaEvent (subevent_code = LE_ENHANCED_CONNECTION_COMPLETE_V1) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
@@ -5243,6 +5908,23 @@ packet LeEnhancedConnectionComplete : LeMetaEvent (subevent_code = ENHANCED_CONN
central_clock_accuracy : ClockAccuracy,
}
+packet LeEnhancedConnectionCompleteV2 : LeMetaEvent (subevent_code = LE_ENHANCED_CONNECTION_COMPLETE_V2) {
+ status : ErrorCode,
+ connection_handle : 12,
+ _reserved_ : 4,
+ role : Role,
+ peer_address_type : AddressType,
+ peer_address : Address,
+ local_resolvable_private_address : Address,
+ peer_resolvable_private_address : Address,
+ connection_interval : 16, // 0x006 - 0x0C80 (7.5ms - 4000ms)
+ peripheral_latency : 16,
+ supervision_timeout : 16, // 0x000A to 0x0C80 (100ms to 32s)
+ central_clock_accuracy : ClockAccuracy,
+ advertising_handle : 8,
+ sync_handle : 16,
+}
+
enum DirectAdvertisingAddressType : 8 {
PUBLIC_DEVICE_ADDRESS = 0x00,
RANDOM_DEVICE_ADDRESS = 0x01,
@@ -5269,12 +5951,12 @@ struct LeDirectedAdvertisingResponse {
rssi : 8,
}
-packet LeDirectedAdvertisingReport : LeMetaEvent (subevent_code = DIRECTED_ADVERTISING_REPORT) {
+packet LeDirectedAdvertisingReport : LeMetaEvent (subevent_code = LE_DIRECTED_ADVERTISING_REPORT) {
_count_(responses) : 8,
responses : LeDirectedAdvertisingResponse[],
}
-packet LePhyUpdateComplete : LeMetaEvent (subevent_code = PHY_UPDATE_COMPLETE) {
+packet LePhyUpdateComplete : LeMetaEvent (subevent_code = LE_PHY_UPDATE_COMPLETE) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
@@ -5311,12 +5993,24 @@ struct LeExtendedAdvertisingResponse {
advertising_data: 8[],
}
-packet LeExtendedAdvertisingReport : LeMetaEvent (subevent_code = EXTENDED_ADVERTISING_REPORT) {
+packet LeExtendedAdvertisingReport : LeMetaEvent (subevent_code = LE_EXTENDED_ADVERTISING_REPORT) {
_count_(responses) : 8,
responses : LeExtendedAdvertisingResponse[],
}
-packet LePeriodicAdvertisingSyncEstablished : LeMetaEvent (subevent_code = PERIODIC_ADVERTISING_SYNC_ESTABLISHED) {
+packet LePeriodicAdvertisingSyncEstablishedV1 : LeMetaEvent (subevent_code = LE_PERIODIC_ADVERTISING_SYNC_ESTABLISHED_V1) {
+ status : ErrorCode,
+ sync_handle : 12,
+ _reserved_ : 4,
+ advertising_sid : 8,
+ advertiser_address_type : AddressType,
+ advertiser_address : Address,
+ advertiser_phy : SecondaryPhyType,
+ periodic_advertising_interval : 16,
+ advertiser_clock_accuracy : ClockAccuracy,
+}
+
+packet LePeriodicAdvertisingSyncEstablishedV2 : LeMetaEvent (subevent_code = LE_PERIODIC_ADVERTISING_SYNC_ESTABLISHED_V2) {
status : ErrorCode,
sync_handle : 12,
_reserved_ : 4,
@@ -5326,9 +6020,13 @@ packet LePeriodicAdvertisingSyncEstablished : LeMetaEvent (subevent_code = PERIO
advertiser_phy : SecondaryPhyType,
periodic_advertising_interval : 16,
advertiser_clock_accuracy : ClockAccuracy,
+ num_subevents : 8,
+ subevent_interval : 8,
+ response_slot_delay : 8,
+ response_slot_spacing : 8,
}
-packet LePeriodicAdvertisingReport : LeMetaEvent (subevent_code = PERIODIC_ADVERTISING_REPORT) {
+packet LePeriodicAdvertisingReportV1 : LeMetaEvent (subevent_code = LE_PERIODIC_ADVERTISING_REPORT_V1) {
sync_handle : 12,
_reserved_ : 4,
tx_power : 8,
@@ -5340,15 +6038,29 @@ packet LePeriodicAdvertisingReport : LeMetaEvent (subevent_code = PERIODIC_ADVER
data : 8[],
}
-packet LePeriodicAdvertisingSyncLost : LeMetaEvent (subevent_code = PERIODIC_ADVERTISING_SYNC_LOST) {
+packet LePeriodicAdvertisingReportV2 : LeMetaEvent (subevent_code = LE_PERIODIC_ADVERTISING_REPORT_V2) {
sync_handle : 12,
_reserved_ : 4,
+ tx_power : 8,
+ rssi : 8,
+ cte_type : CteType,
+ periodic_event_counter : 16,
+ subevent : 8,
+ data_status : DataStatus,
+ _reserved_: 6,
+ _size_(data) : 8,
+ data : 8[],
}
-packet LeScanTimeout : LeMetaEvent (subevent_code = SCAN_TIMEOUT) {
+packet LePeriodicAdvertisingSyncLost : LeMetaEvent (subevent_code = LE_PERIODIC_ADVERTISING_SYNC_LOST) {
+ sync_handle : 12,
+ _reserved_ : 4,
}
-packet LeAdvertisingSetTerminated : LeMetaEvent (subevent_code = ADVERTISING_SET_TERMINATED) {
+packet LeScanTimeout : LeMetaEvent (subevent_code = LE_SCAN_TIMEOUT) {
+}
+
+packet LeAdvertisingSetTerminated : LeMetaEvent (subevent_code = LE_ADVERTISING_SET_TERMINATED) {
status : ErrorCode,
advertising_handle : 8,
connection_handle : 12,
@@ -5356,7 +6068,7 @@ packet LeAdvertisingSetTerminated : LeMetaEvent (subevent_code = ADVERTISING_SET
num_completed_extended_advertising_events : 8,
}
-packet LeScanRequestReceived : LeMetaEvent (subevent_code = SCAN_REQUEST_RECEIVED) {
+packet LeScanRequestReceived : LeMetaEvent (subevent_code = LE_SCAN_REQUEST_RECEIVED) {
advertising_handle : 8,
scanner_address_type : AddressType,
scanner_address : Address,
@@ -5367,25 +6079,41 @@ enum ChannelSelectionAlgorithm : 8 {
ALGORITHM_2 = 1,
}
-packet LeChannelSelectionAlgorithm : LeMetaEvent (subevent_code = CHANNEL_SELECTION_ALGORITHM) {
+packet LeChannelSelectionAlgorithm : LeMetaEvent (subevent_code = LE_CHANNEL_SELECTION_ALGORITHM) {
connection_handle : 12,
_reserved_ : 4,
channel_selection_algorithm : ChannelSelectionAlgorithm,
}
-packet LeConnectionlessIqReport : LeMetaEvent (subevent_code = CONNECTIONLESS_IQ_REPORT) {
+packet LeConnectionlessIqReport : LeMetaEvent (subevent_code = LE_CONNECTIONLESS_IQ_REPORT) {
_payload_, // placeholder (unimplemented)
}
-packet LeConnectionIqReport : LeMetaEvent (subevent_code = CONNECTION_IQ_REPORT) {
+packet LeConnectionIqReport : LeMetaEvent (subevent_code = LE_CONNECTION_IQ_REPORT) {
_payload_, // placeholder (unimplemented)
}
-packet LeCteRequestFailed : LeMetaEvent (subevent_code = CTE_REQUEST_FAILED) {
+packet LeCteRequestFailed : LeMetaEvent (subevent_code = LE_CTE_REQUEST_FAILED) {
_payload_, // placeholder (unimplemented)
}
-packet LePeriodicAdvertisingSyncTransferReceived : LeMetaEvent (subevent_code = PERIODIC_ADVERTISING_SYNC_TRANSFER_RECEIVED) {
+packet LePeriodicAdvertisingSyncTransferReceivedV1 : LeMetaEvent (subevent_code = LE_PERIODIC_ADVERTISING_SYNC_TRANSFER_RECEIVED_V1) {
+ status : ErrorCode,
+ connection_handle : 12,
+ _reserved_ : 4,
+ service_data : 16,
+ sync_handle : 12,
+ _reserved_ : 4,
+ advertising_sid : 4,
+ _reserved_ : 4,
+ advertiser_address_type : AddressType,
+ advertiser_address : Address,
+ advertiser_phy : SecondaryPhyType,
+ periodic_advertising_interval : 16,
+ advertiser_clock_accuracy : ClockAccuracy,
+}
+
+packet LePeriodicAdvertisingSyncTransferReceivedV2 : LeMetaEvent (subevent_code = LE_PERIODIC_ADVERTISING_SYNC_TRANSFER_RECEIVED_V2) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
@@ -5399,9 +6127,37 @@ packet LePeriodicAdvertisingSyncTransferReceived : LeMetaEvent (subevent_code =
advertiser_phy : SecondaryPhyType,
periodic_advertising_interval : 16,
advertiser_clock_accuracy : ClockAccuracy,
+ num_subevents : 8,
+ subevent_interval : 8,
+ response_slot_delay : 8,
+ response_slot_spacing : 8,
+}
+
+packet LeCisEstablishedV1 : LeMetaEvent (subevent_code = LE_CIS_ESTABLISHED_V1) {
+ status : ErrorCode,
+ connection_handle : 12,
+ _reserved_ : 4,
+ cig_sync_delay : 24,
+ cis_sync_delay : 24,
+ transport_latency_c_to_p : 24,
+ transport_latency_p_to_c : 24,
+ phy_c_to_p : SecondaryPhyType,
+ phy_p_to_c : SecondaryPhyType,
+ nse : 8,
+ bn_c_to_p : 4,
+ _reserved_ : 4,
+ bn_p_to_c : 4,
+ _reserved_ : 4,
+ ft_c_to_p : 8,
+ ft_p_to_c : 8,
+ max_pdu_c_to_p : 8,
+ _reserved_ : 8,
+ max_pdu_p_to_c : 8,
+ _reserved_ : 8,
+ iso_interval : 16,
}
-packet LeCisEstablished : LeMetaEvent (subevent_code = CIS_ESTABLISHED) {
+packet LeCisEstablishedV2 : LeMetaEvent (subevent_code = LE_CIS_ESTABLISHED_V2) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
@@ -5423,9 +6179,15 @@ packet LeCisEstablished : LeMetaEvent (subevent_code = CIS_ESTABLISHED) {
max_pdu_p_to_c : 8,
_reserved_ : 8,
iso_interval : 16,
+ sub_interval : 24,
+ max_sdu_c_to_p : 16,
+ max_sdu_p_to_c : 16,
+ sdu_interval_c_to_p : 24,
+ sdu_interval_p_to_c : 24,
+ framing : Enable,
}
-packet LeCisRequest : LeMetaEvent (subevent_code = CIS_REQUEST) {
+packet LeCisRequest : LeMetaEvent (subevent_code = LE_CIS_REQUEST) {
acl_connection_handle : 12,
_reserved_ : 4,
cis_connection_handle : 12,
@@ -5434,7 +6196,7 @@ packet LeCisRequest : LeMetaEvent (subevent_code = CIS_REQUEST) {
cis_id : 8,
}
-packet LeCreateBigComplete : LeMetaEvent (subevent_code = CREATE_BIG_COMPLETE) {
+packet LeCreateBigComplete : LeMetaEvent (subevent_code = LE_CREATE_BIG_COMPLETE) {
status : ErrorCode,
big_handle : 8,
big_sync_delay : 24,
@@ -5450,12 +6212,12 @@ packet LeCreateBigComplete : LeMetaEvent (subevent_code = CREATE_BIG_COMPLETE) {
connection_handle : 16[],
}
-packet LeTerminateBigComplete : LeMetaEvent (subevent_code = TERMINATE_BIG_COMPLETE) {
+packet LeTerminateBigComplete : LeMetaEvent (subevent_code = LE_TERMINATE_BIG_COMPLETE) {
big_handle : 8,
reason : ErrorCode,
}
-packet LeBigSyncEstablished : LeMetaEvent (subevent_code = BIG_SYNC_ESTABLISHED) {
+packet LeBigSyncEstablished : LeMetaEvent (subevent_code = LE_BIG_SYNC_ESTABLISHED) {
status : ErrorCode,
big_handle : 8,
transport_latency_big : 24,
@@ -5469,12 +6231,12 @@ packet LeBigSyncEstablished : LeMetaEvent (subevent_code = BIG_SYNC_ESTABLISHED)
connection_handle : 16[],
}
-packet LeBigSyncLost : LeMetaEvent (subevent_code = BIG_SYNC_LOST) {
+packet LeBigSyncLost : LeMetaEvent (subevent_code = LE_BIG_SYNC_LOST) {
big_handle : 8,
reason : ErrorCode,
}
-packet LeRequestPeerScaComplete : LeMetaEvent (subevent_code = REQUEST_PEER_SCA_COMPLETE) {
+packet LeRequestPeerScaComplete : LeMetaEvent (subevent_code = LE_REQUEST_PEER_SCA_COMPLETE) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
@@ -5487,7 +6249,7 @@ enum PathLossZone : 8 {
HIGH = 2,
}
-packet LePathLossThreshold : LeMetaEvent (subevent_code = PATH_LOSS_THRESHOLD) {
+packet LePathLossThreshold : LeMetaEvent (subevent_code = LE_PATH_LOSS_THRESHOLD) {
connection_handle : 12,
_reserved_ : 4,
current_path_loss : 8,
@@ -5500,7 +6262,7 @@ enum ReportingReason : 8 {
READ_COMMAND_COMPLETE = 0x02,
}
-packet LeTransmitPowerReporting : LeMetaEvent (subevent_code = TRANSMIT_POWER_REPORTING) {
+packet LeTransmitPowerReporting : LeMetaEvent (subevent_code = LE_TRANSMIT_POWER_REPORTING) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
@@ -5511,7 +6273,7 @@ packet LeTransmitPowerReporting : LeMetaEvent (subevent_code = TRANSMIT_POWER_RE
delta : 8,
}
-packet LeBigInfoAdvertisingReport : LeMetaEvent (subevent_code = BIG_INFO_ADVERTISING_REPORT) {
+packet LeBigInfoAdvertisingReport : LeMetaEvent (subevent_code = LE_BIG_INFO_ADVERTISING_REPORT) {
sync_handle : 12,
_reserved_ : 4,
num_bis : 8,
diff --git a/tools/rootcanal/py/controller.py b/tools/rootcanal/py/controller.py
index 80e83072b4..cec909d122 100644
--- a/tools/rootcanal/py/controller.py
+++ b/tools/rootcanal/py/controller.py
@@ -260,8 +260,8 @@ class ControllerTest(unittest.IsolatedAsyncioTestCase):
# Load the local supported features to be able to disable tests
# that rely on unsupported features.
- controller.send_cmd(hci.LeReadLocalSupportedFeatures())
- evt = await self.expect_cmd_complete(hci.LeReadLocalSupportedFeaturesComplete)
+ controller.send_cmd(hci.LeReadLocalSupportedFeaturesPage0())
+ evt = await self.expect_cmd_complete(hci.LeReadLocalSupportedFeaturesPage0Complete)
controller.le_features = LeFeatures(evt.le_features)
async def expect_evt(self, expected_evt: typing.Union[hci.Event, type], timeout: int = 3) -> hci.Event:
@@ -369,34 +369,35 @@ class ControllerTest(unittest.IsolatedAsyncioTestCase):
async def enable_connected_isochronous_stream_host_support(self):
"""Enable Connected Isochronous Stream Host Support in the LE Feature mask."""
self.controller.send_cmd(
- hci.LeSetHostFeature(bit_number=hci.LeHostFeatureBits.CONNECTED_ISO_STREAM_HOST_SUPPORT,
- bit_value=hci.Enable.ENABLED))
+ hci.LeSetHostFeatureV1(bit_number=hci.LeHostFeatureBits.CONNECTED_ISO_STREAM_HOST_SUPPORT,
+ bit_value=hci.Enable.ENABLED))
- await self.expect_evt(hci.LeSetHostFeatureComplete(status=ErrorCode.SUCCESS, num_hci_command_packets=1))
+ await self.expect_evt(hci.LeSetHostFeatureV1Complete(status=ErrorCode.SUCCESS, num_hci_command_packets=1))
async def establish_le_connection_central(self, peer_address: hci.Address) -> int:
"""Establish a connection with the selected peer as Central.
Returns the ACL connection handle for the opened link."""
self.controller.send_cmd(
- hci.LeExtendedCreateConnection(initiator_filter_policy=hci.InitiatorFilterPolicy.USE_PEER_ADDRESS,
- own_address_type=hci.OwnAddressType.PUBLIC_DEVICE_ADDRESS,
- peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
- peer_address=peer_address,
- initiating_phys=0x1,
- initiating_phy_parameters=[
- hci.InitiatingPhyParameters(
- scan_interval=0x200,
- scan_window=0x100,
- connection_interval_min=0x200,
- connection_interval_max=0x200,
- max_latency=0x6,
- supervision_timeout=0xc80,
- min_ce_length=0,
- max_ce_length=0,
- )
- ]))
-
- await self.expect_evt(hci.LeExtendedCreateConnectionStatus(status=ErrorCode.SUCCESS, num_hci_command_packets=1))
+ hci.LeExtendedCreateConnectionV1(initiator_filter_policy=hci.InitiatorFilterPolicy.USE_PEER_ADDRESS,
+ own_address_type=hci.OwnAddressType.PUBLIC_DEVICE_ADDRESS,
+ peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
+ peer_address=peer_address,
+ initiating_phys=0x1,
+ initiating_phy_parameters=[
+ hci.InitiatingPhyParameters(
+ scan_interval=0x200,
+ scan_window=0x100,
+ connection_interval_min=0x200,
+ connection_interval_max=0x200,
+ max_latency=0x6,
+ supervision_timeout=0xc80,
+ min_ce_length=0,
+ max_ce_length=0,
+ )
+ ]))
+
+ await self.expect_evt(
+ hci.LeExtendedCreateConnectionV1Status(status=ErrorCode.SUCCESS, num_hci_command_packets=1))
self.controller.send_ll(ll.LeLegacyAdvertisingPdu(source_address=peer_address,
advertising_address_type=ll.AddressType.PUBLIC,
@@ -423,15 +424,15 @@ class ControllerTest(unittest.IsolatedAsyncioTestCase):
conn_supervision_timeout=0xc80))
connection_complete = await self.expect_evt(
- hci.LeEnhancedConnectionComplete(status=ErrorCode.SUCCESS,
- connection_handle=self.Any,
- role=hci.Role.CENTRAL,
- peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
- peer_address=peer_address,
- connection_interval=0x200,
- peripheral_latency=0x6,
- supervision_timeout=0xc80,
- central_clock_accuracy=hci.ClockAccuracy.PPM_500))
+ hci.LeEnhancedConnectionCompleteV1(status=ErrorCode.SUCCESS,
+ connection_handle=self.Any,
+ role=hci.Role.CENTRAL,
+ peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
+ peer_address=peer_address,
+ connection_interval=0x200,
+ peripheral_latency=0x6,
+ supervision_timeout=0xc80,
+ central_clock_accuracy=hci.ClockAccuracy.PPM_500))
acl_connection_handle = connection_complete.connection_handle
await self.expect_evt(
@@ -475,15 +476,15 @@ class ControllerTest(unittest.IsolatedAsyncioTestCase):
conn_supervision_timeout=0x200))
connection_complete = await self.expect_evt(
- hci.LeEnhancedConnectionComplete(status=ErrorCode.SUCCESS,
- connection_handle=self.Any,
- role=hci.Role.PERIPHERAL,
- peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
- peer_address=peer_address,
- connection_interval=0x200,
- peripheral_latency=0x200,
- supervision_timeout=0x200,
- central_clock_accuracy=hci.ClockAccuracy.PPM_500))
+ hci.LeEnhancedConnectionCompleteV1(status=ErrorCode.SUCCESS,
+ connection_handle=self.Any,
+ role=hci.Role.PERIPHERAL,
+ peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
+ peer_address=peer_address,
+ connection_interval=0x200,
+ peripheral_latency=0x200,
+ supervision_timeout=0x200,
+ central_clock_accuracy=hci.ClockAccuracy.PPM_500))
return connection_complete.connection_handle
diff --git a/tools/rootcanal/rust/src/llcp/iso.rs b/tools/rootcanal/rust/src/llcp/iso.rs
index 6d9997d5ba..1f6b11adc7 100644
--- a/tools/rootcanal/rust/src/llcp/iso.rs
+++ b/tools/rootcanal/rust/src/llcp/iso.rs
@@ -1283,7 +1283,7 @@ impl IsoManager {
conn_event_count: 0,
},
);
- self.send_hci_event(hci::LeCisEstablishedBuilder {
+ self.send_hci_event(hci::LeCisEstablishedV1Builder {
status: hci::ErrorCode::Success,
connection_handle: cis_connection_handle,
cig_sync_delay: parameters.cig_sync_delay,
@@ -1323,7 +1323,7 @@ impl IsoManager {
let cis = self.cis_connections.get_mut(&cis_connection_handle).unwrap();
cis.state = CisState::Configuration;
cis.parameters = None;
- self.send_hci_event(hci::LeCisEstablishedBuilder {
+ self.send_hci_event(hci::LeCisEstablishedV1Builder {
status: hci::ErrorCode::RemoteUserTerminatedConnection,
connection_handle: cis_connection_handle,
cig_sync_delay: 0,
@@ -1364,7 +1364,7 @@ impl IsoManager {
});
let cis = self.cis_connections.get(&cis_connection_handle).unwrap();
let parameters = cis.parameters.as_ref().unwrap();
- self.send_hci_event(hci::LeCisEstablishedBuilder {
+ self.send_hci_event(hci::LeCisEstablishedV1Builder {
status: hci::ErrorCode::Success,
connection_handle: cis_connection_handle,
cig_sync_delay: parameters.cig_sync_delay,
diff --git a/tools/rootcanal/test/LL/CIS/CEN/BV_01_C.py b/tools/rootcanal/test/LL/CIS/CEN/BV_01_C.py
index 67184f2555..9b302336f0 100644
--- a/tools/rootcanal/test/LL/CIS/CEN/BV_01_C.py
+++ b/tools/rootcanal/test/LL/CIS/CEN/BV_01_C.py
@@ -165,22 +165,22 @@ class Test(ControllerTest):
# The Connection_Handle parameter is set to the value provided in the HCI_LE_Create_CIS
# command.
await self.expect_evt(
- hci.LeCisEstablished(status=ErrorCode.SUCCESS,
- connection_handle=cis_connection_handle,
- cig_sync_delay=cis_ind.cig_sync_delay,
- cis_sync_delay=cis_ind.cis_sync_delay,
- transport_latency_c_to_p=self.Any,
- transport_latency_p_to_c=self.Any,
- phy_c_to_p=hci.SecondaryPhyType.LE_1M,
- phy_p_to_c=hci.SecondaryPhyType.LE_1M,
- nse=self.NSE,
- bn_c_to_p=self.BN_C_TO_P,
- bn_p_to_c=self.BN_P_TO_C,
- ft_c_to_p=self.FT_C_TO_P,
- ft_p_to_c=self.FT_P_TO_C,
- max_pdu_c_to_p=self.Max_PDU_C_TO_P,
- max_pdu_p_to_c=self.Max_PDU_P_TO_C,
- iso_interval=self.ISO_Interval))
+ hci.LeCisEstablishedV1(status=ErrorCode.SUCCESS,
+ connection_handle=cis_connection_handle,
+ cig_sync_delay=cis_ind.cig_sync_delay,
+ cis_sync_delay=cis_ind.cis_sync_delay,
+ transport_latency_c_to_p=self.Any,
+ transport_latency_p_to_c=self.Any,
+ phy_c_to_p=hci.SecondaryPhyType.LE_1M,
+ phy_p_to_c=hci.SecondaryPhyType.LE_1M,
+ nse=self.NSE,
+ bn_c_to_p=self.BN_C_TO_P,
+ bn_p_to_c=self.BN_P_TO_C,
+ ft_c_to_p=self.FT_C_TO_P,
+ ft_p_to_c=self.FT_P_TO_C,
+ max_pdu_c_to_p=self.Max_PDU_C_TO_P,
+ max_pdu_p_to_c=self.Max_PDU_P_TO_C,
+ iso_interval=self.ISO_Interval))
# 8. The Upper Tester orders the IUT to send data packets to the Lower Tester.
iso_sdu = [random.randint(1, 251) for n in range(self.Max_SDU_C_TO_P)]
diff --git a/tools/rootcanal/test/LL/CIS/CEN/BV_03_C.py b/tools/rootcanal/test/LL/CIS/CEN/BV_03_C.py
index c3b0e11e43..21263c666b 100644
--- a/tools/rootcanal/test/LL/CIS/CEN/BV_03_C.py
+++ b/tools/rootcanal/test/LL/CIS/CEN/BV_03_C.py
@@ -136,5 +136,5 @@ class Test(ControllerTest):
# 5. The Upper Tester receives an HCI_LE_CIS_Established event from the IUT with a status failure.
# The Status field has the same value as the LL_REJECT_EXT_IND PDU in step 4.
await self.expect_evt(
- hci.LeCisEstablished(status=ErrorCode.REMOTE_USER_TERMINATED_CONNECTION,
- connection_handle=cis_connection_handle))
+ hci.LeCisEstablishedV1(status=ErrorCode.REMOTE_USER_TERMINATED_CONNECTION,
+ connection_handle=cis_connection_handle))
diff --git a/tools/rootcanal/test/LL/CIS/CEN/BV_10_C.py b/tools/rootcanal/test/LL/CIS/CEN/BV_10_C.py
index cb30823647..6b2020bb08 100644
--- a/tools/rootcanal/test/LL/CIS/CEN/BV_10_C.py
+++ b/tools/rootcanal/test/LL/CIS/CEN/BV_10_C.py
@@ -154,22 +154,22 @@ class Test(ControllerTest):
conn_event_count=0))
await self.expect_evt(
- hci.LeCisEstablished(status=ErrorCode.SUCCESS,
- connection_handle=cis_connection_handle_1,
- cig_sync_delay=cis_ind_1.cig_sync_delay,
- cis_sync_delay=cis_ind_1.cis_sync_delay,
- transport_latency_c_to_p=self.Any,
- transport_latency_p_to_c=self.Any,
- phy_c_to_p=hci.SecondaryPhyType.LE_1M,
- phy_p_to_c=hci.SecondaryPhyType.LE_1M,
- nse=self.NSE,
- bn_c_to_p=self.BN_C_TO_P,
- bn_p_to_c=self.BN_P_TO_C,
- ft_c_to_p=self.FT_C_TO_P,
- ft_p_to_c=self.FT_P_TO_C,
- max_pdu_c_to_p=self.Max_PDU_C_TO_P,
- max_pdu_p_to_c=self.Max_PDU_P_TO_C,
- iso_interval=self.ISO_Interval))
+ hci.LeCisEstablishedV1(status=ErrorCode.SUCCESS,
+ connection_handle=cis_connection_handle_1,
+ cig_sync_delay=cis_ind_1.cig_sync_delay,
+ cis_sync_delay=cis_ind_1.cis_sync_delay,
+ transport_latency_c_to_p=self.Any,
+ transport_latency_p_to_c=self.Any,
+ phy_c_to_p=hci.SecondaryPhyType.LE_1M,
+ phy_p_to_c=hci.SecondaryPhyType.LE_1M,
+ nse=self.NSE,
+ bn_c_to_p=self.BN_C_TO_P,
+ bn_p_to_c=self.BN_P_TO_C,
+ ft_c_to_p=self.FT_C_TO_P,
+ ft_p_to_c=self.FT_P_TO_C,
+ max_pdu_c_to_p=self.Max_PDU_C_TO_P,
+ max_pdu_p_to_c=self.Max_PDU_P_TO_C,
+ iso_interval=self.ISO_Interval))
cis_req_2 = await self.expect_llcp(source_address=controller.address,
destination_address=peer_address_2,
@@ -210,22 +210,22 @@ class Test(ControllerTest):
conn_event_count=0))
await self.expect_evt(
- hci.LeCisEstablished(status=ErrorCode.SUCCESS,
- connection_handle=cis_connection_handle_2,
- cig_sync_delay=cis_ind_2.cig_sync_delay,
- cis_sync_delay=cis_ind_2.cis_sync_delay,
- transport_latency_c_to_p=self.Any,
- transport_latency_p_to_c=self.Any,
- phy_c_to_p=hci.SecondaryPhyType.LE_1M,
- phy_p_to_c=hci.SecondaryPhyType.LE_1M,
- nse=self.NSE,
- bn_c_to_p=self.BN_C_TO_P,
- bn_p_to_c=self.BN_P_TO_C,
- ft_c_to_p=self.FT_C_TO_P,
- ft_p_to_c=self.FT_P_TO_C,
- max_pdu_c_to_p=self.Max_PDU_C_TO_P,
- max_pdu_p_to_c=self.Max_PDU_P_TO_C,
- iso_interval=self.ISO_Interval))
+ hci.LeCisEstablishedV1(status=ErrorCode.SUCCESS,
+ connection_handle=cis_connection_handle_2,
+ cig_sync_delay=cis_ind_2.cig_sync_delay,
+ cis_sync_delay=cis_ind_2.cis_sync_delay,
+ transport_latency_c_to_p=self.Any,
+ transport_latency_p_to_c=self.Any,
+ phy_c_to_p=hci.SecondaryPhyType.LE_1M,
+ phy_p_to_c=hci.SecondaryPhyType.LE_1M,
+ nse=self.NSE,
+ bn_c_to_p=self.BN_C_TO_P,
+ bn_p_to_c=self.BN_P_TO_C,
+ ft_c_to_p=self.FT_C_TO_P,
+ ft_p_to_c=self.FT_P_TO_C,
+ max_pdu_c_to_p=self.Max_PDU_C_TO_P,
+ max_pdu_p_to_c=self.Max_PDU_P_TO_C,
+ iso_interval=self.ISO_Interval))
# 1. The Upper Tester orders the IUT to send a payload of the specified length to the Lower Testers.
iso_sdu = [random.randint(1, 251) for n in range(self.Max_SDU_C_TO_P)]
diff --git a/tools/rootcanal/test/LL/CIS/CEN/BV_26_C.py b/tools/rootcanal/test/LL/CIS/CEN/BV_26_C.py
index 010ee283d3..d882211a04 100644
--- a/tools/rootcanal/test/LL/CIS/CEN/BV_26_C.py
+++ b/tools/rootcanal/test/LL/CIS/CEN/BV_26_C.py
@@ -146,22 +146,22 @@ class Test(ControllerTest):
# CIS packet sent by the Lower Tester. The Connection_Handle parameter is set to the value
# provided in the HCI_LE_Create_CIS command.
await self.expect_evt(
- hci.LeCisEstablished(status=ErrorCode.SUCCESS,
- connection_handle=cis_connection_handle,
- cig_sync_delay=cis_ind.cig_sync_delay,
- cis_sync_delay=cis_ind.cis_sync_delay,
- transport_latency_c_to_p=self.Any,
- transport_latency_p_to_c=self.Any,
- phy_c_to_p=hci.SecondaryPhyType.LE_1M,
- phy_p_to_c=hci.SecondaryPhyType.LE_1M,
- nse=cis_req.nse,
- bn_c_to_p=cis_req.bn_c_to_p,
- bn_p_to_c=cis_req.bn_p_to_c,
- ft_c_to_p=cis_req.ft_c_to_p,
- ft_p_to_c=cis_req.ft_p_to_c,
- max_pdu_c_to_p=cis_req.max_pdu_c_to_p,
- max_pdu_p_to_c=cis_req.max_pdu_p_to_c,
- iso_interval=cis_req.iso_interval))
+ hci.LeCisEstablishedV1(status=ErrorCode.SUCCESS,
+ connection_handle=cis_connection_handle,
+ cig_sync_delay=cis_ind.cig_sync_delay,
+ cis_sync_delay=cis_ind.cis_sync_delay,
+ transport_latency_c_to_p=self.Any,
+ transport_latency_p_to_c=self.Any,
+ phy_c_to_p=hci.SecondaryPhyType.LE_1M,
+ phy_p_to_c=hci.SecondaryPhyType.LE_1M,
+ nse=cis_req.nse,
+ bn_c_to_p=cis_req.bn_c_to_p,
+ bn_p_to_c=cis_req.bn_p_to_c,
+ ft_c_to_p=cis_req.ft_c_to_p,
+ ft_p_to_c=cis_req.ft_p_to_c,
+ max_pdu_c_to_p=cis_req.max_pdu_c_to_p,
+ max_pdu_p_to_c=cis_req.max_pdu_p_to_c,
+ iso_interval=cis_req.iso_interval))
# 7. The Upper Tester sends an HCI_LE_Setup_ISO_Data_Path command and receives a success
# response from the IUT.
@@ -318,22 +318,22 @@ class Test(ControllerTest):
# 23. The IUT sends an HCI_LE_CIS_Established event to the Upper Tester. The Connection_Handle
# parameter is set to the value provided in step 16.
await self.expect_evt(
- hci.LeCisEstablished(status=ErrorCode.SUCCESS,
- connection_handle=cis_connection_handle,
- cig_sync_delay=cis_ind.cig_sync_delay,
- cis_sync_delay=cis_ind.cis_sync_delay,
- transport_latency_c_to_p=self.Any,
- transport_latency_p_to_c=self.Any,
- phy_c_to_p=hci.SecondaryPhyType.LE_1M,
- phy_p_to_c=hci.SecondaryPhyType.LE_1M,
- nse=cis_req.nse,
- bn_c_to_p=cis_req.bn_c_to_p,
- bn_p_to_c=cis_req.bn_p_to_c,
- ft_c_to_p=cis_req.ft_c_to_p,
- ft_p_to_c=cis_req.ft_p_to_c,
- max_pdu_c_to_p=cis_req.max_pdu_c_to_p,
- max_pdu_p_to_c=cis_req.max_pdu_p_to_c,
- iso_interval=cis_req.iso_interval))
+ hci.LeCisEstablishedV1(status=ErrorCode.SUCCESS,
+ connection_handle=cis_connection_handle,
+ cig_sync_delay=cis_ind.cig_sync_delay,
+ cis_sync_delay=cis_ind.cis_sync_delay,
+ transport_latency_c_to_p=self.Any,
+ transport_latency_p_to_c=self.Any,
+ phy_c_to_p=hci.SecondaryPhyType.LE_1M,
+ phy_p_to_c=hci.SecondaryPhyType.LE_1M,
+ nse=cis_req.nse,
+ bn_c_to_p=cis_req.bn_c_to_p,
+ bn_p_to_c=cis_req.bn_p_to_c,
+ ft_c_to_p=cis_req.ft_c_to_p,
+ ft_p_to_c=cis_req.ft_p_to_c,
+ max_pdu_c_to_p=cis_req.max_pdu_c_to_p,
+ max_pdu_p_to_c=cis_req.max_pdu_p_to_c,
+ iso_interval=cis_req.iso_interval))
# 24. The Upper Tester sends an HCI_LE_Setup_ISO_Data_Path command to the IUT with
# Connection_Handle set to the value provided in step 16 and Data_Path_Direction set to Output.
diff --git a/tools/rootcanal/test/LL/CIS/PER/BV_01_C.py b/tools/rootcanal/test/LL/CIS/PER/BV_01_C.py
index 63e3be15d1..358df99777 100644
--- a/tools/rootcanal/test/LL/CIS/PER/BV_01_C.py
+++ b/tools/rootcanal/test/LL/CIS/PER/BV_01_C.py
@@ -138,22 +138,22 @@ class Test(ControllerTest):
# CIS packet sent by the Lower Tester. The Connection_Handle parameter is the
# CIS_Connection_Handle value provided in the HCI_LE_CIS_Request event.
await self.expect_evt(
- hci.LeCisEstablished(status=ErrorCode.SUCCESS,
- connection_handle=cis_connection_handle,
- cig_sync_delay=self.CIG_Sync_Delay,
- cis_sync_delay=self.CIS_Sync_Delay,
- transport_latency_c_to_p=self.Any,
- transport_latency_p_to_c=self.Any,
- phy_c_to_p=hci.SecondaryPhyType.LE_1M,
- phy_p_to_c=hci.SecondaryPhyType.LE_1M,
- nse=self.NSE,
- bn_c_to_p=self.BN_C_TO_P,
- bn_p_to_c=self.BN_P_TO_C,
- ft_c_to_p=self.FT_C_TO_P,
- ft_p_to_c=self.FT_P_TO_C,
- max_pdu_c_to_p=self.Max_PDU_C_TO_P,
- max_pdu_p_to_c=self.Max_PDU_P_TO_C,
- iso_interval=self.ISO_Interval))
+ hci.LeCisEstablishedV1(status=ErrorCode.SUCCESS,
+ connection_handle=cis_connection_handle,
+ cig_sync_delay=self.CIG_Sync_Delay,
+ cis_sync_delay=self.CIS_Sync_Delay,
+ transport_latency_c_to_p=self.Any,
+ transport_latency_p_to_c=self.Any,
+ phy_c_to_p=hci.SecondaryPhyType.LE_1M,
+ phy_p_to_c=hci.SecondaryPhyType.LE_1M,
+ nse=self.NSE,
+ bn_c_to_p=self.BN_C_TO_P,
+ bn_p_to_c=self.BN_P_TO_C,
+ ft_c_to_p=self.FT_C_TO_P,
+ ft_p_to_c=self.FT_P_TO_C,
+ max_pdu_c_to_p=self.Max_PDU_C_TO_P,
+ max_pdu_p_to_c=self.Max_PDU_P_TO_C,
+ iso_interval=self.ISO_Interval))
# 9. The Upper Tester sends an HCI_LE_Setup_ISO_Data_Path command to the IUT with the output
# path enabled and receives a successful HCI_Command_Complete in response.
diff --git a/tools/rootcanal/test/LL/CON_/CEN/BV_41_C.py b/tools/rootcanal/test/LL/CON_/CEN/BV_41_C.py
index 9d377ef54a..f8711d5c29 100644
--- a/tools/rootcanal/test/LL/CON_/CEN/BV_41_C.py
+++ b/tools/rootcanal/test/LL/CON_/CEN/BV_41_C.py
@@ -41,25 +41,26 @@ class Test(ControllerTest):
# Prelude: Establish an ACL connection as central with the IUT.
controller.send_cmd(
- hci.LeExtendedCreateConnection(initiator_filter_policy=hci.InitiatorFilterPolicy.USE_PEER_ADDRESS,
- own_address_type=hci.OwnAddressType.PUBLIC_DEVICE_ADDRESS,
- peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
- peer_address=peer_address,
- initiating_phys=0x1,
- initiating_phy_parameters=[
- hci.InitiatingPhyParameters(
- scan_interval=0x200,
- scan_window=0x100,
- connection_interval_min=0x200,
- connection_interval_max=0x200,
- max_latency=0x6,
- supervision_timeout=0xc80,
- min_ce_length=0,
- max_ce_length=0,
- )
- ]))
-
- await self.expect_evt(hci.LeExtendedCreateConnectionStatus(status=ErrorCode.SUCCESS, num_hci_command_packets=1))
+ hci.LeExtendedCreateConnectionV1(initiator_filter_policy=hci.InitiatorFilterPolicy.USE_PEER_ADDRESS,
+ own_address_type=hci.OwnAddressType.PUBLIC_DEVICE_ADDRESS,
+ peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
+ peer_address=peer_address,
+ initiating_phys=0x1,
+ initiating_phy_parameters=[
+ hci.InitiatingPhyParameters(
+ scan_interval=0x200,
+ scan_window=0x100,
+ connection_interval_min=0x200,
+ connection_interval_max=0x200,
+ max_latency=0x6,
+ supervision_timeout=0xc80,
+ min_ce_length=0,
+ max_ce_length=0,
+ )
+ ]))
+
+ await self.expect_evt(
+ hci.LeExtendedCreateConnectionV1Status(status=ErrorCode.SUCCESS, num_hci_command_packets=1))
controller.send_ll(ll.LeLegacyAdvertisingPdu(source_address=peer_address,
advertising_address_type=ll.AddressType.PUBLIC,
@@ -86,15 +87,15 @@ class Test(ControllerTest):
conn_supervision_timeout=0xc80))
await self.expect_evt(
- hci.LeEnhancedConnectionComplete(status=ErrorCode.SUCCESS,
- connection_handle=acl_connection_handle,
- role=hci.Role.CENTRAL,
- peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
- peer_address=peer_address,
- connection_interval=0x200,
- peripheral_latency=0x6,
- supervision_timeout=0xc80,
- central_clock_accuracy=hci.ClockAccuracy.PPM_500))
+ hci.LeEnhancedConnectionCompleteV1(status=ErrorCode.SUCCESS,
+ connection_handle=acl_connection_handle,
+ role=hci.Role.CENTRAL,
+ peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
+ peer_address=peer_address,
+ connection_interval=0x200,
+ peripheral_latency=0x6,
+ supervision_timeout=0xc80,
+ central_clock_accuracy=hci.ClockAccuracy.PPM_500))
await self.expect_evt(
hci.LeChannelSelectionAlgorithm(connection_handle=acl_connection_handle,
diff --git a/tools/rootcanal/test/LL/CON_/CEN/BV_43_C.py b/tools/rootcanal/test/LL/CON_/CEN/BV_43_C.py
index 914df4cfe9..8d147c9cdb 100644
--- a/tools/rootcanal/test/LL/CON_/CEN/BV_43_C.py
+++ b/tools/rootcanal/test/LL/CON_/CEN/BV_43_C.py
@@ -38,25 +38,26 @@ class Test(ControllerTest):
# Prelude: Establish an ACL connection as central with the IUT.
controller.send_cmd(
- hci.LeExtendedCreateConnection(initiator_filter_policy=hci.InitiatorFilterPolicy.USE_PEER_ADDRESS,
- own_address_type=hci.OwnAddressType.PUBLIC_DEVICE_ADDRESS,
- peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
- peer_address=peer_address,
- initiating_phys=0x1,
- initiating_phy_parameters=[
- hci.InitiatingPhyParameters(
- scan_interval=0x200,
- scan_window=0x100,
- connection_interval_min=0x200,
- connection_interval_max=0x200,
- max_latency=0x6,
- supervision_timeout=0xc80,
- min_ce_length=0,
- max_ce_length=0,
- )
- ]))
-
- await self.expect_evt(hci.LeExtendedCreateConnectionStatus(status=ErrorCode.SUCCESS, num_hci_command_packets=1))
+ hci.LeExtendedCreateConnectionV1(initiator_filter_policy=hci.InitiatorFilterPolicy.USE_PEER_ADDRESS,
+ own_address_type=hci.OwnAddressType.PUBLIC_DEVICE_ADDRESS,
+ peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
+ peer_address=peer_address,
+ initiating_phys=0x1,
+ initiating_phy_parameters=[
+ hci.InitiatingPhyParameters(
+ scan_interval=0x200,
+ scan_window=0x100,
+ connection_interval_min=0x200,
+ connection_interval_max=0x200,
+ max_latency=0x6,
+ supervision_timeout=0xc80,
+ min_ce_length=0,
+ max_ce_length=0,
+ )
+ ]))
+
+ await self.expect_evt(
+ hci.LeExtendedCreateConnectionV1Status(status=ErrorCode.SUCCESS, num_hci_command_packets=1))
controller.send_ll(ll.LeLegacyAdvertisingPdu(source_address=peer_address,
advertising_address_type=ll.AddressType.PUBLIC,
@@ -83,15 +84,15 @@ class Test(ControllerTest):
conn_supervision_timeout=0xc80))
await self.expect_evt(
- hci.LeEnhancedConnectionComplete(status=ErrorCode.SUCCESS,
- connection_handle=acl_connection_handle,
- role=hci.Role.CENTRAL,
- peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
- peer_address=peer_address,
- connection_interval=0x200,
- peripheral_latency=0x6,
- supervision_timeout=0xc80,
- central_clock_accuracy=hci.ClockAccuracy.PPM_500))
+ hci.LeEnhancedConnectionCompleteV1(status=ErrorCode.SUCCESS,
+ connection_handle=acl_connection_handle,
+ role=hci.Role.CENTRAL,
+ peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
+ peer_address=peer_address,
+ connection_interval=0x200,
+ peripheral_latency=0x6,
+ supervision_timeout=0xc80,
+ central_clock_accuracy=hci.ClockAccuracy.PPM_500))
await self.expect_evt(
hci.LeChannelSelectionAlgorithm(connection_handle=acl_connection_handle,
diff --git a/tools/rootcanal/test/LL/CON_/INI/BV_08_C.py b/tools/rootcanal/test/LL/CON_/INI/BV_08_C.py
index bfc23e8a9c..81eaded5df 100644
--- a/tools/rootcanal/test/LL/CON_/INI/BV_08_C.py
+++ b/tools/rootcanal/test/LL/CON_/INI/BV_08_C.py
@@ -116,16 +116,16 @@ class Test(ControllerTest):
# 6. Upper Tester receives an HCI_LE_Enhanced_Connection_Complete event from the IUT
# including the Lower Tester address and connection interval selected.
connect_complete = await self.expect_evt(
- hci.LeEnhancedConnectionComplete(status=ErrorCode.SUCCESS,
- connection_handle=self.Any,
- role=hci.Role.CENTRAL,
- peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
- peer_address=peer_address,
- connection_interval=0x200,
- peripheral_latency=0x6,
- supervision_timeout=0xc80,
- local_resolvable_private_address=connect_ind.source_address,
- central_clock_accuracy=hci.ClockAccuracy.PPM_500))
+ hci.LeEnhancedConnectionCompleteV1(status=ErrorCode.SUCCESS,
+ connection_handle=self.Any,
+ role=hci.Role.CENTRAL,
+ peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
+ peer_address=peer_address,
+ connection_interval=0x200,
+ peripheral_latency=0x6,
+ supervision_timeout=0xc80,
+ local_resolvable_private_address=connect_ind.source_address,
+ central_clock_accuracy=hci.ClockAccuracy.PPM_500))
# 7. After the CONNECT_IND has been received, the Lower Tester receives the first correctly
# formatted LL Data Channel PDU on the data channel.
diff --git a/tools/rootcanal/test/LL/CON_/INI/BV_09_C.py b/tools/rootcanal/test/LL/CON_/INI/BV_09_C.py
index 782c25ec33..1107924c12 100644
--- a/tools/rootcanal/test/LL/CON_/INI/BV_09_C.py
+++ b/tools/rootcanal/test/LL/CON_/INI/BV_09_C.py
@@ -144,17 +144,17 @@ class Test(ControllerTest):
# 10. Upper Tester receives an HCI_LE_Enhanced_Connection_Complete event from the IUT
# including the Lower Tester’s RPA and Identity address and connection interval selected.
connect_complete = await self.expect_evt(
- hci.LeEnhancedConnectionComplete(status=ErrorCode.SUCCESS,
- connection_handle=self.Any,
- role=hci.Role.CENTRAL,
- peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
- peer_address=peer_address,
- peer_resolvable_private_address=peer_resolvable_address,
- local_resolvable_private_address=connect_ind.source_address,
- connection_interval=0x200,
- peripheral_latency=0x6,
- supervision_timeout=0xc80,
- central_clock_accuracy=hci.ClockAccuracy.PPM_500))
+ hci.LeEnhancedConnectionCompleteV1(status=ErrorCode.SUCCESS,
+ connection_handle=self.Any,
+ role=hci.Role.CENTRAL,
+ peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
+ peer_address=peer_address,
+ peer_resolvable_private_address=peer_resolvable_address,
+ local_resolvable_private_address=connect_ind.source_address,
+ connection_interval=0x200,
+ peripheral_latency=0x6,
+ supervision_timeout=0xc80,
+ central_clock_accuracy=hci.ClockAccuracy.PPM_500))
# 11. After the CONNECT_IND has been received, the Lower Tester receives the first correctly
# formatted LL Data Channel PDU on the data channel.
diff --git a/tools/rootcanal/test/LL/CON_/INI/BV_10_C.py b/tools/rootcanal/test/LL/CON_/INI/BV_10_C.py
index faa3d90b4b..705e83ebd2 100644
--- a/tools/rootcanal/test/LL/CON_/INI/BV_10_C.py
+++ b/tools/rootcanal/test/LL/CON_/INI/BV_10_C.py
@@ -144,16 +144,16 @@ class Test(ControllerTest):
# 10. Upper Tester receives an HCI_LE_Enhanced_Connection_Complete event from the IUT
# including the Lower Tester address and connection interval selected.
connect_complete = await self.expect_evt(
- hci.LeEnhancedConnectionComplete(status=ErrorCode.SUCCESS,
- connection_handle=self.Any,
- role=hci.Role.CENTRAL,
- peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
- peer_address=peer_address,
- peer_resolvable_private_address=peer_resolvable_address,
- connection_interval=0x200,
- peripheral_latency=0x6,
- supervision_timeout=0xc80,
- central_clock_accuracy=hci.ClockAccuracy.PPM_500))
+ hci.LeEnhancedConnectionCompleteV1(status=ErrorCode.SUCCESS,
+ connection_handle=self.Any,
+ role=hci.Role.CENTRAL,
+ peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
+ peer_address=peer_address,
+ peer_resolvable_private_address=peer_resolvable_address,
+ connection_interval=0x200,
+ peripheral_latency=0x6,
+ supervision_timeout=0xc80,
+ central_clock_accuracy=hci.ClockAccuracy.PPM_500))
# 11. After the CONNECT_IND has been received, the Lower Tester receives the first correctly
# formatted LL Data Channel PDU on the data channel.
diff --git a/tools/rootcanal/test/LL/CON_/INI/BV_11_C.py b/tools/rootcanal/test/LL/CON_/INI/BV_11_C.py
index bb5341268e..301c7addac 100644
--- a/tools/rootcanal/test/LL/CON_/INI/BV_11_C.py
+++ b/tools/rootcanal/test/LL/CON_/INI/BV_11_C.py
@@ -152,17 +152,17 @@ class Test(ControllerTest):
# 10. Upper Tester receives an HCI_LE_Enhanced_Connection_Complete event from the IUT
# including the Lower Tester address and connection interval selected.
connect_complete = await self.expect_evt(
- hci.LeEnhancedConnectionComplete(status=ErrorCode.SUCCESS,
- connection_handle=self.Any,
- role=hci.Role.CENTRAL,
- peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
- peer_address=peer_address,
- peer_resolvable_private_address=peer_resolvable_address,
- local_resolvable_private_address=connect_ind.source_address,
- connection_interval=0x200,
- peripheral_latency=0x6,
- supervision_timeout=0xc80,
- central_clock_accuracy=hci.ClockAccuracy.PPM_500))
+ hci.LeEnhancedConnectionCompleteV1(status=ErrorCode.SUCCESS,
+ connection_handle=self.Any,
+ role=hci.Role.CENTRAL,
+ peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
+ peer_address=peer_address,
+ peer_resolvable_private_address=peer_resolvable_address,
+ local_resolvable_private_address=connect_ind.source_address,
+ connection_interval=0x200,
+ peripheral_latency=0x6,
+ supervision_timeout=0xc80,
+ central_clock_accuracy=hci.ClockAccuracy.PPM_500))
# 11. After the CONNECT_IND has been received, the Lower Tester receives the first correctly
# formatted LL Data Channel PDU on the data channel.
diff --git a/tools/rootcanal/test/LL/CON_/PER/BV_40_C.py b/tools/rootcanal/test/LL/CON_/PER/BV_40_C.py
index 045bca32a3..f3f2eaedc0 100644
--- a/tools/rootcanal/test/LL/CON_/PER/BV_40_C.py
+++ b/tools/rootcanal/test/LL/CON_/PER/BV_40_C.py
@@ -72,15 +72,15 @@ class Test(ControllerTest):
conn_supervision_timeout=0x200))
await self.expect_evt(
- hci.LeEnhancedConnectionComplete(status=ErrorCode.SUCCESS,
- connection_handle=acl_connection_handle,
- role=hci.Role.PERIPHERAL,
- peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
- peer_address=peer_address,
- connection_interval=0x200,
- peripheral_latency=0x200,
- supervision_timeout=0x200,
- central_clock_accuracy=hci.ClockAccuracy.PPM_500))
+ hci.LeEnhancedConnectionCompleteV1(status=ErrorCode.SUCCESS,
+ connection_handle=acl_connection_handle,
+ role=hci.Role.PERIPHERAL,
+ peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
+ peer_address=peer_address,
+ connection_interval=0x200,
+ peripheral_latency=0x200,
+ supervision_timeout=0x200,
+ central_clock_accuracy=hci.ClockAccuracy.PPM_500))
test_rounds = [
TestRound(0x00, 0x01, 0x03, 0x02, 0x00),
diff --git a/tools/rootcanal/test/LL/CON_/PER/BV_42_C.py b/tools/rootcanal/test/LL/CON_/PER/BV_42_C.py
index ae067c2269..3c7545dceb 100644
--- a/tools/rootcanal/test/LL/CON_/PER/BV_42_C.py
+++ b/tools/rootcanal/test/LL/CON_/PER/BV_42_C.py
@@ -72,15 +72,15 @@ class Test(ControllerTest):
conn_supervision_timeout=0x200))
await self.expect_evt(
- hci.LeEnhancedConnectionComplete(status=ErrorCode.SUCCESS,
- connection_handle=acl_connection_handle,
- role=hci.Role.PERIPHERAL,
- peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
- peer_address=peer_address,
- connection_interval=0x200,
- peripheral_latency=0x200,
- supervision_timeout=0x200,
- central_clock_accuracy=hci.ClockAccuracy.PPM_500))
+ hci.LeEnhancedConnectionCompleteV1(status=ErrorCode.SUCCESS,
+ connection_handle=acl_connection_handle,
+ role=hci.Role.PERIPHERAL,
+ peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
+ peer_address=peer_address,
+ connection_interval=0x200,
+ peripheral_latency=0x200,
+ supervision_timeout=0x200,
+ central_clock_accuracy=hci.ClockAccuracy.PPM_500))
# 1. Upper Tester sends an HCI_LE_Set_PHY command to the IUT with the ALL_PHYS fields set to a
# value of 0x03. Upper Tester receives an HCI_Command_Status event indicating success in
diff --git a/tools/rootcanal/test/LL/DDI/ADV/BV_06_C.py b/tools/rootcanal/test/LL/DDI/ADV/BV_06_C.py
index f52edd3deb..f7ed090fa9 100644
--- a/tools/rootcanal/test/LL/DDI/ADV/BV_06_C.py
+++ b/tools/rootcanal/test/LL/DDI/ADV/BV_06_C.py
@@ -90,15 +90,15 @@ class Test(ControllerTest):
# 6. Upper Tester receives an HCI_LE_Connection_Complete event from the IUT including the
# parameters sent to the IUT in step 4.
await self.expect_evt(
- hci.LeEnhancedConnectionComplete(status=ErrorCode.SUCCESS,
- connection_handle=connection_handle,
- role=hci.Role.PERIPHERAL,
- peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
- peer_address=peer_address,
- connection_interval=LL_initiator_connInterval,
- peripheral_latency=LL_initiator_connPeripheralLatency,
- supervision_timeout=LL_initiator_connSupervisionTimeout,
- central_clock_accuracy=hci.ClockAccuracy.PPM_500))
+ hci.LeEnhancedConnectionCompleteV1(status=ErrorCode.SUCCESS,
+ connection_handle=connection_handle,
+ role=hci.Role.PERIPHERAL,
+ peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
+ peer_address=peer_address,
+ connection_interval=LL_initiator_connInterval,
+ peripheral_latency=LL_initiator_connPeripheralLatency,
+ supervision_timeout=LL_initiator_connSupervisionTimeout,
+ central_clock_accuracy=hci.ClockAccuracy.PPM_500))
# 7. The Upper Tester sends an HCI_Disconnect command to the IUT with the Connection_Handle
# and receives a successful HCI_Command_Status event in return.
diff --git a/tools/rootcanal/test/LL/DDI/ADV/BV_07_C.py b/tools/rootcanal/test/LL/DDI/ADV/BV_07_C.py
index 271a4fc564..afc834fd00 100644
--- a/tools/rootcanal/test/LL/DDI/ADV/BV_07_C.py
+++ b/tools/rootcanal/test/LL/DDI/ADV/BV_07_C.py
@@ -120,15 +120,15 @@ class Test(ControllerTest):
# 9. Upper Tester receives an HCI_LE_Connection_Complete event from the IUT including the
# parameters sent to the IUT.
await self.expect_evt(
- hci.LeEnhancedConnectionComplete(status=ErrorCode.SUCCESS,
- connection_handle=connection_handle,
- role=hci.Role.PERIPHERAL,
- peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
- peer_address=peer_address,
- connection_interval=LL_initiator_connInterval,
- peripheral_latency=LL_initiator_connPeripheralLatency,
- supervision_timeout=LL_initiator_connSupervisionTimeout,
- central_clock_accuracy=hci.ClockAccuracy.PPM_500))
+ hci.LeEnhancedConnectionCompleteV1(status=ErrorCode.SUCCESS,
+ connection_handle=connection_handle,
+ role=hci.Role.PERIPHERAL,
+ peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
+ peer_address=peer_address,
+ connection_interval=LL_initiator_connInterval,
+ peripheral_latency=LL_initiator_connPeripheralLatency,
+ supervision_timeout=LL_initiator_connSupervisionTimeout,
+ central_clock_accuracy=hci.ClockAccuracy.PPM_500))
# 10. Peripheral Connection Terminated (connection interval, Peripheral latency, timeout, channel map,
# un-encrypted, connection handle from step 9).
diff --git a/tools/rootcanal/test/LL/DDI/ADV/BV_09_C.py b/tools/rootcanal/test/LL/DDI/ADV/BV_09_C.py
index 719ddc76e3..d5e1c16602 100644
--- a/tools/rootcanal/test/LL/DDI/ADV/BV_09_C.py
+++ b/tools/rootcanal/test/LL/DDI/ADV/BV_09_C.py
@@ -303,7 +303,7 @@ class Test(ControllerTest):
# 13. Upper Tester receives an HCI_LE_Connection_Complete event from the IUT including the
# parameters sent to the IUT.
await self.expect_evt(
- hci.LeEnhancedConnectionComplete(
+ hci.LeEnhancedConnectionCompleteV1(
status=ErrorCode.SUCCESS,
connection_handle=connection_handle,
role=hci.Role.PERIPHERAL,
@@ -373,7 +373,7 @@ class Test(ControllerTest):
# parameters sent to the IUT in step 25 and as postamble: Peripheral Connection Terminated
# (connection interval, Peripheral latency, timeout, channel map, un-encrypted, connection handle).
await self.expect_evt(
- hci.LeEnhancedConnectionComplete(
+ hci.LeEnhancedConnectionCompleteV1(
status=ErrorCode.SUCCESS,
connection_handle=connection_handle,
role=hci.Role.PERIPHERAL,
diff --git a/tools/rootcanal/test/LL/DDI/ADV/BV_11_C.py b/tools/rootcanal/test/LL/DDI/ADV/BV_11_C.py
index 0a01918f7d..a322a17519 100644
--- a/tools/rootcanal/test/LL/DDI/ADV/BV_11_C.py
+++ b/tools/rootcanal/test/LL/DDI/ADV/BV_11_C.py
@@ -116,28 +116,27 @@ class Test(ControllerTest):
rssi=-16)
# Note: Link layer sends LeConnectComplete here.
- await self.expect_ll(
- ll.LeConnectComplete(source_address=controller.address,
- destination_address=peer_address,
- initiating_address_type=ll.AddressType.PUBLIC,
- advertising_address_type=ll.AddressType.PUBLIC,
- conn_interval=self.LL_initiator_connInterval,
- conn_peripheral_latency=self.LL_initiator_connPeripheralLatency,
- conn_supervision_timeout=self.LL_initiator_connSupervisionTimeout),
- ignored_pdus=[ll.LeLegacyAdvertisingPdu])
+ await self.expect_ll(ll.LeConnectComplete(source_address=controller.address,
+ destination_address=peer_address,
+ initiating_address_type=ll.AddressType.PUBLIC,
+ advertising_address_type=ll.AddressType.PUBLIC,
+ conn_interval=self.LL_initiator_connInterval,
+ conn_peripheral_latency=self.LL_initiator_connPeripheralLatency,
+ conn_supervision_timeout=self.LL_initiator_connSupervisionTimeout),
+ ignored_pdus=[ll.LeLegacyAdvertisingPdu])
# 11. Upper Tester receives an HCI_LE_Connection_Complete event from the IUT including the
# parameters sent to the IUT in step 8.
await self.expect_evt(
- hci.LeEnhancedConnectionComplete(status=ErrorCode.SUCCESS,
- connection_handle=connection_handle,
- role=hci.Role.PERIPHERAL,
- peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
- peer_address=peer_address,
- connection_interval=self.LL_initiator_connInterval,
- peripheral_latency=self.LL_initiator_connPeripheralLatency,
- supervision_timeout=self.LL_initiator_connSupervisionTimeout,
- central_clock_accuracy=hci.ClockAccuracy.PPM_500))
+ hci.LeEnhancedConnectionCompleteV1(status=ErrorCode.SUCCESS,
+ connection_handle=connection_handle,
+ role=hci.Role.PERIPHERAL,
+ peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
+ peer_address=peer_address,
+ connection_interval=self.LL_initiator_connInterval,
+ peripheral_latency=self.LL_initiator_connPeripheralLatency,
+ supervision_timeout=self.LL_initiator_connSupervisionTimeout,
+ central_clock_accuracy=hci.ClockAccuracy.PPM_500))
# 12. Upper Tester receives an HCI_LE_Disconnection_Complete event from the IUT with the reason
# parameter indicating ‘connection failed to be established’, with the connection handle parameter
diff --git a/tools/rootcanal/test/LL/DDI/ADV/BV_19_C.py b/tools/rootcanal/test/LL/DDI/ADV/BV_19_C.py
index 9247324a4f..80a8de4065 100644
--- a/tools/rootcanal/test/LL/DDI/ADV/BV_19_C.py
+++ b/tools/rootcanal/test/LL/DDI/ADV/BV_19_C.py
@@ -107,15 +107,15 @@ class Test(ControllerTest):
# 10. Upper Tester receives an HCI_LE_Connection_Complete event from the IUT including the
# parameters sent to the IUT in step 7.
await self.expect_evt(
- hci.LeEnhancedConnectionComplete(status=ErrorCode.SUCCESS,
- connection_handle=connection_handle,
- role=hci.Role.PERIPHERAL,
- peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
- peer_address=public_peer_address,
- connection_interval=self.LL_initiator_connInterval,
- peripheral_latency=self.LL_initiator_connPeripheralLatency,
- supervision_timeout=self.LL_initiator_connSupervisionTimeout,
- central_clock_accuracy=hci.ClockAccuracy.PPM_500))
+ hci.LeEnhancedConnectionCompleteV1(status=ErrorCode.SUCCESS,
+ connection_handle=connection_handle,
+ role=hci.Role.PERIPHERAL,
+ peer_address_type=hci.AddressType.PUBLIC_DEVICE_ADDRESS,
+ peer_address=public_peer_address,
+ connection_interval=self.LL_initiator_connInterval,
+ peripheral_latency=self.LL_initiator_connPeripheralLatency,
+ supervision_timeout=self.LL_initiator_connSupervisionTimeout,
+ central_clock_accuracy=hci.ClockAccuracy.PPM_500))
# 11. Upper Tester receives an HCI_Disconnection_Complete event from the IUT once the
# Establishment Timeout has expired.
diff --git a/tools/rootcanal/test/LL/DDI/ADV/BV_21_C.py b/tools/rootcanal/test/LL/DDI/ADV/BV_21_C.py
index 064194cf38..56ac692fa2 100644
--- a/tools/rootcanal/test/LL/DDI/ADV/BV_21_C.py
+++ b/tools/rootcanal/test/LL/DDI/ADV/BV_21_C.py
@@ -27,6 +27,14 @@ class Test(ControllerTest):
LL_advertiser_advInterval_MAX = 0x200
LL_advertiser_Adv_Channel_Map = 0x7
+ ADV_NONCONN_IND = hci.AdvertisingEventProperties(
+ connectable=0,
+ scannable=0,
+ directed=0,
+ high_duty_cycle=0,
+ legacy=1,
+ )
+
# LL/DDI/ADV/BV-21-C [Extended Advertising, Legacy PDUs, Non-Connectable]
async def test(self):
controller = self.controller
@@ -37,9 +45,9 @@ class Test(ControllerTest):
# Advertising_Event_Properties parameter shall be set to 00010000b (ADV_NONCONN_IND
# legacy PDU).
controller.send_cmd(
- hci.LeSetExtendedAdvertisingParametersLegacy(
+ hci.LeSetExtendedAdvertisingParametersV1(
advertising_handle=0,
- legacy_advertising_event_properties=hci.LegacyAdvertisingEventProperties.ADV_NONCONN_IND,
+ advertising_event_properties=self.ADV_NONCONN_IND,
primary_advertising_interval_min=self.LL_advertiser_advInterval_MIN,
primary_advertising_interval_max=self.LL_advertiser_advInterval_MAX,
primary_advertising_channel_map=self.LL_advertiser_Adv_Channel_Map,
@@ -47,7 +55,7 @@ class Test(ControllerTest):
advertising_filter_policy=hci.AdvertisingFilterPolicy.ALL_DEVICES))
await self.expect_evt(
- hci.LeSetExtendedAdvertisingParametersComplete(status=ErrorCode.SUCCESS, num_hci_command_packets=1))
+ hci.LeSetExtendedAdvertisingParametersV1Complete(status=ErrorCode.SUCCESS, num_hci_command_packets=1))
# For each round from 1–3 based on Table 4.2:
await self.steps_3_8(advertising_data=[1])
diff --git a/tools/rootcanal/test/LL/DDI/ADV/BV_22_C.py b/tools/rootcanal/test/LL/DDI/ADV/BV_22_C.py
index dd8b5b19cc..0585800caa 100644
--- a/tools/rootcanal/test/LL/DDI/ADV/BV_22_C.py
+++ b/tools/rootcanal/test/LL/DDI/ADV/BV_22_C.py
@@ -27,6 +27,14 @@ class Test(ControllerTest):
LL_advertiser_advInterval_MAX = 0x200
LL_advertiser_Adv_Channel_Map = 0x7
+ ADV_IND = hci.AdvertisingEventProperties(
+ connectable=1,
+ scannable=1,
+ directed=0,
+ high_duty_cycle=0,
+ legacy=1,
+ )
+
# LL/DDI/ADV/BV-22-C [Extended Advertising, Legacy PDUs, Undirected, CSA #2]
async def test(self):
controller = self.controller
@@ -36,9 +44,9 @@ class Test(ControllerTest):
# IUT using all supported advertising channels and minimum advertising interval. The
# Advertising_Event_Properties parameter shall be set to 00010011b (ADV_IND legacy PDU).
controller.send_cmd(
- hci.LeSetExtendedAdvertisingParametersLegacy(
+ hci.LeSetExtendedAdvertisingParametersV1(
advertising_handle=0,
- legacy_advertising_event_properties=hci.LegacyAdvertisingEventProperties.ADV_IND,
+ advertising_event_properties=self.ADV_IND,
primary_advertising_interval_min=self.LL_advertiser_advInterval_MIN,
primary_advertising_interval_max=self.LL_advertiser_advInterval_MAX,
primary_advertising_channel_map=self.LL_advertiser_Adv_Channel_Map,
@@ -46,7 +54,7 @@ class Test(ControllerTest):
advertising_filter_policy=hci.AdvertisingFilterPolicy.ALL_DEVICES))
await self.expect_evt(
- hci.LeSetExtendedAdvertisingParametersComplete(status=ErrorCode.SUCCESS, num_hci_command_packets=1))
+ hci.LeSetExtendedAdvertisingParametersV1Complete(status=ErrorCode.SUCCESS, num_hci_command_packets=1))
# 8. Repeat steps 3–7 for each Round shown in Table 4.4.
await self.steps_3_7(advertising_data=[1])
diff --git a/tools/rootcanal/test/LL/DDI/ADV/BV_26_C.py b/tools/rootcanal/test/LL/DDI/ADV/BV_26_C.py
index 24bc1d16f8..745ead263b 100644
--- a/tools/rootcanal/test/LL/DDI/ADV/BV_26_C.py
+++ b/tools/rootcanal/test/LL/DDI/ADV/BV_26_C.py
@@ -83,29 +83,30 @@ class Test(ControllerTest):
# shall be set to 0x0000. The Primary_Advertising_PHY and Secondary_Advertising_PHY shall be
# set to the values specified in Table 4.9.
controller.send_cmd(
- hci.LeSetExtendedAdvertisingParameters(advertising_handle=0,
- advertising_event_properties=hci.AdvertisingEventProperties(),
- primary_advertising_interval_min=self.LL_advertiser_advInterval_MIN,
- primary_advertising_interval_max=self.LL_advertiser_advInterval_MAX,
- primary_advertising_channel_map=self.LL_advertiser_Adv_Channel_Map,
- own_address_type=hci.OwnAddressType.PUBLIC_DEVICE_ADDRESS,
- advertising_filter_policy=hci.AdvertisingFilterPolicy.ALL_DEVICES,
- primary_advertising_phy=hci.PrimaryPhyType.LE_1M))
+ hci.LeSetExtendedAdvertisingParametersV1(
+ advertising_handle=0,
+ advertising_event_properties=hci.AdvertisingEventProperties(),
+ primary_advertising_interval_min=self.LL_advertiser_advInterval_MIN,
+ primary_advertising_interval_max=self.LL_advertiser_advInterval_MAX,
+ primary_advertising_channel_map=self.LL_advertiser_Adv_Channel_Map,
+ own_address_type=hci.OwnAddressType.PUBLIC_DEVICE_ADDRESS,
+ advertising_filter_policy=hci.AdvertisingFilterPolicy.ALL_DEVICES,
+ primary_advertising_phy=hci.PrimaryPhyType.LE_1M))
await self.expect_evt(
- hci.LeSetExtendedAdvertisingParametersComplete(status=ErrorCode.SUCCESS, num_hci_command_packets=1))
+ hci.LeSetExtendedAdvertisingParametersV1Complete(status=ErrorCode.SUCCESS, num_hci_command_packets=1))
# 4. The Upper Tester sends an HCI_LE_Set_Periodic_Advertising_Parameters command to the IUT
# using all supported advertising channels and selected periodic interval.
# Periodic_Advertising_Properties parameter shall be set to 0x0000.
controller.send_cmd(
- hci.LeSetPeriodicAdvertisingParameters(advertising_handle=0,
- periodic_advertising_interval_min=0x100,
- periodic_advertising_interval_max=0x100,
- include_tx_power=False))
+ hci.LeSetPeriodicAdvertisingParametersV1(advertising_handle=0,
+ periodic_advertising_interval_min=0x100,
+ periodic_advertising_interval_max=0x100,
+ include_tx_power=False))
await self.expect_evt(
- hci.LeSetPeriodicAdvertisingParametersComplete(status=ErrorCode.SUCCESS, num_hci_command_packets=1))
+ hci.LeSetPeriodicAdvertisingParametersV1Complete(status=ErrorCode.SUCCESS, num_hci_command_packets=1))
# 5. The Upper Tester sends one or more HCI_LE_Set_Periodic_Advertising_Data commands to the
# IUT with values according to Table 4.10 and using random octets from 1 to 254 as the payload. If
diff --git a/tools/rootcanal/test/LL/DDI/ADV/BV_47_C.py b/tools/rootcanal/test/LL/DDI/ADV/BV_47_C.py
index 64b471805d..7549daaccd 100644
--- a/tools/rootcanal/test/LL/DDI/ADV/BV_47_C.py
+++ b/tools/rootcanal/test/LL/DDI/ADV/BV_47_C.py
@@ -32,7 +32,7 @@ def make_advertising_event_properties(properties: int) -> hci.AdvertisingEventPr
high_duty_cycle=(properties & 0x8) != 0,
legacy=(properties & 0x10) != 0,
anonymous=(properties & 0x20) != 0,
- tx_power=(properties & 0x40) != 0)
+ include_tx_power=(properties & 0x40) != 0)
@dataclass
@@ -107,17 +107,18 @@ class Test(ControllerTest):
# Peer_Address_Type shall be set to 0x00 (Public Device Address), and the Peer_Address shall be
# set to the Lower Tester’s address.
controller.send_cmd(
- hci.LeSetExtendedAdvertisingParameters(advertising_handle=0,
- advertising_event_properties=advertising_event_properties,
- primary_advertising_interval_min=self.LL_advertiser_advInterval_MIN,
- primary_advertising_interval_max=self.LL_advertiser_advInterval_MAX,
- primary_advertising_channel_map=self.LL_advertiser_Adv_Channel_Map,
- own_address_type=hci.OwnAddressType.PUBLIC_DEVICE_ADDRESS,
- advertising_filter_policy=hci.AdvertisingFilterPolicy.ALL_DEVICES,
- primary_advertising_phy=hci.PrimaryPhyType.LE_1M))
+ hci.LeSetExtendedAdvertisingParametersV1(
+ advertising_handle=0,
+ advertising_event_properties=advertising_event_properties,
+ primary_advertising_interval_min=self.LL_advertiser_advInterval_MIN,
+ primary_advertising_interval_max=self.LL_advertiser_advInterval_MAX,
+ primary_advertising_channel_map=self.LL_advertiser_Adv_Channel_Map,
+ own_address_type=hci.OwnAddressType.PUBLIC_DEVICE_ADDRESS,
+ advertising_filter_policy=hci.AdvertisingFilterPolicy.ALL_DEVICES,
+ primary_advertising_phy=hci.PrimaryPhyType.LE_1M))
await self.expect_evt(
- hci.LeSetExtendedAdvertisingParametersComplete(status=ErrorCode.SUCCESS, num_hci_command_packets=1))
+ hci.LeSetExtendedAdvertisingParametersV1Complete(status=ErrorCode.SUCCESS, num_hci_command_packets=1))
# 4. The Upper Tester sends one or more HCI_LE_Set_Extended_Advertising_Data commands to the
# IUT with values according to Table 4.6 and using random octets from 1 to 254 as the payload. If
diff --git a/tools/rootcanal/test/LL/DDI/SCN/BV_79_C.py b/tools/rootcanal/test/LL/DDI/SCN/BV_79_C.py
index c58b7e9029..c85f74067e 100644
--- a/tools/rootcanal/test/LL/DDI/SCN/BV_79_C.py
+++ b/tools/rootcanal/test/LL/DDI/SCN/BV_79_C.py
@@ -153,7 +153,7 @@ class Test(ControllerTest):
# Tester containing a Status of 0x00 (Success), Sync_Handle set to a valid value, and the
# Advertising_SID received in step 3.
await self.expect_evt(
- hci.LePeriodicAdvertisingSyncEstablished(
+ hci.LePeriodicAdvertisingSyncEstablishedV1(
status=ErrorCode.SUCCESS,
sync_handle=0,
advertising_sid=advertising_sid,
@@ -193,10 +193,10 @@ class Test(ControllerTest):
fragment_length = min(max_fragment_length, remaining_length)
data_status = hci.DataStatus.CONTINUING if remaining_length > max_fragment_length else hci.DataStatus.COMPLETE
await self.expect_evt(
- hci.LePeriodicAdvertisingReport(sync_handle=0,
- tx_power=tx_power,
- rssi=0x10,
- cte_type=hci.CteType.NO_CONSTANT_TONE_EXTENSION,
- data_status=data_status,
- data=advertising_data[offset:offset + fragment_length]))
+ hci.LePeriodicAdvertisingReportV1(sync_handle=0,
+ tx_power=tx_power,
+ rssi=0x10,
+ cte_type=hci.CteType.NO_CONSTANT_TONE_EXTENSION,
+ data_status=data_status,
+ data=advertising_data[offset:offset + fragment_length]))
offset += fragment_length
diff --git a/tools/rootcanal/test/LL/SEC/ADV/BV_11_C.py b/tools/rootcanal/test/LL/SEC/ADV/BV_11_C.py
index ff100c5234..d250619eaa 100644
--- a/tools/rootcanal/test/LL/SEC/ADV/BV_11_C.py
+++ b/tools/rootcanal/test/LL/SEC/ADV/BV_11_C.py
@@ -144,7 +144,7 @@ class Test(ControllerTest):
conn_supervision_timeout=0xc80))
connection_complete_evt = await self.expect_evt(
- hci.LeEnhancedConnectionComplete(
+ hci.LeEnhancedConnectionCompleteV1(
status=hci.ErrorCode.SUCCESS,
connection_handle=self.Any,
role=hci.Role.PERIPHERAL,
diff --git a/tools/rootcanal/test/controller/le/le_scanning_filter_duplicates_test.cc b/tools/rootcanal/test/controller/le/le_scanning_filter_duplicates_test.cc
index 6a817ce6bf..0c4fbab669 100644
--- a/tools/rootcanal/test/controller/le/le_scanning_filter_duplicates_test.cc
+++ b/tools/rootcanal/test/controller/le/le_scanning_filter_duplicates_test.cc
@@ -49,9 +49,9 @@ public:
// Set event mask to receive (extended) Advertising Reports
controller_.SetEventMask(to_mask(EventCode::LE_META_EVENT));
- controller_.SetLeEventMask(to_mask(SubeventCode::ADVERTISING_REPORT) |
- to_mask(SubeventCode::EXTENDED_ADVERTISING_REPORT) |
- to_mask(SubeventCode::DIRECTED_ADVERTISING_REPORT));
+ controller_.SetLeEventMask(to_mask(SubeventCode::LE_ADVERTISING_REPORT) |
+ to_mask(SubeventCode::LE_EXTENDED_ADVERTISING_REPORT) |
+ to_mask(SubeventCode::LE_DIRECTED_ADVERTISING_REPORT));
}
void StartScan(FilterDuplicates filter_duplicates) {
diff --git a/tools/rootcanal/test/controller/le/test_helpers.h b/tools/rootcanal/test/controller/le/test_helpers.h
index 45d3257496..78978f7b42 100644
--- a/tools/rootcanal/test/controller/le/test_helpers.h
+++ b/tools/rootcanal/test/controller/le/test_helpers.h
@@ -35,7 +35,7 @@ enum : unsigned {
properties.high_duty_cycle_ = (mask & HIGH_DUTY_CYCLE) != 0;
properties.legacy_ = (mask & LEGACY) != 0;
properties.anonymous_ = (mask & ANONYMOUS) != 0;
- properties.tx_power_ = (mask & TX_POWER) != 0;
+ properties.include_tx_power_ = (mask & TX_POWER) != 0;
return properties;
}