From ea47d2d2297586f7c7c74fabf5bfa1ff292eac2d Mon Sep 17 00:00:00 2001 From: Keith Whyte Date: Fri, 22 May 2020 04:01:15 +0200 Subject: [PATCH] Add utility scripts to (un)lock RF --- modules/rhizo_base/files/bin/lock | 31 +++++++++++++++++++++++++++++ modules/rhizo_base/files/bin/unlock | 31 +++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100755 modules/rhizo_base/files/bin/lock create mode 100755 modules/rhizo_base/files/bin/unlock diff --git a/modules/rhizo_base/files/bin/lock b/modules/rhizo_base/files/bin/lock new file mode 100755 index 0000000..76dc665 --- /dev/null +++ b/modules/rhizo_base/files/bin/lock @@ -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 "#" + + + + diff --git a/modules/rhizo_base/files/bin/unlock b/modules/rhizo_base/files/bin/unlock new file mode 100755 index 0000000..f104b56 --- /dev/null +++ b/modules/rhizo_base/files/bin/unlock @@ -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 "#" + + + +