From c60a71ba4f8556ccdd6d439d01098834ba8c8a87 Mon Sep 17 00:00:00 2001 From: Shin'ichiro Kawasaki Date: Sat, 18 Jul 2020 16:24:57 +0900 Subject: [PATCH] BLESession: Extend scan time It was reported that the LEGO Boost brick connection needs 2 attempts. The cause could be too short scan time. Extend the scan time from 1 second to 10 seconds. Signed-off-by: Shin'ichiro Kawasaki --- scratch_link.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scratch_link.py b/scratch_link.py index 55e8df7..4ee7615 100755 --- a/scratch_link.py +++ b/scratch_link.py @@ -496,7 +496,7 @@ class BLESession(Session): if self.status == self.INITIAL and method == 'discover': scanner = Scanner() try: - devices = scanner.scan(1.0) + devices = scanner.scan(10.0) for dev in devices: if self.matches(dev, params['filters']): self.found_devices.append(dev)