# freebsd 8 ifconfig wlan0 get signal strength !



## miniqq (Feb 5, 2010)

wlan0 interface created by ath0
how to get a ap's signal strength ?
any command to do that ?
and what does 'S:N' mean give by ifconfig wlan0 list scan ?


----------



## SirDice (Feb 5, 2010)

miniqq said:
			
		

> and what does 'S:N' mean give by ifconfig wlan0 list scan ?


Signal to Noise ratio.


----------



## miniqq (Feb 5, 2010)

SirDice said:
			
		

> Signal to Noise ratio.



"Signal to Noise ratio" Does the 'Signal' means "signal strength" OR ...?


----------



## SirDice (Feb 5, 2010)

miniqq said:
			
		

> "Signal to Noise ratio" Does the 'Signal' means "signal strength" OR ...?



http://en.wikipedia.org/wiki/Signal-to-noise_ratio


----------



## fronclynne (Feb 6, 2010)

miniqq said:
			
		

> "Signal to Noise ratio" Does the 'Signal' means "signal strength" OR ...?



It's actually not expressed as a ratio in the ifconfig output.

For instance, here 
	
	



```
SSID/MESH ID    BSSID              CHAN RATE   S:N     INT CAPS
REDACTED         00:nn:nn:nn:nn:nn    6   54M -75:-96  100 EP  
redacted         00:nn:nn:nn:nn:nn   11   54M -75:-96  100 EP  
!!!!!!!!!!!      00:nn:nn:nn:nn:nn    1   54M -90:-96  100 EP   WPA
linksys          00:nn:nn:nn:nn:nn    6   54M -88:-96  100 EPS  WPA
redacted         00:nn:nn:nn:nn:nn   11   54M -92:-96  100 EPS 
linksys          00:nn:nn:nn:nn:nn    1   54M -82:-96  100 E    MESHCONF MESHCONF HTCAP WME
```
(I'm using the top line) S:N is -75:-96 where -96dBm is the background noise and -75dBm is my cruddy signal.  More about calculating here:

http://www.swisswireless.org/wlan_calc_en.html


----------



## miniqq (Feb 7, 2010)

Thank you SirDice & fronclynne .
I got it from 
http://www.shakeoffyourweight.com/d...ceTables/Converting signal strength to DB.pdf
.
But I check the source in /usr/ports/net-mgmt/wifimgr
it use (abs(signal) - abs(niose))*4 describing the signal strength.
It's more or less sketchy! I guess.


----------



## miniqq (Feb 8, 2010)

and I found (abs(signal) - abs(noise))* 4  == RSSI value


----------



## miniqq (Feb 8, 2010)

miniqq said:
			
		

> and I found (abs(signal) - abs(noise))* 4  == RSSI value



Wrong! corrected
abs(signal) - abs(noise) == RSSI (by integer)


----------



## ondra_knezour (Feb 8, 2010)

miniqq said:
			
		

> abs(signal) - abs(noise) == RSSI (by integer)



Shouldn't this be abs(noise) - abs(signal)? Consider typical values of noise about -96 dBmW and signal about -70 dBmW. In your formula you get -26, but you are looking for positive value.


----------

