From c76d9f4909a852bdd12a23e3608af18e0c32be07 Mon Sep 17 00:00:00 2001 From: jayofelony Date: Sat, 15 Jun 2024 20:02:47 +0200 Subject: [PATCH] Try to get a fix for device is busy while changing channels. Signed-off-by: jayofelony --- bin/pwnagotchi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/pwnagotchi b/bin/pwnagotchi index dc6015ad..cfafc990 100755 --- a/bin/pwnagotchi +++ b/bin/pwnagotchi @@ -60,8 +60,10 @@ def pwnagotchi_cli(): channels = agent.get_access_points_by_channel() # for each channel for ch, aps in channels: - time.sleep(0.5) - agent.set_channel(ch) + while True: + agent.set_channel(ch) + if agent.get_current_channel() == ch: + break if not agent.is_stale() and agent.any_activity(): logging.info("%d access points on channel %d" % (len(aps), ch))