diff --git a/panda_truth_probe.py b/panda_truth_probe.py index 5203c12..84f3470 100755 --- a/panda_truth_probe.py +++ b/panda_truth_probe.py @@ -47,12 +47,17 @@ def analyze_radiotap_info(pcapng_path, limit=100): else: print(" Estimated SNR: [incomplete data]") - channel_str = getattr(packet.radiotap, 'channel', None) - if channel_str: - try: - print(f" Channel/Frequency: {channel_str.showname_value}") - except AttributeError: - print(f" Channel/Frequency: {str(channel_str)}") + channel_field = None + try: + for field in packet.radiotap._all_fields: + if 'channel' in field.showname.lower(): + channel_field = field.showname + break + except Exception: + pass + + if channel_field: + print(f" Channel/Frequency: {channel_field}") else: print(" Channel/Frequency: [unavailable]")