From 6cecca67a47aa82d0693aefe6c5b5b1e482d7f16 Mon Sep 17 00:00:00 2001 From: dadav <33197631+dadav@users.noreply.github.com> Date: Fri, 18 Oct 2019 19:20:25 +0200 Subject: [PATCH] Fix str comparison and add sleep --- pwnagotchi/plugins/default/bt-tether.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pwnagotchi/plugins/default/bt-tether.py b/pwnagotchi/plugins/default/bt-tether.py index 7c919aa..e53dab5 100644 --- a/pwnagotchi/plugins/default/bt-tether.py +++ b/pwnagotchi/plugins/default/bt-tether.py @@ -132,7 +132,7 @@ class BTNap: device = ifaces.get(BTNap.IFACE_DEV) if device is None: continue - if device['Address'] == device_address and path.startswith(path_prefix): + if str(device['Address']) == device_address and path.startswith(path_prefix): obj = bus.get_object(BTNap.IFACE_BASE, path) return dbus.Interface(obj, BTNap.IFACE_DEV) raise BTError('Bluetooth device not found') @@ -245,6 +245,7 @@ class BTNap: try: dev_remote.Pair() logging.info('BT-TETHER: Successful paired with device ;)') + time.sleep(10) # wait for bnep0 except Exception: # can fail because of AlreadyExists etc. pass