aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-09-05 14:17:54 +0200
committerlaforge <laforge@gnumonks.org>2019-09-06 09:59:31 +0000
commit11b734cb10a471d6d6b4c0f69af841043be89e6d (patch)
treec6e772c0ef3322ecd7d9d2b3356d5ffbbc7990a4
parente1c00f022d7b703c86194b54435c9622f104f8aa (diff)
bts: Test if BTS forwards ETWS Primary Notification to PCU
All MS/UE must be notified of ETWS Primary Notifiations. Depending on their state, the notification goes different paths: * CS dedicated mode: BSC sends it as L3 message over LAPDm / DCCH * CS/PS idle mode: BTS sends paging messages on PCH * PS TBF active: PCU send Packet Application Info This tests the last of the three methods by checking that a ETWS Primary Notification sent on RSL to the BTS is received by the PCU socket. Change-Id: I2661df7f7d870a0ac1c89bb8a85df81644b00b0a Related: OS#4047, OS#4048 Depends: osmo-bts Ic0b3f38b400a0ca7e4089061ceb6548b0695faa6
-rw-r--r--bts/BTS_Tests_SMSCB.ttcn30
-rw-r--r--library/PCUIF_Types.ttcn44
2 files changed, 72 insertions, 2 deletions
diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn
index 49416c24..292205a7 100644
--- a/bts/BTS_Tests_SMSCB.ttcn
+++ b/bts/BTS_Tests_SMSCB.ttcn
@@ -26,6 +26,9 @@ import from GSM_RR_Types all;
import from RSL_Types all;
+import from PCUIF_Types all;
+import from PCUIF_CodecPort all;
+
import from Osmocom_VTY_Functions all;
import from BTS_Tests all;
@@ -1046,6 +1049,32 @@ testcase TC_etws_p1ro_end() runs on test_CT {
}
}
+/* Ensure ETWS Primary Notification is passed from RSL to PCU interface */
+testcase TC_etws_pcu() runs on test_CT {
+ timer T := 10.0;
+
+ f_init();
+ f_init_l1ctl();
+ f_l1_tune(L1CTL, ccch_mode := CCCH_MODE_COMBINED_CBCH);
+
+ RSL_CCHAN.send(ts_RSL_UD(ts_RSL_OSMO_ETWS_CMD(c_etws)));
+
+ T.start;
+ alt {
+ [] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_APP_INFO_REQ(0, 0, c_etws))) {
+ setverdict(pass);
+ }
+ [] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_APP_INFO_REQ(?, ?, ?))) {
+ setverdict(fail, "PCU socket received invalid APP INFO");
+ }
+ [] PCU.receive { repeat; }
+ [] T.timeout {
+ setverdict(fail, "PCU socket timeout receiving APP INFO (ETWS)");
+ }
+ }
+}
+
+
/* SMSCB TODO:
* multiple SMS BC CMD at the same time: Ensure all of them are sent exactly once
@@ -1083,6 +1112,7 @@ control {
execute( TC_etws_p1ro() );
execute( TC_etws_p1ro_end() );
+ execute( TC_etws_pcu() );
}
diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn
index 551081b1..721eb649 100644
--- a/library/PCUIF_Types.ttcn
+++ b/library/PCUIF_Types.ttcn
@@ -22,6 +22,7 @@ type enumerated PCUIF_MsgType {
PCU_IF_MSG_DATA_CNF ('01'O),
PCU_IF_MSG_DATA_IND ('02'O),
PCU_IF_MSG_SUSP_REQ ('03'O),
+ PCU_IF_MSG_APP_INFO_REQ ('04'O),
PCU_IF_MSG_RTS_REQ ('10'O),
PCU_IF_MSG_DATA_CNF_DT ('11'O),
PCU_IF_MSG_RACH_IND ('22'O),
@@ -203,6 +204,14 @@ type record PCUIF_pag_req {
OCT9 identity_lv
} with { variant "" };
+type record PCUIF_app_info_req {
+ uint8_t application_type,
+ uint8_t len,
+ octetstring data
+} with {
+ variant (len) "LENGTHTO(data)"
+}
+
type record PCUIF_susp_req {
OCT4 tlli,
OCT6 ra_id,
@@ -224,7 +233,8 @@ type union PCUIF_MsgUnion {
PCUIF_info_ind info_ind,
PCUIF_act_req act_req,
PCUIF_time_ind time_ind,
- PCUIF_pag_req pag_req
+ PCUIF_pag_req pag_req,
+ PCUIF_app_info_req app_info_req
} with { variant "" };
type record PCUIF_Message {
@@ -244,7 +254,8 @@ type record PCUIF_Message {
info_ind, msg_type = PCU_IF_MSG_INFO_IND;
act_req, msg_type = PCU_IF_MSG_ACT_REQ;
time_ind, msg_type = PCU_IF_MSG_TIME_IND;
- pag_req, msg_type = PCU_IF_MSG_PAG_REQ)"
+ pag_req, msg_type = PCU_IF_MSG_PAG_REQ;
+ app_info_req, msg_type = PCU_IF_MSG_APP_INFO_REQ)"
variant "PADDING(1696)" /* 212 * 8 */
};
@@ -817,5 +828,34 @@ template PCUIF_Message tr_PCUIF_SUSP_REQ(template uint8_t bts_nr,
}
}
+template (value) PCUIF_Message ts_PCUIF_APP_INFO_REQ(template (value) uint8_t bts_nr,
+ template (value) uint8_t app_type,
+ template (value) octetstring app_data) := {
+ msg_type := PCU_IF_MSG_APP_INFO_REQ,
+ bts_nr := bts_nr,
+ spare := '0000'O,
+ u := {
+ app_info_req := {
+ application_type := app_type,
+ len := 0, /* overwritten */
+ data := app_data
+ }
+ }
+}
+template (present) PCUIF_Message tr_PCUIF_APP_INFO_REQ(template (present) uint8_t bts_nr,
+ template (present) uint8_t app_type,
+ template (present) octetstring app_data) := {
+ msg_type := PCU_IF_MSG_APP_INFO_REQ,
+ bts_nr := bts_nr,
+ spare := '0000'O,
+ u := {
+ app_info_req := {
+ application_type := app_type,
+ len := ?,
+ data := app_data
+ }
+ }
+}
+
} with { encode "RAW" variant "BYTEORDER(first)" };