From: Gui Iribarren Date: Mon, 12 Aug 2013 21:41:44 -0300 Subject: [ath9k-devel] [Spectral Scan PATCH] Continuous Spectral Scan In-Reply-To: <20130726152655.06c7pv7piug0g4sc@webmail.uth.gr> References: <20130726152655.06c7pv7piug0g4sc@webmail.uth.gr> Message-ID: <520980C8.1070006@altermundi.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org On 07/26/2013 09:26 AM, hounos at uth.gr wrote: > Hello, > > I am working on the specral sensing mode of the Atheros 9380. I am using the > compat 3.9-rc4-2 driver. This driver was already pathced for the spectral scan > mode. > > I would like to perform a continuous scan, either in a channel or multiple and > gather spectrum samples in the > /sys/kernel/debug/ieee80211/phy0/ath9k/spectral_scan0 file endlessly until I > stop its operation manually. > > Looking the source code, I saw some references for the endless mode. > Theoretically as understood this function is already deployed in the driver. Yes, what was not so clear at first sight (at least for me) is that you have to issue a "trigger" to actually start getting samples (Thanks Simon for the tip ;) ) so cd /sys/kernel/debug/ieee80211/phy0/ath9k echo background > spectral_scan_ctl echo trigger > spectral_scan_ctl will fill in the spectral_scan0 file endlessly, collecting a huge number of samples per second, until any of this happens: echo disable > spectral_scan_ctl or iw wlan0 scan # i understand a scan resets the card flags in some way # or maybe it's an unexpected possibility (i.e. bug :P) or if you let it run for long enough without cat'ting spectral_scan0, it will also stop collecting samples (looks like spectral_scan0 buffer gets filled up or something) hope that helps, you can find further, more specific information here: https://wiki.freebsd.org/dev/ath_hal%284%29/SpectralScan and i'll try to update this blogpost with info about "continuous mode" blog.altermundi.net/article/playing-with-ath9k-spectral-scan/ Cheers! gui