From 225fb908545180a9bb048da2d87fad5c6dad4bb4 Mon Sep 17 00:00:00 2001 From: Yaro Kasear Date: Fri, 11 Apr 2025 10:32:26 -0500 Subject: [PATCH] Will this get me channel? --- panda_truth_probe.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/panda_truth_probe.py b/panda_truth_probe.py index b33af8c..5203c12 100755 --- a/panda_truth_probe.py +++ b/panda_truth_probe.py @@ -47,10 +47,14 @@ def analyze_radiotap_info(pcapng_path, limit=100): else: print(" Estimated SNR: [incomplete data]") - if channel: - print(f" Channel/Frequency: {channel}") + 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)}") else: - print(" Channel/Frequency: [unavailable]") + print(" Channel/Frequency: [unavailable]") if rate: print(f" Data Rate: {rate} Mbps")