aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/bs11_config.c
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2009-08-10 11:49:36 +0200
committerHarald Welte <laforge@gnumonks.org>2009-08-10 11:49:36 +0200
commit65f68fa9611c87d3bab75d5c69b45e99d6ee3eae (patch)
treefc1dafbb184d25adfbf6236c27a7e6fc85493985 /openbsc/src/bs11_config.c
parent99b4ecd78af937edffbf26d667f56d8b2350e918 (diff)
Add {create, delete}-bport1 and bport0-{star, multidrop} to bs11-config
This adds the possibility to bs11-config to add the second bport and change the line config to star or multidrop.
Diffstat (limited to 'openbsc/src/bs11_config.c')
-rw-r--r--openbsc/src/bs11_config.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/openbsc/src/bs11_config.c b/openbsc/src/bs11_config.c
index 0fb7cd7a6..3e8bf88a3 100644
--- a/openbsc/src/bs11_config.c
+++ b/openbsc/src/bs11_config.c
@@ -541,6 +541,28 @@ static int handle_state_resp(enum abis_bs11_phase state)
command = NULL;
} else if (!strcmp(command, "query")) {
cmd_query();
+ } else if (!strcmp(command, "create-bport1")) {
+ abis_nm_bs11_create_bport(g_bts, 1);
+ sleep(1);
+ abis_nm_bs11_factory_logon(g_bts, 0);
+ command = NULL;
+ } else if (!strcmp(command, "delete-bport1")) {
+ abis_nm_chg_adm_state(g_bts, NM_OC_BS11_BPORT, 1, 0xff, 0xff, NM_STATE_LOCKED);
+ sleep(1);
+ abis_nm_bs11_delete_bport(g_bts, 1);
+ sleep(1);
+ abis_nm_bs11_factory_logon(g_bts, 0);
+ command = NULL;
+ } else if (!strcmp(command, "bport0-star")) {
+ abis_nm_bs11_set_bport_line_cfg(g_bts, 0, BS11_LINE_CFG_STAR);
+ sleep(1);
+ abis_nm_bs11_factory_logon(g_bts, 0);
+ command = NULL;
+ } else if (!strcmp(command, "bport0-multidrop")) {
+ abis_nm_bs11_set_bport_line_cfg(g_bts, 0, BS11_LINE_CFG_MULTIDROP);
+ sleep(1);
+ abis_nm_bs11_factory_logon(g_bts, 0);
+ command = NULL;
}
}
break;
@@ -692,6 +714,10 @@ static void print_help(void)
printf("\tpll-e1-locked\tSet the PLL to be locked to E1 clock\n");
printf("\tpll-standalone\tSet the PLL to be in standalone mode\n");
printf("\toml-tei\tSet OML E1 TS and TEI\n");
+ printf("\tbport0-star\tSet BPORT0 line config to star\n");
+ printf("\tbport0-multiport\tSet BPORT0 line config to multiport\n");
+ printf("\tcreate-bport1\tCreate BPORT1 object\n");
+ printf("\tdelete-bport1\tDelete BPORT1 object\n");
}
static void handle_options(int argc, char **argv)