aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkeith <keith@rhizomatica.org>2024-03-06 13:36:55 -0600
committerkeith <keith@rhizomatica.org>2024-03-06 13:51:57 -0600
commit74f21d0d1fb7634a1741fc184871d25fc9fbe0a9 (patch)
treebb1c60dfbd224c63762e9fb69ec604c4acd35eb1
parent59ed3166dcf167a5e83385e93b02b400f01a3855 (diff)
RBS: Add easier VTY access to en/disable TXkeith/rbs_hacks
We can already do this via the 'bts 0 om2000 ...' commands, this just makes it a little more accessible. TODO: Implement this as a function of setting TRX rf_locked so that behaviour is the same as with osmo-bts type. Change-Id: I873c7f68e0ae232a696a59ab78e7d59e1da9ff43
-rw-r--r--src/osmo-bsc/abis_om2000_vty.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/osmo-bsc/abis_om2000_vty.c b/src/osmo-bsc/abis_om2000_vty.c
index 76048071a..14ac16865 100644
--- a/src/osmo-bsc/abis_om2000_vty.c
+++ b/src/osmo-bsc/abis_om2000_vty.c
@@ -152,6 +152,33 @@ DEFUN(om2k_classnum_inst, om2k_classnum_inst_cmd,
return CMD_SUCCESS;
}
+DEFUN(om2k_en_disable_tx, om2k_en_disable_tx_cmd,
+ "bts <0-255> trx <0-255> tx-mo (disable|enable)",
+ "BTS related commands\n" "BTS Number\n"
+ "TRX for manual command\n"
+ "TRX Number\n"
+ "Transmitter MO State (TX)\n"
+ "Set TX Enabled\n"
+ "Set TX Disabled\n")
+{
+ struct gsm_bts *bts;
+ int bts_nr = atoi(argv[0]);
+
+ bts = gsm_bts_num(gsmnet_from_vty(vty), bts_nr);
+ if (!bts) {
+ vty_out(vty, "%% No such BTS (%d)%s", bts_nr, VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ if (bts->type != GSM_BTS_TYPE_RBS2000) {
+ vty_out(vty, "%% BTS %d not an Ericsson RBS%s",
+ bts_nr, VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+ om2k_enable_disable_tx(bts, atoi(argv[1]), strcmp(argv[2], "disable"));
+ return CMD_SUCCESS;
+}
+
DEFUN(om2k_reset, om2k_reset_cmd,
"reset-command",
"Reset the MO\n")
@@ -800,6 +827,7 @@ int abis_om2k_vty_init(void)
install_element_ve(&show_om2k_mo_cmd);
install_element(ENABLE_NODE, &om2k_class_inst_cmd);
install_element(ENABLE_NODE, &om2k_classnum_inst_cmd);
+ install_element(ENABLE_NODE, &om2k_en_disable_tx_cmd);
install_node(&om2k_node, dummy_config_write);
install_element(OM2K_NODE, &om2k_reset_cmd);