Skip to content

Commit 49e0428

Browse files
committed
discovery now done explicitly
1 parent f38c77c commit 49e0428

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

adafruit_ble/uart_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ def connect(self, address, timeout):
7070
:param float/int timeout: Try to connect for ``timeout`` seconds.
7171
Not related to the timeout passed to ``UARTClient()``.
7272
"""
73-
self._central.connect(address, timeout, service_uuids_whitelist=(NUS_SERVICE_UUID,))
73+
self._central.connect(address, timeout)
74+
# Restrict discovery to NUS service only.
75+
self._central.discover_remote_services((NUS_SERVICE_UUID,))
7476

7577
# Connect succeeded. Get the remote characteristics we need, which were
7678
# found during discovery.

0 commit comments

Comments
 (0)