Add utility scripts to (un)lock RF
This commit is contained in:
parent
ea3e00ee8e
commit
ea47d2d229
2 changed files with 62 additions and 0 deletions
31
modules/rhizo_base/files/bin/lock
Executable file
31
modules/rhizo_base/files/bin/lock
Executable file
|
@ -0,0 +1,31 @@
|
||||||
|
#!/usr/bin/expect -f
|
||||||
|
|
||||||
|
set bts [lindex $argv 0]
|
||||||
|
if { $bts < 0 } { set bts 0 }
|
||||||
|
|
||||||
|
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 "rf_locked 1\r"
|
||||||
|
expect "#"
|
||||||
|
send "exit\r"
|
||||||
|
expect "#"
|
||||||
|
send "exit\r"
|
||||||
|
expect "#"
|
||||||
|
send "exit\r"
|
||||||
|
expect "#"
|
||||||
|
send "exit\r"
|
||||||
|
expect "#"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
31
modules/rhizo_base/files/bin/unlock
Executable file
31
modules/rhizo_base/files/bin/unlock
Executable file
|
@ -0,0 +1,31 @@
|
||||||
|
#!/usr/bin/expect -f
|
||||||
|
|
||||||
|
set bts [lindex $argv 0]
|
||||||
|
if { $bts < 0 } { set bts 0 }
|
||||||
|
|
||||||
|
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 "rf_locked 0\r"
|
||||||
|
expect "#"
|
||||||
|
send "exit\r"
|
||||||
|
expect "#"
|
||||||
|
send "exit\r"
|
||||||
|
expect "#"
|
||||||
|
send "exit\r"
|
||||||
|
expect "#"
|
||||||
|
send "exit\r"
|
||||||
|
expect "#"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue