Skip to content

fix(dbus): re-surface cached BlueZ devices at scan start#83

Open
cryptomilk wants to merge 1 commit into
stoprocent:mainfrom
cryptomilk:asn-wip
Open

fix(dbus): re-surface cached BlueZ devices at scan start#83
cryptomilk wants to merge 1 commit into
stoprocent:mainfrom
cryptomilk:asn-wip

Conversation

@cryptomilk

Copy link
Copy Markdown

Matter device commissioning via matterjs-server consistently failed for the IKEA sensors (e.g. TIMMERFLOTTE) because noble never fired a discover event for it. bluetoothd had already cached the device from background scanning, so BlueZ never emitted an InterfacesAdded signal when noble started its own scan. The device was invisible to noble.

After StartDiscovery, re-read GetManagedObjects and replay _handleDeviceProps for every cached device under the adapter so they appear as discover events.

I'm not really a Javascript developer. So this works for me, not sure everything is 100% correct. I can remove the debug but I needed it to understand why devices vanished after they where detected first.

Feel free to modify the commit and push to the repo to update it. I'm currently moving to a new location so I'm mostly unavailable till next week.

Matter device commissioning via matterjs-server consistently failed for
the IKEA sensors (e.g. TIMMERFLOTTE) because noble never fired a
`discover` event for it. bluetoothd had already cached the device from
background scanning, so BlueZ never emitted an InterfacesAdded signal
when noble started its own scan. The device was invisible to noble.

After StartDiscovery, re-read GetManagedObjects and replay
_handleDeviceProps for every cached device under the adapter so they
appear as discover events.
@Apollon77

Copy link
Copy Markdown

@cryptomilk My comment would basically if these number of debug logs are missing for the final code PR ... but sure for testing they help. Could you maybe post a log with these

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants