# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License.
import hci_packets as hci from hci_packets import ErrorCode import link_layer_packets as ll from py.bluetooth import Address from py.controller import ControllerTest
# LL/CS/CEN/BV-01-C [Respond to a CS Capabilities Exchange Procedure]
async def test(self): """
Test the CS Capabilities Exchange procedure responded by the local controller. """ # Test parameters.
peer_address = Address("aa:bb:cc:dd:ee:ff")
controller = self.controller
# Prelude: Establish an ACL connection with the IUT.
acl_connection_handle = await self.establish_le_connection_central(peer_address)
await self.le_start_encryption(acl_connection_handle, peer_address)
# 1. The Upper Tester sends an # HCI_LE_CS_Read_Local_Supported_Capabilities command to the IUT.
controller.send_cmd(hci.LeCsReadLocalSupportedCapabilities())
# 2. The IUT sends a successful HCI_Command_Complete event to the Upper Tester.
await self.expect_cmd_complete(hci.LeCsReadLocalSupportedCapabilitiesComplete)
# 3. The Lower Tester sends an LL_CS_CAPABILITIES_REQ PDU to the IUT.
controller.send_ll(
ll.LlCsCapabilitiesReq(
source_address=peer_address,
destination_address=controller.address,
**self.LOCAL_CS_CAPABILITIES,
)
)
# 4. The IUT sends an LL_CS_CAPABILITIES_RSP PDU to the Lower Tester.
await self.expect_ll(
ll.LlCsCapabilitiesRsp(
source_address=controller.address,
destination_address=peer_address,
status=ErrorCode.SUCCESS,
**self.IUT_CS_CAPABILITIES,
)
)
# 5. The IUT sends an HCI_LE_CS_Read_Remote_Capabilities_Complete event # to the Upper Tester.
await self.expect_evt(
hci.LeCsReadRemoteSupportedCapabilitiesComplete(
status=ErrorCode.SUCCESS,
connection_handle=acl_connection_handle,
**self.REMOTE_CS_CAPABILITIES,
)
)
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-06-27)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.