mirror of
https://github.com/google/bumble.git
synced 2026-06-01 07:37:02 +00:00
@@ -24,12 +24,11 @@ import websockets
|
||||
import json
|
||||
|
||||
from bumble.core import AdvertisingData
|
||||
from bumble.device import Device
|
||||
from bumble.device import Device, AdvertisingParameters, AdvertisingEventProperties
|
||||
from bumble.hci import (
|
||||
CodecID,
|
||||
CodingFormat,
|
||||
OwnAddressType,
|
||||
HCI_LE_Set_Extended_Advertising_Parameters_Command,
|
||||
)
|
||||
from bumble.profiles.bap import (
|
||||
CodecSpecificCapabilities,
|
||||
@@ -154,11 +153,11 @@ async def main() -> None:
|
||||
+ csis.get_advertising_data()
|
||||
)
|
||||
|
||||
await device.start_extended_advertising(
|
||||
advertising_properties=(
|
||||
HCI_LE_Set_Extended_Advertising_Parameters_Command.AdvertisingProperties.CONNECTABLE_ADVERTISING
|
||||
await device.create_advertising_set(
|
||||
advertising_parameters=AdvertisingParameters(
|
||||
advertising_event_properties=AdvertisingEventProperties(),
|
||||
own_address_type=OwnAddressType.PUBLIC,
|
||||
),
|
||||
own_address_type=OwnAddressType.PUBLIC,
|
||||
advertising_data=advertising_data,
|
||||
)
|
||||
|
||||
|
||||
+2
-4
@@ -15,13 +15,11 @@
|
||||
# -----------------------------------------------------------------------------
|
||||
# Imports
|
||||
# -----------------------------------------------------------------------------
|
||||
import asyncio
|
||||
import os
|
||||
import pytest
|
||||
import pytest_asyncio
|
||||
import logging
|
||||
|
||||
from bumble import device
|
||||
from bumble import gatt
|
||||
from bumble.profiles import vcp
|
||||
from .test_utils import TwoDevices
|
||||
|
||||
@@ -32,7 +30,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
@pytest.fixture
|
||||
@pytest_asyncio.fixture
|
||||
async def vcp_client():
|
||||
devices = TwoDevices()
|
||||
devices[0].add_service(
|
||||
|
||||
Reference in New Issue
Block a user