Radio output powers measurement script
From wiliGear wiki
Radio output powers
For testings i have used script to read max radio txpower value. Simple upload this script to device writable directory (By example /tmp), change file mode to executable and run.
Script code:
#!/bin/sh # auto mode, according channel/country code # ifc=ath0 iwpriv $ifc mode 0 list="1 2 3 4 5 6 7 8 9 10 11 12 13 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 152 153 157 160 161 165" # # do not print anything but results to console. # dmesg -n 1 for var in $list; do ifconfig $ifc down iwconfig $ifc channel $var > /dev/null 2>&1 if [ $? -ne 0 ]; then echo "channel $var not present for current country." continue; fi ifconfig $ifc up > /dev/null 2>&1 CHANN=$(iwlist $ifc chan | grep Current | sed -e 's/[ ]*Current Frequency://') POWER=$(iwlist $ifc txpower | grep Current | sed -e 's/Current Tx-Power=//') echo $POWER $CHANN done
