micropython / micropython/micropython-lib

Add filter options to scanning

Offen
#794 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

enhancement
Vorherrschende Sprache
Python
Sterne
2.9k
Forks
1.1k
Ø Merge
7 T. 6 Std.
Gemergte PRs (30 T.)
3

Beschreibung

This is a feature request for the aioble/low-level bluetooth libraries

The use case is a remote patient monitoring central application that needs to support a large set of personal health devices, a few of which support the BT SIG health device profiles but the vast majority of which are proprietary. The idea is to present to the user only newly discovered devices that the central understands and connect automatically to those the user has already opted to connected to. The users are not tech-savvy and know nothing about Bluetooth.

It would be advantageous (at least for these needs) if the scan results could be filtered. For example, I want to only receive connectable advertisements/scan responses that have one of a list of service UUIDs or whose name contains a certain string or whose manufacturer data contains certain sets of masked byes. IN my case I am looking for these values in the adv and or scan response.

Of course it is possible to do this filtering on the scanResults received at the application level but in a location where there are floods of advertisements coming from all kinds of junk (such as in an apartment building) the library would be able to block the unwanted material at a lower level, and depending upon the platform and BTLE chip, maybe even in hardware. This would increase efficiency.

It would also be convenient to knock off duplicates by address. Of course, that would only work if the scanner is run periodically (say for 12 seconds) and then restarted resetting the duplicate filter, otherwise a device would be permanently blocked once seen.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Es werden keine Dateien oder Tests genannt. Beginne damit, die Einstiegspunkte für aioble und das Scannen auf niedriger Bluetooth-Ebene zu finden, und prüfe, wie Scan-Ergebnisse Werbeanzeigen und Scan-Antworten bereitstellen; lege vor der Implementierung die unterstützten Filtereingaben und das Verhalten für Duplikate nach Adresse fest. Der Abschluss sollte durch Tests für die angeforderten Filter und die Semantik des Zurücksetzens von Duplikaten bei periodischen Scans nachgewiesen werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
embedded-iot
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.