pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/39290?usp=email )
Change subject: nokia_site: introduce hopping control for Nokia *Site ......................................................................
nokia_site: introduce hopping control for Nokia *Site
nokia_site hopping-mode baseband nokia_site hopping-mode synthesizer
Signed-off-by: csaba.sipos metro4@freemail.hu Change-Id: Idb1d269d2ee80d72ede2394125e8acedf0ee8b06 --- A doc/examples/osmo-bsc/nokia/osmo-bsc.metrosite.RF-hopping.2TRX.cfg M include/osmocom/bsc/bts.h M src/osmo-bsc/bts_nokia_site.c M src/osmo-bsc/bts_vty.c 4 files changed, 219 insertions(+), 6 deletions(-)
Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved fixeria: Looks good to me, but someone else must approve
diff --git a/doc/examples/osmo-bsc/nokia/osmo-bsc.metrosite.RF-hopping.2TRX.cfg b/doc/examples/osmo-bsc/nokia/osmo-bsc.metrosite.RF-hopping.2TRX.cfg new file mode 100644 index 0000000..ba17670 --- /dev/null +++ b/doc/examples/osmo-bsc/nokia/osmo-bsc.metrosite.RF-hopping.2TRX.cfg @@ -0,0 +1,160 @@ +! +! OpenBSC configuration saved from vty +! ! +password foo +! +line vty + no login +! +log stderr + logging timestamp 1 + logging filter all 1 + logging color 1 + logging print category-hex 0 + logging print category 1 + logging print file 1 + logging level llapd notice + logging level nm debug + logging level linp debug + logging level lmgcp notice +e1_input + e1_line 0 driver dahdi + e1_line 0 port 0 +network + network country code 1 + mobile network code 1 + timer t3101 10 + timer t3113 60 + mgw 0 + remote-ip 127.0.0.1 + remote-port 2427 + local-port 2727 + bts 0 + type nokia_site + band GSM1800 + cell_identity 1 + location_area_code 0x0001 + base_station_id_code 63 + training_sequence_code 7 + nokia_site skip-reset 0 + nokia_site no-local-rel-conf 1 + nokia_site bts-reset-timer 30 + nokia_site hopping-mode synthesizer + codec-support fr + neighbor-list mode automatic + + oml e1 line 0 timeslot 1 sub-slot full + oml e1 tei 1 + + trx 0 + arfcn 885 + max_power_red 20 + rsl e1 line 0 timeslot 2 sub-slot full + rsl e1 tei 1 + timeslot 0 + phys_chan_config CCCH+SDCCH4 + hopping enabled 0 + e1 line 0 timeslot 6 sub-slot 0 + timeslot 1 + phys_chan_config SDCCH8 + hopping enabled 0 + e1 line 0 timeslot 6 sub-slot 1 + timeslot 2 + phys_chan_config SDCCH8 + hopping enabled 0 + e1 line 0 timeslot 6 sub-slot 2 + timeslot 3 + phys_chan_config SDCCH8 + hopping enabled 0 + e1 line 0 timeslot 6 sub-slot 3 + timeslot 4 + phys_chan_config SDCCH8 + hopping enabled 0 + e1 line 0 timeslot 7 sub-slot 0 + timeslot 5 + phys_chan_config SDCCH8 + hopping enabled 0 + e1 line 0 timeslot 7 sub-slot 1 + timeslot 6 + phys_chan_config SDCCH8 + hopping enabled 0 + e1 line 0 timeslot 7 sub-slot 2 + timeslot 7 + phys_chan_config SDCCH8 + hopping enabled 0 + e1 line 0 timeslot 7 sub-slot 3 + + trx 1 + arfcn 883 + max_power_red 20 + rsl e1 line 0 timeslot 3 sub-slot full + rsl e1 tei 2 + timeslot 0 + phys_chan_config TCH/F + hopping enabled 1 + hopping sequence-number 0 + hopping maio 0 + hopping arfcn add 882 + hopping arfcn add 883 + e1 line 0 timeslot 8 sub-slot 0 + timeslot 1 + phys_chan_config TCH/F + hopping enabled 1 + hopping sequence-number 0 + hopping maio 0 + hopping arfcn add 882 + hopping arfcn add 883 + e1 line 0 timeslot 8 sub-slot 1 + timeslot 2 + phys_chan_config TCH/F + hopping enabled 1 + hopping sequence-number 0 + hopping maio 0 + hopping arfcn add 882 + hopping arfcn add 883 + e1 line 0 timeslot 8 sub-slot 2 + timeslot 3 + phys_chan_config TCH/F + hopping enabled 1 + hopping sequence-number 0 + hopping maio 0 + hopping arfcn add 882 + hopping arfcn add 883 + e1 line 0 timeslot 8 sub-slot 3 + timeslot 4 + phys_chan_config TCH/F + hopping enabled 1 + hopping sequence-number 0 + hopping maio 0 + hopping arfcn add 882 + hopping arfcn add 883 + e1 line 0 timeslot 9 sub-slot 0 + timeslot 5 + phys_chan_config TCH/F + hopping enabled 1 + hopping sequence-number 0 + hopping maio 0 + hopping arfcn add 882 + hopping arfcn add 883 + e1 line 0 timeslot 9 sub-slot 1 + timeslot 6 + phys_chan_config TCH/F + hopping enabled 1 + hopping sequence-number 0 + hopping maio 0 + hopping arfcn add 882 + hopping arfcn add 883 + e1 line 0 timeslot 9 sub-slot 2 + timeslot 7 + phys_chan_config TCH/F + hopping enabled 1 + hopping sequence-number 0 + hopping maio 0 + hopping arfcn add 882 + hopping arfcn add 883 + e1 line 0 timeslot 9 sub-slot 3 + +cs7 instance 0 + point-code 1.23.3 +msc 0 + diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h index 248c746..0264dcf 100644 --- a/include/osmocom/bsc/bts.h +++ b/include/osmocom/bsc/bts.h @@ -488,7 +488,8 @@ no_loc_rel_cnf:1, /* don't wait for RSL REL CONF */ bts_reset_timer_cnf, /* timer for BTS RESET */ did_reset:1, /* we received a RESET ACK */ - wait_reset:2; /* we are waiting for reset to complete */ + wait_reset:2, /* we are waiting for reset to complete */ + hopping_mode:1; /* hopping type selection for Nokia */ struct osmo_timer_list reset_timer; } nokia; }; diff --git a/src/osmo-bsc/bts_nokia_site.c b/src/osmo-bsc/bts_nokia_site.c index 14d4388..256b49f 100644 --- a/src/osmo-bsc/bts_nokia_site.c +++ b/src/osmo-bsc/bts_nokia_site.c @@ -1102,7 +1102,7 @@ */
static int make_bts_config(struct gsm_bts *bts, uint8_t bts_type, int n_trx, uint8_t * fu_config, - int need_hopping) + int need_hopping, int hopping_type) { /* is it an InSite BTS ? */ if (bts_type == 0x0E || bts_type == 0x0F || bts_type == 0x10) { /* TODO */ @@ -1132,9 +1132,24 @@ len += (sizeof(bts_config_1) + (n_trx - 1));
memcpy(fu_config + len, bts_config_2, sizeof(bts_config_2)); - /* set hopping mode (Baseband and RF hopping work for the MetroSite) */ - if (need_hopping) - fu_config[len + 2 + 1] = 1; /* 0: no hopping, 1: Baseband hopping, 2: RF hopping */ + /* set hopping mode */ + if (need_hopping) { + switch (hopping_type) { + /* 0: no hopping, 1: Baseband hopping, 2: RF hopping */ + case 0: + LOG_BTS(bts, DNM, LOGL_INFO, "Baseband hopping selected!\n"); + fu_config[len + 2 + 1] = 1; + break; + case 1: + LOG_BTS(bts, DNM, LOGL_INFO, "Synthesizer (RF) hopping selected!\n"); + fu_config[len + 2 + 1] = 2; + break; + default: + LOG_BTS(bts, DNM, LOGL_INFO, "No hopping is selected!\n"); + fu_config[len + 2 + 1] = 0; + break; + } + } len += sizeof(bts_config_2);
/* set extended cell radius for each TRX */ @@ -1381,6 +1396,9 @@ int ret; int hopping = 0; int need_hopping = 0; + int hopping_type = 0; + + hopping_type = bts->nokia.hopping_mode;
memset(config, 0, sizeof(config));
@@ -1407,7 +1425,7 @@ idx++; }
- ret = make_bts_config(bts, bts_type, idx, config + len, need_hopping); + ret = make_bts_config(bts, bts_type, idx, config + len, need_hopping, hopping_type); len += ret;
#if 0 /* debugging */ diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c index f6ee514..1babd4d 100644 --- a/src/osmo-bsc/bts_vty.c +++ b/src/osmo-bsc/bts_vty.c @@ -91,6 +91,12 @@ { 0, NULL } };
+static const struct value_string nokia_hopping_mode_strs[] = { + { 0, "baseband" }, + { 1, "synthesizer" }, + { 0, NULL } +}; + static struct cmd_node bts_node = { BTS_NODE, "%s(config-net-bts)# ", @@ -464,6 +470,31 @@
return CMD_SUCCESS; } + +DEFUN_USRATTR(cfg_bts_nokia_site_hopping_mode, + cfg_bts_nokia_site_hopping_mode_cmd, + X(BSC_VTY_ATTR_RESTART_ABIS_OML_LINK), + "nokia_site hopping-mode (baseband|synthesizer)", + NOKIA_STR + "Sets the hopping type for Nokia *Site\n" + "Baseband (BB) hopping\n" + "Synthesizer (RF) hopping\n") +{ + struct gsm_bts *bts = vty->index; + + if (!is_nokia_bts(bts)) { + vty_out(vty, "%% BTS is not of Nokia *Site type%s", VTY_NEWLINE); + return CMD_WARNING; + } + + if (!strcmp(argv[0], "baseband")) + bts->nokia.hopping_mode = 0; + else + bts->nokia.hopping_mode = 1; + + return CMD_SUCCESS; +} + #define OML_STR "Organization & Maintenance Link\n" #define IPA_STR "A-bis/IP Specific Options\n"
@@ -4700,6 +4731,8 @@ vty_out(vty, " nokia_site no-local-rel-conf %d%s", bts->nokia.no_loc_rel_cnf, VTY_NEWLINE); vty_out(vty, " nokia_site bts-reset-timer %d%s", bts->nokia.bts_reset_timer_cnf, VTY_NEWLINE); + vty_out(vty, " nokia_site hopping-mode %s%s", get_value_string(nokia_hopping_mode_strs, bts->nokia.hopping_mode), VTY_NEWLINE); + /* fall through: Nokia requires "oml e1" parameters also */ default: config_write_e1_link(vty, &bts->oml_e1_link, " oml "); @@ -4926,6 +4959,7 @@ install_element(BTS_NODE, &cfg_bts_nokia_site_skip_reset_cmd); install_element(BTS_NODE, &cfg_bts_nokia_site_no_loc_rel_cnf_cmd); install_element(BTS_NODE, &cfg_bts_nokia_site_bts_reset_timer_cnf_cmd); + install_element(BTS_NODE, &cfg_bts_nokia_site_hopping_mode_cmd); install_element(BTS_NODE, &cfg_bts_stream_id_cmd); install_element(BTS_NODE, &cfg_bts_deprecated_stream_id_cmd); install_element(BTS_NODE, &cfg_bts_oml_e1_cmd);