# Copyright 2023 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 import link_layer_packets as ll import unittest from hci_packets import ErrorCode from py.bluetooth import Address from py.controller import ControllerTest
# 1. Upper Tester configures undirected advertising in the IUT using all supported advertising # channels and a selected advertising interval between the minimum and maximum advertising # intervals.
controller.send_cmd(
hci.LeSetAdvertisingParameters(
advertising_interval_min=LL_advertiser_advInterval_MIN,
advertising_interval_max=LL_advertiser_advInterval_MAX,
advertising_type=hci.AdvertisingType.ADV_IND,
own_address_type=hci.OwnAddressType.PUBLIC_DEVICE_ADDRESS,
advertising_channel_map=LL_advertiser_Adv_Channel_Map,
advertising_filter_policy=hci.AdvertisingFilterPolicy.ALL_DEVICES))
# 2. Configure Lower Tester to monitor the advertising and scan response procedures of the IUT. The # Lower Tester will send an SCAN_REQ packet on a selected supported advertising channel # (defined as an IXIT) and using a common public device address as parameter.
# 3. Configure Scan Response Data in the IUT using device name length of 0 as response data.
scan_response_data = []
controller.send_cmd(hci.LeSetScanResponseData(advertising_data=scan_response_data))
# 4. Lower Tester sends a SCAN_REQ packet on the selected advertising channel after receiving an # ADV_IND packet from IUT on the advertising channel configured in step 3. The SCAN_REQ is # sent T_IFS after the end of an ADV_IND packet. # 5. Lower Tester receives a SCAN_RSP packet from the IUT addressed to the Lower Tester T_IFS # after the end of the request packet. # 6. Repeat steps 4–5 30 times or until IUT sends a SCN_RSP. for n in range(10):
await self.expect_ll(
ll.LeLegacyAdvertisingPdu(source_address=controller.address,
advertising_address_type=ll.AddressType.PUBLIC,
advertising_type=ll.LegacyAdvertisingType.ADV_IND,
advertising_data=[]))
# 7. Configure Scan Response Data in the IUT using device name length of 31 as response data.
controller.send_cmd(hci.LeSetAdvertisingEnable(advertising_enable=False))
# 8. Repeat steps 4–6. for n in range(10):
await self.expect_ll(
ll.LeLegacyAdvertisingPdu(source_address=controller.address,
advertising_address_type=ll.AddressType.PUBLIC,
advertising_type=ll.LegacyAdvertisingType.ADV_IND,
advertising_data=[]))
# 9. Configure Lower Tester to monitor the advertising and scan response procedures of the IUT. The # Lower Tester will send an SCAN_REQ packet on a selected supported advertising channel # (defined as an IXIT) and using a public device address that differs from the IUT address in the # most significant octet.
# 10. Configure Scan Response Data in the IUT using device name length of 0 as response data.
controller.send_cmd(hci.LeSetAdvertisingEnable(advertising_enable=False))
# 12. Configure Scan Response Data in the IUT using device name length of 31 as response data.
controller.send_cmd(hci.LeSetAdvertisingEnable(advertising_enable=False))
# 13. Repeat steps 4–6. for n in range(10):
await self.expect_ll(
ll.LeLegacyAdvertisingPdu(source_address=controller.address,
advertising_address_type=ll.AddressType.PUBLIC,
advertising_type=ll.LegacyAdvertisingType.ADV_IND,
advertising_data=[]))
# Note: this last iteration is very redundant, not implementing it # to save on execution time.
# 14. Configure Lower Tester to monitor the advertising and scan response procedures of the IUT. The # Lower Tester will send an SCAN_REQ packet on a selected supported advertising channel # (defined as an IXIT) and using a public device address that differs from the IUT address in the # most and least significant octets. # 15. Repeat steps 4–6. # 16. Configure Scan Response Data in the IUT using device name length of 31 as response data. # 17. Repeat steps 4–6.
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 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.