Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ test = [
"pytest>=8.2.1,<9.0.0",
"pytest-asyncio>=1.2.0,<2.0.0",
"pytest-cov>=7.0.0,<8.0.0",
"bumble==0.0.220",
"bumble==0.0.226",
]
dev = [
{ include-group = "docs" },
Expand Down
19 changes: 6 additions & 13 deletions tests/integration/bluez_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import logging
from typing import AsyncGenerator

from bumble import hci
from bumble.controller import Controller
from bumble.link import LocalLink
from bumble.transport import open_transport
Expand Down Expand Up @@ -123,12 +124,6 @@ def _on_interfaces_added(message: Message):
bus.remove_message_handler(_on_interfaces_added)


def _clear_bit(flags: bytes, bit_pos: int) -> bytes:
int_flags = int.from_bytes(flags, byteorder="little")
int_flags &= ~(1 << bit_pos)
return int_flags.to_bytes(len(flags), byteorder="little")


@contextlib.asynccontextmanager
async def open_bluez_bluetooth_controller_link(
hci_transport_name: str,
Expand All @@ -151,7 +146,9 @@ async def open_bluez_bluetooth_controller_link(
host_sink=hci_transport.sink,
link=link,
)
bluez_controller.manufacturer_name = BLEAK_TEST_MANUFACTURER_ID
bluez_controller.manufacturer_company_identifier = (
BLEAK_TEST_MANUFACTURER_ID
)

# HACK: Work around Bumble missing feature combined with Linux kernel
# requirement. https://github.com/google/bumble/issues/841
Expand All @@ -175,12 +172,8 @@ async def open_bluez_bluetooth_controller_link(
# Extended Advertising features in the BlueZ controller.
#
# Ideally, this should be fixed in Bumble.

bluez_controller.le_features = _clear_bit(
bluez_controller.le_features, 6 # LL Privacy
)
bluez_controller.le_features = _clear_bit(
bluez_controller.le_features, 12 # Extended Advertising
bluez_controller.le_features &= ~(
hci.LeFeatureMask.LL_PRIVACY | hci.LeFeatureMask.LE_EXTENDED_ADVERTISING
)

# Wait up to 5 seconds for the new adapter to appear via InterfacesAdded
Expand Down
13 changes: 7 additions & 6 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading