Replace legacy transport and role constants

This commit is contained in:
Josh Wu
2025-04-09 17:59:01 +08:00
parent a8019a70da
commit 7569da37e4
33 changed files with 169 additions and 157 deletions
+2 -2
View File
@@ -23,7 +23,7 @@ from typing import Any, Dict
from bumble.device import Device
from bumble.transport import open_transport_or_link
from bumble.core import BT_BR_EDR_TRANSPORT
from bumble.core import PhysicalTransport
from bumble.avdtp import (
AVDTP_AUDIO_MEDIA_TYPE,
Protocol,
@@ -145,7 +145,7 @@ async def main() -> None:
target_address = sys.argv[4]
print(f'=== Connecting to {target_address}...')
connection = await device.connect(
target_address, transport=BT_BR_EDR_TRANSPORT
target_address, transport=PhysicalTransport.BR_EDR
)
print(f'=== Connected to {connection.peer_address}!')