Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'd like to write my own widget that display wireless signal strength. nm-applet displays the strength on its icon (here it's between zero and four bars, but I believe that's dependant on the GTK theme). Where does it get its data from?

share|improve this question
    
Most anything like this will be found in /proc/ - its a nice little place to poke your head in if you're feeling curious. –  new123456 Apr 19 '11 at 23:56

1 Answer 1

It'll be getting it from the same place as iwconfig:

$ iwconfig wlan0
wlan0     802.11bgn  ESSID:"Jencorp Intersplice"  Nickname:"rtl8191SEVA2"
          Mode:Managed  Frequency=2.422 GHz  Access Point: 62:91:F5:71:27:E7   
          Bit Rate=21.5 Mb/s   
          Retry:on   RTS thr:off   Fragment thr:off
          Power Management period:0us  mode:All packets received
          Link Quality=74/100  Signal level=-61 dBm  Noise level=-107 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

See the Link Quality and Signal level line?

If you want to do it lower level than calling iwconfig and parsing the output then I suggest you look at the source code to iwconfig.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.