From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Gabriel_Tol=F3n?= Date: Thu, 25 Jul 2013 17:24:13 -0300 Subject: [ath9k-devel] Measurements with Spectral Scan in ath9k In-Reply-To: <51B5EDA6.6030009@altermundi.net> References: <20120530102533.GA28491@infinet.ru> <20120601085714.GA1205@infinet.ru> <518A905B.1050309@rempel-privat.de> <51B5EDA6.6030009@altermundi.net> Message-ID: <51F1896D.8080309@inti.gob.ar> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org Hi, I also want to thank you all for this code. It's a very useful feature! I've been playing with it to understand how it works and to compare some measurements made with a wdr3500 router, and with an RF power meter. The test consisted of a wifi card transmitting in 802.11n in different channels, using MCS7, with an output power of 0dbm for the whole 20 MHz channel (measured with the power meter), attenuated with different levels, and conducted to one of the antenna connectors of the WDR3500. Also a generator was used to transmit a non wifi signal, a carrier modulated with FM. Now, if I understood correctly how ath9k and the code for spectral scan work, when at the antenna input there's a signal with for example -60 dbm in a 20 MHz channel, the RSSI + Noise reported for that channel should equal that value. On the other hand, the values in dbm for each bin on that channel should be in average 17.48 dbm (10*log(56)) lower, because the total power is divided by the 56 bins, right? Well, for example in 2) I'd expect an RSSI + N equal to -60 dbm, and the bins more or less in the line of -77 dbm, but the actual RSSI + N is much higher, it's -32 dbm. That difference is not the same in all cases, but the RSSI always seems to be higher than expected. Also, for each channel, when increasing the singal 20 dB, the resulting RSSI + N varies much more in same cases. I know I shouldn't expect a high precision, and I really think al this is very useful even if not being an absolute reference, to make relative comparisons over time, or over frequency. But I'd like to be sure that I'm not misinterpreting the way these measurements are done, and that I'm measuring OK. So if someone have done something similar or understands better the theory involved I'd appreciate any feedback. Thanks! These are the results: 1) Channel 2, 80 dB attenuation: http://picpaste.com/ch2_att80-xGCxbMXP.png 2) Channel 2, 60 dB att: http://picpaste.com/ch2_att60-bGozXimM.png 3) Channel 2, 40 dB att: http://picpaste.com/ch2_att40-bckD2dUU.png 4) Channel 6, 80 dB att: http://picpaste.com/ch6_att80-upzGPCK8.png 5)Channel 6, 60 dB att: http://picpaste.com/ch6_att60-CYmnx77n.png 6) Channel 6, 40 dB att: http://picpaste.com/ch6_att40-MKE99zA0.png 7) Channel 10, 80 dB att: http://picpaste.com/ch10_att80-Fe1ODcmZ.png 8) Channel 10, 60 dB att: http://picpaste.com/ch10_att60-HbvPIUuw.png 9) Channel 10, 40 dB att: http://picpaste.com/ch10_att40-93rJirGQ.png Using a carrier modulated with FM, with 8.5 MHz width (17 MHz total): 10) Channel 2, 60 dB att: http://picpaste.com/ch2_att60_FM-urbCkYMf.png 11) Channel 6, 60 dB att: http://picpaste.com/ch6_att60_FM-5D9aTcJo.png 12) Channel 10, 60 dB att: http://picpaste.com/ch10_att60_FM-nZGpzKEi.png El 10/06/13 12:15, Gui Iribarren escribi?: > On 05/08/2013 07:50 PM, Oleksij Rempel wrote: >> Am 08.05.2013 18:15, schrieb Claudio: >>> Hi all, >>> first of all thank you for the code you have developed. > > Indeed, it opens the door to many interesting possibilities! > Thanks a lot Simon and Mathias for letting the genie out of the bottle, > and Adrian, Felix, Zefir for helping its way out :P > > I finally got to play with Simon's code and it works better than i expected > http://blog.altermundi.net/article/playing-with-ath9k-spectral-scan/ > >>> echo chanscan > /sys/kernel/debug/ieee80211/phy0/ath9k/spectral_scan_ctl >>> iw dev wlan0 scan >>> cat /sys/kernel/debug/ieee80211/phy0/ath9k/spectral_scan0 > /tmp/fft_resusts >>> ./fft_eval /tmp/fft_results >>> >>> On average I get 200-400 samples but sometimes I got even 7k samples, which >>> is very good. > > In my case i get a fairly constant 112 samples per "iw wlan0 scan", but > as always, YMMV. > > maybe something is triggering periodic scans on your hardware? (i.e. a > STA wifi-iface in OpenWrt does this every 2 or 3 seconds until it > associates to an AP). In that case, just idling between "cat > spectral_scan"s will increase the number of samples. > Try running "iw event" in parallel to see what's happening. > > Cheers and have spectral fun!! > > Gui > _______________________________________________ > ath9k-devel mailing list > ath9k-devel at lists.ath9k.org > https://lists.ath9k.org/mailman/listinfo/ath9k-devel >