Coverage for src / bluetooth_sig / advertising / __init__.py: 100%
8 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-11 20:14 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-11 20:14 +0000
1"""BLE Advertising data parsing and interpretation framework.
3Two-layer architecture:
4- AdvertisingPDUParser: Low-level BLE PDU parsing (raw bytes → AD structures)
5- AdvertisingDataInterpreter[T]: Base class for vendor-specific data interpretation
6- EAD: Encrypted advertising data support (Core Spec 1.23)
7"""
9from __future__ import annotations
11from bluetooth_sig.advertising.base import (
12 AdvertisingDataInterpreter,
13 AdvertisingInterpreterInfo,
14 DataSource,
15)
16from bluetooth_sig.advertising.ead_decryptor import (
17 EADDecryptor,
18 build_ead_nonce,
19 decrypt_ead,
20 decrypt_ead_from_raw,
21)
22from bluetooth_sig.advertising.encryption import (
23 DictKeyProvider,
24 EADKeyProvider,
25 EncryptionKeyProvider,
26)
27from bluetooth_sig.advertising.pdu_parser import AdvertisingPDUParser
28from bluetooth_sig.advertising.registry import (
29 AdvertisingInterpreterRegistry,
30 advertising_interpreter_registry,
31)
32from bluetooth_sig.types.address import bytes_to_mac_address, mac_address_to_bytes
34__all__ = [
35 # PDU parser
36 "AdvertisingPDUParser",
37 # Interpreter base class
38 "AdvertisingDataInterpreter",
39 "AdvertisingInterpreterInfo",
40 "DataSource",
41 # Registry
42 "AdvertisingInterpreterRegistry",
43 "advertising_interpreter_registry",
44 # Key providers
45 "EncryptionKeyProvider",
46 "DictKeyProvider",
47 "EADKeyProvider",
48 # EAD decryption
49 "EADDecryptor",
50 "decrypt_ead",
51 "decrypt_ead_from_raw",
52 "build_ead_nonce",
53 # Address utilities
54 "mac_address_to_bytes",
55 "bytes_to_mac_address",
56]