LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to get the signal quality value from the /proc/net/wireless file (https://www.linuxquestions.org/questions/linux-networking-3/how-to-get-the-signal-quality-value-from-the-proc-net-wireless-file-934061/)

boscop 03-12-2012 11:38 AM

How to get the signal quality value from the /proc/net/wireless file
 
Hi, I am writing a bash file where the signal level will trigger the handover, I want to get the signal level value or the value of the quality of the link from the /proc/net/wireless and i don't know how to do it as I need it to be able to do my project

Thanks for your help

xeleema 03-12-2012 02:57 PM

Greetingz!

Okay, this *kind* of sounds like a homework question, but I'll bite;

1) Make sure you can 'read' the file.
Code:

user@linux$ ls -l /proc/net/wireless
-r--r--r-- 1 root root 0 Mar 12 14:54 /proc/net/wireless

2) Since it's a /proc file, you're probably going to have to just 'cat' it and 'grep' for the output
Code:

user@linux$ cat /proc/net/wireless
Inter-| sta-|  Quality        |  Discarded packets              | Missed | WE
 face | tus | link level noise |  nwid  crypt  frag  retry  misc | beacon | 20

(I have no interfaces defined because I ripped-out my WiFi card).

Hint: If you already know the name of the interface, 'cat filename | awk '/iface/ {print $field#}'


All times are GMT -5. The time now is 04:15 PM.