From owner-freebsd-mobile@FreeBSD.ORG Sat May 29 20:49:29 2010 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 925EE106566C for ; Sat, 29 May 2010 20:49:29 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 455D68FC14 for ; Sat, 29 May 2010 20:49:29 +0000 (UTC) Received: from Macintosh-4.local ([10.0.0.195]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id o4TKnSQL083583 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 29 May 2010 13:49:28 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <4C017DD7.5000901@freebsd.org> Date: Sat, 29 May 2010 13:49:27 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: freebsd-mobile@freebsd.org References: <4BFD9FE4.3090309@chlastak.cz> <4BFE260D.1090701@chlastak.cz> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-USENIX-Metrics: ebb.errno.com; whitelist Subject: Re: Atheros and how to convert RSSI to dBm X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 May 2010 20:49:29 -0000 On 5/27/10 1:23 AM, Rui Paulo wrote: > On 27 May 2010, at 08:58, Miroslav Chlastak wrote: > >> On 27.5.2010 02:16, Rui Paulo wrote: >>> On 26 May 2010, at 23:25, Miroslav Chlastak wrote: >>> >>> >>>> Hello, >>>> >>>> is there a way how to convert RSSI from output of "ifconfig ath0 list sta" to dBm?: >>>> >>>> [snip] >>>> >>>> ADDR AID CHAN RATE RSSI IDLE TXSEQ RXSEQ CAPS FLAG >>>> 00:4f:62:1d:d8:5d 14 9 11M 18.5 0 15932 22400 ES A >>>> >>>> [snip] >>>> >>>> I my test enviroment I use this function: >>>> noise floor + RSSI*2 = signal of client in dBm >>>> >>>> Then i get the same value as from "tcpdump -n -i ath0 -p -y IEEE802_11_RADIO": >>>> >>>> [snip] >>>> >>>> 10:41:04.746395 86402611933us tsft short preamble 58.5 Mb/s -61dB signal -98dB noise antenna 1 [0x00000012] IP 10.0.0.1.2049> 192.168.100.2.123: NTPv3, Client, length 48 >>>> >>>> [snip] >>>> >>>> >>>> Right? Or is this conversion "stupid"? Some better idea? >>>> >>>> Is there a way how to get noise floor via "ifconfig"? I get it from output of "athstats" :( >>>> >>> No, there's no way right now. >>> >>> Check this: http://lists.freebsd.org/pipermail/freebsd-stable/2006-September/028895.html >>> >>> Regards, >>> -- >>> Rui Paulo >>> >>> >>> >> >> But this mail was sent on September 2006 - it's still impossible? :( >> >> And how to do it tcpdump? >> >> tcpdump -n -i ath0 -p -y IEEE802_11_RADIO": >> >> [snip] >> >> 10:41:04.746395 86402611933us tsft short preamble 58.5 Mb/s -61dB signal -98dB noise antenna 1 [0x00000012] IP 10.0.0.1.2049> 192.168.100.2.123: NTPv3, Client, length 48 >> >> [snip] >> >> >> Signal -61dB is right signal of my connected wireless client. Tcpdump this signal "know", but system (via ifconfig) doesn't? > > Yes, that's right. The changes were not done yet to support displaying this data in ifconfig. It's not hard to change ifconfig, what's hard is changing every driver to provide useful info. ath passes this information to radiotap the same way it provides this information to athstats. I believe every driver does already report rssi in .5 dBm units but not every device exports noise floor. rssi is used by net80211 during scanning so if it's inaccurate then it can affect the scanning algorithm. Sam