# cat blog >> /dev/brain 2> /proc/mind
cat blog >> /dev/brain 2> /proc/mind
# sakis3g disconnect Disconnected. # chat -V -s '' 'AT+CSQ' 'OK' '' > /dev/ttyUSB0 < /dev/ttyUSB0 AT+CSQ +CSQ: 19,99 OK
sakis3g disconnect
chat -V -s '' 'AT+CSQ' 'OK' '' > /dev/ttyUSB0 < /dev/ttyUSB0
# sakis3g disconnect Disconnected. # comgt -d /dev/ttyUSB0 sig Signal Quality: 19,99
comgt -d /dev/ttyUSB0 sig
# cat get_rssi #!/bin/bash ubp="/usr/bin" ulsp="/usr/local/sbin" device="/dev/ttyUSB0" output="/dev/null" $ulsp/sakis3g disconnect > $output rssi=`printf "%.f\n" $(($ubp/chat -V -s '' 'AT+CSQ' 'OK' '' > $device < $device) 2>&1 | $ubp/grep CSQ: | $ubp/awk '{print $2}')` echo "RSSI = $rssi" echo -n "Quality = " if [ $rssi -gt 25 ]; then echo "Excellent ( 25 < RSSI )" elif [ $rssi -gt 19 ] && [ $rssi -le 25 ]; then echo "Good ( 19 < RSSI <= 25 )" elif [ $rssi -gt 13 ] && [ $rssi -le 19 ]; then echo "Average ( 13 < RSSI <= 19 )" elif [ $rssi -gt 7 ] && [ $rssi -le 13 ]; then echo "Low ( 7 < RSSI <= 13 )" elif [ $rssi -gt 0 ] && [ $rssi -le 7 ]; then echo "Very low ( 0 < RSSI <= 7 )" else echo "No signal" fi $ulsp/sakis3g connect --console > $output # ./get_rssi RSSI = 20 Quality = Good ( 19 < RSSI <= 25 )
cat get_rssi
./get_rssi
Post a Comment
No comments:
Post a Comment