diff --git a/modules/rhizo_base/templates/rccn-functions.sh.erb b/modules/rhizo_base/templates/rccn-functions.sh.erb index 5833ae8..cda34b2 100644 --- a/modules/rhizo_base/templates/rccn-functions.sh.erb +++ b/modules/rhizo_base/templates/rccn-functions.sh.erb @@ -164,3 +164,17 @@ unlock () { send "network\r"; expect "#"; send "bts $bts\r"; expect "#"; send "trx 0\r"; expect "#"; send "rf_locked 0\r"; expect "#"; send "exit\r"; expect "#"; send "exit\r"; expect "#"; send "exit\r"; expect "#"; send "exit\r"; expect "#"'; } + +red () +{ + if [ "$1" == "" ]; then + echo "BTS #?"; + return; + fi; + if [ "$2" == "" ]; then + echo "Power Reduction?"; + return; + fi; + expect -c 'set bts '$1'; set red '$2'; spawn telnet localhost 4242; expect ">"; send "enable\r"; expect "#"; send "configure terminal\r"; expect "#"; + send "network\r"; expect "#"; send "bts $bts\r"; expect "#"; send "trx 0\r"; expect "#"; send "max_power_red $red\r"; + expect "#"; send "exit\r"; expect "#"; send "exit\r"; expect "#"; send "exit\r"; expect "#"; send "exit\r"; expect "#"'