Go back –> ath10k
Atheros 802.11ac chipsets include a built-in spectral analysis feature. They have the ability to report FFT data from the baseband under software controlled conditions.
These information can be used to create an open source spectrum analyzer or interference classifier
To try it out, you can use the following commands while having an open connection (e.g. running an AP) to acquire samples for the current channel:
ip link set dev wlan0 up echo background > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl echo trigger > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl iw dev wlan0 scan echo disable > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl cat /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan0 > samples
Spectral scan configuration parameters can be read and changed /sys/kernel/debug/ieee80211/phy0/ath10k/:
Even when a count is specified, the hardware seems to send endless samples. It seems to work most of the time in VHT80 mode though, but in HT20 and HT40 the count value seems to be ignored. To reproduce this, start hostapd with the desired channel width and do:
echo 8 > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_count echo manual > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl echo trigger > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl cat /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan0 >> /tmp/fft.dump
Repeating the last line and checking the filesize will easily show whether ath10k still sends samples or not. We would expect 8 samples in this configuration.
FFT samples gathered from Atheros NICs could be drawn using userspace programs: