Skip to content

Fix Matter BLE discovery from service data advertisements - #17

Open
vbondarevsky wants to merge 1 commit into
tom-code:mainfrom
vbondarevsky:main
Open

vbondarevsky wants to merge 1 commit into
tom-code:mainfrom
vbondarevsky:main

Conversation

@vbondarevsky

@vbondarevsky vbondarevsky commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Matter devices advertising UUID 0xFFF6 only through Service Data could be missed by BlueZ’s service UUID scan filter, causing BLE discovery to time out.

Changes

  • Remove the UUID scan filter from both find_by_discriminator and scan_commissionable; identify Matter devices by their Service Data.
  • Subscribe to events before starting discovery and handle ServiceDataAdvertisement alongside discovery/update events.
  • Skip individual peripheral lookup/property failures instead of aborting the entire scan.
  • Reuse an already resolved peripheral instead of looking it up again after a match.
  • Attempt to stop scanning when the search returns; log cleanup failures without masking the search or connection result.
  • Add hardware-free tests using a fake BLE backend, typed device definitions and independent raw advertisement vectors.
  • Add Linux CI coverage for the ble feature, including all-target builds.

Validation

  • 16 BLE regression tests cover matching, malformed advertisements, disappearing devices, timeout/error handling and cleanup failures.
  • Default and BLE-enabled GitHub Actions jobs pass.
  • Real BLE discovery and GATT connectivity were not validated by these tests.

This branch has not been deployed

No deployments
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.

1 participant