Add shell func to modify bts max_power_red

This commit is contained in:
Keith Whyte 2021-06-02 20:26:35 +02:00
parent 79c4da8bd0
commit e765806d65

View file

@ -164,3 +164,17 @@ unlock () {
send "network\r"; expect "#"; send "bts $bts\r"; expect "#"; send "trx 0\r"; expect "#"; send "rf_locked 0\r"; 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 "#"'; 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 "#"'