diff --git a/listener.py b/listener.py index 5d3b4d4..04c30e6 100755 --- a/listener.py +++ b/listener.py @@ -128,13 +128,13 @@ def handle_packet(pkt): if mac not in aps: unlinked_candidates.add(mac) - # Track clients talking to the same AP we're connected to - if target_ap_bssid: - if a1 and a2: - if target_ap_bssid in (a1, a2): - peer = a2 if a1 == target_ap_bssid else a1 - if is_unicast(peer) and peer not in aps: - ap_clients[target_ap_bssid][peer] += 1 + # Track clients talking to any known AP + if a1 and a2: + for bssid in aps: + if bssid in (a1, a2): + peer = a2 if bssid == a1 else a1 + if is_unicast(peer): + ap_clients[bssid][peer] += 1 # === Signal strength tracking === try: