legit-fork
informatic 2019-10-06 00:27:35 +02:00
parent f9829f1cea
commit c6168dd727
1 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ class BLELink(BaseLink):
def __enter__(self):
self._adapter = pygatt.BGAPIBackend()
self._adapter = pygatt.GATTToolBackend()
self._adapter.start()
return self
@ -63,7 +63,7 @@ class BLELink(BaseLink):
res = []
devices = self._adapter.scan(timeout=SCAN_TIMEOUT)
for dev in devices:
if dev['name'].startswith((u'MISc', u'NBSc')):
if dev['name'] and dev['name'].startswith((u'MISc', u'NBSc', u'JP2', u'Seg')):
res.append((dev['name'], dev['address']))
return res