dev:ath_hal_4:spectralscan

This is an old revision of the document!


Spectral Scan Support

| Driver | HAL | Supported Hardware | 802.11n support | Debugging |

The AR9280 and later NICs have the ability to report FFT data from the baseband under user-controlled conditions.

The PHY has the ability to report FFT summary information about the received wireless signal. This is useful for a variety of reasons - visualising the radio spectrum is one obvious benefit; others have used it to build interference classifiers.

It does not run in parallel with wireless transmission or reception - so either spectral scan FFT reporting can run, OR packet transmission/reception.

(TBD)

Spectral scan data is reported as a PHY error.

  • 0x5 - RADAR
  • 0x24 - RADAR, possible false, out of band or wideband signal
  • 0x26 - SPECTRAL payload

HT20:

Byte Description
0 bin -28 magnitude[7:0] = (|i| + |q|) » max_exp
1 bin -27 magnitude[7:0] = (|i| + |q|) » max_exp
2 - 53 …
54 bin 26 magnitude[7:0] = (|i| + |q|) » max_exp
55 bin 27 magnitude[7:0] = (|i| + |q|) » max_exp
56 [7:0]: all bins {max_magnitude[1:0], bitmap_weight[5:0]}
57 [7:0]: all bins max_magnitude[9:2]
58 [7:0]: all bins {max_index[5:0], max_magnitude[11:10]}
59 [3:0]: max_exp (shift amount to size max bin to 8-bit unsigned)

HT40:

0 bin -64 magnitude[7:0] = (|i| + |q|) » max_exp
1 bin -63 magnitude[7:0] = (|i| + |q|) » max_exp
2 - 125 …
126 bin 62 magnitude[7:0] = (|i| + |q|) » max_exp
127 bin 63 magnitude[7:0] = (|i| + |q|) » max_exp
128 [7:0]: lower bins {max_magnitude[1:0], bitmap_weight[5:0]}
129 [7:0]: lower bins max_magnitude[9:2]
130 [7:0]: lower bins {max_index[5:0], max_magnitude[11:10]}
131 [7:0]: upper bins {max_magnitude[1:0], bitmap_weight[5:0]}
132 [7:0]: upper bins max_magnitude[9:2]
133 [7:0]: upper bins {max_index[5:0], max_magnitude[11:10]}
134 [3:0]: max_exp (shift amount to size max bin to 8-bit unsigned)

(TBD)

  • The MAC sometimes mis-classifies these frames as data rather than PHY error payloads and helpfully “aligns” them for us. This partially corrupts one of the FFT results.
  • dev/ath_hal_4/spectralscan.1357945879.txt.gz
  • Last modified: 2013/01/11 23:11
  • by AdrianChadd