src.bluetooth_sig.registry.uuids.protocol_identifiers

Protocol identifiers registry for Bluetooth SIG protocol definitions.

Attributes

Classes

Name

Description

ProtocolIdentifiersRegistry

Registry for Bluetooth protocol identifiers.

Module Contents

class src.bluetooth_sig.registry.uuids.protocol_identifiers.ProtocolIdentifiersRegistry

Bases: bluetooth_sig.registry.base.BaseUUIDRegistry[bluetooth_sig.types.registry.protocol_identifiers.ProtocolInfo]

Registry for Bluetooth protocol identifiers.

Provides lookup of protocol information by UUID or name. Supports Classic Bluetooth protocols (L2CAP, RFCOMM, BNEP, AVDTP, etc.) and BLE protocols.

get_all_protocols() list[bluetooth_sig.types.registry.protocol_identifiers.ProtocolInfo]

Get all registered protocol identifiers.

Returns:

List of all ProtocolInfo objects

get_protocol_info(uuid: str | bluetooth_sig.types.uuid.BluetoothUUID) bluetooth_sig.types.registry.protocol_identifiers.ProtocolInfo | None

Get protocol information by UUID or name.

Parameters:

uuid – Protocol UUID (string, int, or BluetoothUUID) or protocol name

Returns:

ProtocolInfo if found, None otherwise

Examples

>>> registry = ProtocolIdentifiersRegistry()
>>> info = registry.get_protocol_info("0x0100")
>>> if info:
...     print(info.name)  # "L2CAP"
>>> info = registry.get_protocol_info("RFCOMM")
>>> if info:
...     print(info.uuid.short_form)  # "0003"
get_protocol_info_by_name(name: str) bluetooth_sig.types.registry.protocol_identifiers.ProtocolInfo | None

Get protocol information by name (case insensitive).

Parameters:

name – The protocol name to look up (e.g., “L2CAP”, “RFCOMM”)

Returns:

ProtocolInfo if found, None otherwise

is_known_protocol(uuid: str | bluetooth_sig.types.uuid.BluetoothUUID) bool

Check if a UUID corresponds to a known protocol.

Parameters:

uuid – The UUID to check

Returns:

True if the UUID is a known protocol, False otherwise

src.bluetooth_sig.registry.uuids.protocol_identifiers.protocol_identifiers_registry = None