diff --git a/examples/run_vcp_renderer.py b/examples/run_vcp_renderer.py index b519bb6..b695956 100644 --- a/examples/run_vcp_renderer.py +++ b/examples/run_vcp_renderer.py @@ -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, ) diff --git a/tests/vcp_test.py b/tests/vcp_test.py index 5accdc4..d45a5f5 100644 --- a/tests/vcp_test.py +++ b/tests/vcp_test.py @@ -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(