From owner-freebsd-stable@FreeBSD.ORG Wed Sep 27 21:29:14 2006 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ECC8616A47E for ; Wed, 27 Sep 2006 21:29:14 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 04A1B43D62 for ; Wed, 27 Sep 2006 21:27:19 +0000 (GMT) (envelope-from sam@errno.com) Received: from [10.0.0.199] ([10.0.0.199]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id k8RLR2Q8083165 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 27 Sep 2006 14:27:02 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <451AECA0.7000103@errno.com> Date: Wed, 27 Sep 2006 14:26:56 -0700 From: Sam Leffler Organization: Errno Consulting User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) MIME-Version: 1.0 To: Eduardo Meyer References: In-Reply-To: X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: stable@freebsd.org Subject: Re: 802.11 RSSI value displayed from ifconfig(8) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Sep 2006 21:29:15 -0000 Eduardo Meyer wrote: > Hello, I would like to convert RSSI to dBm (in fact I would love if > ifconfig cound display SNR in dBM), so I would like to know if this > formula is any right: > > /* Calculate the RSSI Value */ > V_RSSI = 3.0 * (RSSI_VAL/1024); > RSSI_dBM = (int8_t) ((-50.0 * V_RSSI) - 45.5); > > And if there are any other tools which can help me finding out signal > stenght, when I am acting as an access point. ifconfig reports rssi as whatever the driver provided. The intent is that it be a signed value relative to the current noise floor (both in dBm). If you look at the output of wlanstats (tools/tools/net80211/wlanstats) or, for ath devices, athstats (tools/tools/ath/athstats) you will see the default displays show "signal" which is rssi+noise-floor in dBm. The main issue(s) right now are that the net80211-driver api does not pass noise floor up so it can be reported to user apps and drivers reports rssi+nf in varying units. athstats doesn't have that issue since it queries the driver directly (hence it's display has a reasonable noise floor). It's on my todo list to push signal-related data up properly and fix ifconfig so it displays a proper signal strength in the normal status display. The issue of units is more difficult as converting data for some devices to dBm can be tricky. Sam