Fix connectable Bluetooth devices not being seen if the nearest scanner is non-connectable (#80388)

If we saw the non-connectable scanner advertisement first we would reject
the connectable scanner advertisement because it had worse signal strength.

In this case we need to check both
This commit is contained in:
J. Nick Koston 2022-10-17 20:13:26 -05:00 committed by GitHub
parent d38d21ab3a
commit f70f972d88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 118 additions and 13 deletions

View file

@ -116,7 +116,7 @@ async def test_diagnostics(
"timings": {},
},
"connectable_history": [],
"non_connectable_history": [],
"all_history": [],
"scanners": [
{
"adapter": "hci0",
@ -239,7 +239,30 @@ async def test_diagnostics_macos(
"time": ANY,
}
],
"non_connectable_history": [],
"all_history": [
{
"address": "44:44:33:11:23:45",
"advertisement": [
"wohand",
{"1": {"__type": "<class " "'bytes'>", "repr": "b'\\x01'"}},
{},
[],
-127,
-127,
[[]],
],
"connectable": True,
"manufacturer_data": {
"1": {"__type": "<class " "'bytes'>", "repr": "b'\\x01'"}
},
"name": "wohand",
"rssi": -127,
"service_data": {},
"service_uuids": [],
"source": "local",
"time": ANY,
}
],
"scanners": [
{
"adapter": "Core Bluetooth",