We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7dcb774 commit 4918c64Copy full SHA for 4918c64
adafruit_ble/__init__.py
@@ -231,7 +231,13 @@ def start_scan(
231
"""
232
if not advertisement_types:
233
advertisement_types = (Advertisement,)
234
- prefixes = b"".join(adv.get_prefix_bytes() for adv in advertisement_types)
+
235
+ all_prefix_bytes = tuple(adv.get_prefix_bytes() for adv in advertisement_types)
236
237
+ # If one of the advertisement_types has no prefix restrictions, then
238
+ # no prefixes should be specified at all, so we match everything.
239
+ prefixes = b"" if b"" in all_prefix_bytes else b"".join(all_prefix_bytes)
240
241
for entry in self._adapter.start_scan(
242
prefixes=prefixes,
243
buffer_size=buffer_size,
0 commit comments