summaryrefslogtreecommitdiffstats
path: root/bts/BTS_Tests.ttcn
diff options
context:
space:
mode:
Diffstat (limited to 'bts/BTS_Tests.ttcn')
-rw-r--r--bts/BTS_Tests.ttcn31
1 files changed, 27 insertions, 4 deletions
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index ea75937..0b8decd 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -3769,6 +3769,31 @@ private function f_unitdata_mo(
}
}
+/* Send I-frame from MS and expect it to arrive as RLL DATA IND on Abis */
+private function f_data_mo(
+ RslLinkId link_id,
+ boolean p, uint3_t nr, uint3_t ns,
+ octetstring l3,
+ boolean exp_sacch := true, /* Should tolerate SACCH messages? */
+ boolean exp_any := true /* Should tolerate any other RSL messages? */
+) runs on ConnHdlr {
+ timer T := 3.0;
+ f_tx_lapdm(ts_LAPDm_I(link_id.sapi, cr_MO_CMD, p, nr, ns, l3), link_id);
+ T.start;
+ /* Expect RLL DATA IND on RSL side */
+ alt {
+ [] RSL.receive(tr_RSL_DATA_IND(g_chan_nr, link_id, l3)) {
+ setverdict(pass);
+ }
+ [] as_rsl_sacch_ind(exp_sacch);
+ [] as_rsl_any_ind(exp_any);
+ [] T.timeout {
+ setverdict(fail, "Timeout waiting for DATA_IND");
+ mtc.stop;
+ }
+ }
+}
+
/* Test channel activation with A5/n right from the beginning (like in assignment + hand-over) */
function f_TC_chan_act_encr(charstring id) runs on ConnHdlr {
f_l1_tune(L1CTL);
@@ -3832,10 +3857,8 @@ function f_TC_encr_cmd(charstring id) runs on ConnHdlr {
var uint8_t alg_id := f_alg_id_to_l1ctl(g_pars.encr.alg_id);
f_L1CTL_CRYPTO_REQ(L1CTL, g_pars.chan_nr, alg_id, g_pars.encr.key);
- /* send first ciphered I-frame in response */
- l3 := '0a0b0c0d'O;
- f_tx_lapdm(ts_LAPDm_I(link_id.sapi, cr_MO_CMD, true, 1, 0, l3), link_id);
- RSL.receive(tr_RSL_DATA_IND(g_chan_nr, link_id, l3));
+ /* send first ciphered I-frame in response and expect it on RSL */
+ f_data_mo(link_id, true, 1, 0, '0a0b0c0d'O, exp_sacch := true);
/* now the BTS code should have detected the first properly encrypted uplink I-frame,
* and hence enable encryption also on the downlink */