From owner-freebsd-wireless@FreeBSD.ORG Thu Jan 31 00:19:35 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 36C52492 for ; Thu, 31 Jan 2013 00:19:35 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by mx1.freebsd.org (Postfix) with ESMTP id CF107EA9 for ; Thu, 31 Jan 2013 00:19:34 +0000 (UTC) Received: by mail-wi0-f171.google.com with SMTP id hn14so4256013wib.10 for ; Wed, 30 Jan 2013 16:19:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:date:x-google-sender-auth:message-id :subject:from:to:content-type; bh=AjdgdDgLSTlrdVlbG+ncEF8iseeM/5TvMgDzsmBZfpk=; b=ZEk0imgCe1+TeoJxGR8cCcTVwcE+vt1FK3sc462zaFlL7Mgwg/lXi0NVY+yH2ltnEv SLCu4EwZGMc0YnZXnC4BIvKFaq5A7NSoujse1RRi23VFZ79dQET28BJ0c98n2bKqHdPl uFAjEn0C0mlzSv6T1lA6dMLicGrRQZ2QhntWIIHzrHN72+bjZZNmORdYPTkZDUrURkHu 5KfKaPUpa9WQf/bHk7KncXfLXRT7PKAMRqCtKUl8nrOFBZmBZdQ2NH64VdXm7Au6i5vo Ibmh3SejjSOcMaN9ytF49zE9t/ZNo++w3BO+PTxf8r81KRJhKH/tx7pSmpFOcfqNxbH8 iUbg== MIME-Version: 1.0 X-Received: by 10.194.172.197 with SMTP id be5mr12116541wjc.20.1359591568594; Wed, 30 Jan 2013 16:19:28 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.67.6 with HTTP; Wed, 30 Jan 2013 16:19:28 -0800 (PST) Date: Wed, 30 Jan 2013 16:19:28 -0800 X-Google-Sender-Auth: yfSPjTCrxQNn__QJzyfcYO9kp7M Message-ID: Subject: howto: tinkering with spectral scan From: Adrian Chadd To: freebsd-wireless@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Jan 2013 00:19:35 -0000 Hi, Here's the 30 second rundown for spectral scan: * update to -HEAD; * "make" and "make install" in src/tools/tools/ath/; (so you get athspectral) * checkout svn://svn.freebsd.org/base/user/adrian/ath_radar_stuff; * install SDL and the SDL TTF font ports; * "make" in ath_radar_stuff/lib; * "make" in ath_radar_stuff/src/fft_eval. Now to use tinker with spectral scan parameters: * athspectral get - lists parameters * athspectral start - start a spectral scan * athspectral enable_at_reset 1|0 - enable or disable spectral scan at reset (eg during a channel change for a scan operation); To enable receiving spectral scan PHY errors: * sysctl dev.ath.X.monpass=0xff - by default PHY errors aren't passed up via BPF, this (overkill!) enables that; * ./fft_eval ar9280 if wlanX + cursor left/right scrolls; + home jumps to 2ghz; + end jumps to 5ghz; On AR9280, if you set ss_count=128, it will just keep generating results; On AR9285 and AR9287, I think ss_count=0 will keep generating results; Don't clear ss_short_rpt - it will generate corrupted FFT frames and there's no way to correct for them (which I'm not yet correcting for right now - but at least with one FFT report per PHY error I'm able to); For extra fun: * athspectral enable_at_reset 1 * ifconfig wlan0 create wlandev ath0 ssid 'foo123' up * sysctl dev.ath.0.monpass=0xff * fft_eval ar9280 if wlan0 .. and scroll around. :-) I'd love to see screenshots of various kinds of interference seen by everyone here. :) Adrian