Try to get a fix for device is busy while changing channels.

Signed-off-by: jayofelony <oudshoorn.jeroen@gmail.com>
This commit is contained in:
jayofelony
2024-06-15 20:02:47 +02:00
parent 69ff6cd03c
commit c76d9f4909

View File

@ -60,8 +60,10 @@ def pwnagotchi_cli():
channels = agent.get_access_points_by_channel() channels = agent.get_access_points_by_channel()
# for each channel # for each channel
for ch, aps in channels: for ch, aps in channels:
time.sleep(0.5) while True:
agent.set_channel(ch) agent.set_channel(ch)
if agent.get_current_channel() == ch:
break
if not agent.is_stale() and agent.any_activity(): if not agent.is_stale() and agent.any_activity():
logging.info("%d access points on channel %d" % (len(aps), ch)) logging.info("%d access points on channel %d" % (len(aps), ch))