This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
dexter gerrit-no-reply at lists.osmocom.orgdexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25828 ) Change subject: BSC_Tests: set band in f_TC_fh_params_set ...................................................................... BSC_Tests: set band in f_TC_fh_params_set The function f_TC_fh_params_set sets frequency hopping parameters. The ARFCN is also part of those parameters. However, this function does not set the respective band for the ARFCN that it configurs. This results in an invalid setting at the BSC that might cause unexpected behavior. Lets make sure we configure the band parameter correctly before setting the ARFCN Change-Id: I447e4145c68c62b11b818e28f0081c19e9107647 Related: SYS#5369 --- M bsc/BSC_Tests.ttcn 1 file changed, 48 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/28/25828/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index d64ccc0..f5310a8 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -8361,7 +8361,7 @@ /* Hopping parameters per a transceiver */ private type record FHParamsTrx { - GsmArfcn arfcn, + GsmBandArfcn arfcn, FHParamsTs ts[8] }; @@ -8370,8 +8370,10 @@ runs on test_CT return FHParamsTrx { var FHParamsTrx fhp; - /* Generate a random ARFCN, including ARFCN 0 */ - fhp.arfcn := f_rnd_int(3); + /* Generate a random ARFCN in the range of 0 - 3. This ARFCN will + * fall in the GSM900 band. */ + fhp.arfcn.arfcn := f_rnd_int(3); + fhp.arfcn.pcs := false; for (var integer tn := 0; tn < 8; tn := tn + 1) { if (not match(tn, tr_tn)) { @@ -8410,7 +8412,7 @@ tr_maio_hsn := tr_HsnMaio(fhp.ts[tn].hsn, fhp.ts[tn].maio); tr_cd := tr_ChanDescH1(cd.chan_nr, tr_maio_hsn); } else { - tr_cd := tr_ChanDescH0(cd.chan_nr, fhp.arfcn); + tr_cd := tr_ChanDescH0(cd.chan_nr, fhp.arfcn.arfcn); } if (not match(cd, tr_cd)) { @@ -8455,7 +8457,7 @@ } /* Take ARFCN of the TRX itself into account */ - full_mask[fhp.arfcn] := '1'B; + full_mask[fhp.arfcn.arfcn] := '1'B; /* Compose a bit-mask for the given timeslot number */ for (var integer i := 0; i < lengthof(fhp.ts[tn].ma); i := i + 1) { @@ -8492,15 +8494,50 @@ return { len := ma_mask_len, ma := ma_mask }; } +/* Configure the appropiate band for a given arfcn, exc */ +private function f_TC_set_band_by_arfcn(integer bts_nr, GsmBandArfcn arfcn) runs on test_CT +{ + var charstring band; + + if (arfcn.arfcn >= 259 and arfcn.arfcn <= 293) { + band := "GSM450"; + } else if (arfcn.arfcn >= 306 and arfcn.arfcn <= 340) { + band := "GSM480"; + } else if (arfcn.arfcn >= 438 and arfcn.arfcn <= 511) { + band := "GSM750"; + } else if (arfcn.arfcn >= 128 and arfcn.arfcn <= 251) { + band := "GSM850"; + } else if (arfcn.arfcn >= 0 and arfcn.arfcn <= 124) { + band := "GSM900"; + } else if (arfcn.arfcn >= 955 and arfcn.arfcn <= 1023) { + band := "GSM900"; + } else if (arfcn.arfcn >= 512 and arfcn.arfcn <= 885 and arfcn.pcs == false) { + band := "DCS1800"; + } else if (arfcn.arfcn >= 512 and arfcn.arfcn <= 810 and arfcn.pcs == true) { + band := "PCS1900"; + } else { + return; + } + + f_vty_enter_cfg_bts(BSCVTY, bts_nr); + f_vty_transceive(BSCVTY, "band " & band); + f_vty_transceive(BSCVTY, "exit"); + f_vty_transceive(BSCVTY, "exit"); + f_vty_transceive(BSCVTY, "exit"); +} + /* Configure the hopping parameters in accordance with the given record */ private function f_TC_fh_params_set(in FHParamsTrx fhp, uint8_t bts_nr := 0, uint8_t trx_nr := 0) runs on test_CT { + + f_TC_set_band_by_arfcn(bts_nr, fhp.arfcn); + /* Enter the configuration node for the given BTS/TRX numbers */ f_vty_enter_cfg_trx(BSCVTY, bts_nr, trx_nr); - f_vty_transceive(BSCVTY, "arfcn " & int2str(fhp.arfcn)); + f_vty_transceive(BSCVTY, "arfcn " & int2str(fhp.arfcn.arfcn)); for (var integer tn := 0; tn < lengthof(fhp.ts); tn := tn + 1) { f_vty_transceive(BSCVTY, "timeslot " & int2str(tn)); @@ -8531,12 +8568,15 @@ private function f_TC_fh_params_unset(in FHParamsTrx fhp, uint8_t bts_nr := 0, uint8_t trx_nr := 0, - GsmArfcn arfcn := 871) + GsmBandArfcn arfcn := {pcs := false, arfcn := 871}) runs on test_CT { + + f_TC_set_band_by_arfcn(bts_nr, arfcn); + /* Enter the configuration node for the given BTS/TRX numbers */ f_vty_enter_cfg_trx(BSCVTY, bts_nr, trx_nr); - f_vty_transceive(BSCVTY, "arfcn " & int2str(arfcn)); + f_vty_transceive(BSCVTY, "arfcn " & int2str(arfcn.arfcn)); for (var integer tn := 0; tn < lengthof(fhp.ts); tn := tn + 1) { f_vty_transceive(BSCVTY, "timeslot " & int2str(tn)); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25828 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I447e4145c68c62b11b818e28f0081c19e9107647 Gerrit-Change-Number: 25828 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211019/a15e82a1/attachment.htm>