how to get the wifi signal strength by using linux command in c language?
i want to get the wireless signal strength value to do my project.
and i found that linux command iwconfig can show the value.
in c language, i use the system() call, but it returns only value 0 or 1 to indicate whether the command is successfully executed or not.
the command i use is,
int i = system(iwconfig $_|grep Signal|cut -d"=" -f3|cut -d" " -f1);
although it will print out the value, but the value of i=0 which indicates the command is successfully being executed.
Now the problem is i can't manipulate the value it print out.
so does anyone can help me to figure out how to get the value?
thanks a lot.