Ignore BLE advertisements without a name
This commit is contained in:
@@ -19,6 +19,9 @@ ble = BLERadio()
|
||||
def scan():
|
||||
logging.info('Disconnected, scanning')
|
||||
for advertisement in ble.start_scan(ProvideServicesAdvertisement, timeout=1):
|
||||
if not advertisement.complete_name:
|
||||
continue
|
||||
|
||||
if not advertisement.complete_name.startswith('Feather'):
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user