Commit a805b7ac authored by Yann Garcia's avatar Yann Garcia
Browse files

Enhance UT command sequence

parent 6dd3c48e
Loading
Loading
Loading
Loading
+23 −17
Changes for ttcn/AtsNGAP/NGAP_Steps.ttcn: 23 added lines, 17 removed lines.
Original line number Diff line number Diff line
@@ -592,34 +592,40 @@ module NGAP_Steps { // TODO FSCOM f_xxx_UE_SecurityMode to be mmoved into NAG_NG
            if (PICS_USE_UERANSIMU) {
                fx_ut_start_ue(PX_UE_BINARY_FILE, PX_UE_CONFIG_FILE);
            } else if (PICS_USE_AT_COMMANDS) {
                // Have the real UE (modem) register on the network and then place a data call. The
                // upper tester first waits for the modem to be attached (up to
                // PX_UT_DATA_CALL_ATTACH_TIMEOUT), which needs the registration handled from
                // f_await_registration_request below onwards, and only then dials. The request is
                // therefore sent with NO_CNF_REQUIRED: waiting for its confirmation here would
                // block the registration it depends on. The call result itself is not checked, only
                // the resulting NAS signalling is -- but the modem restart and the PLMN selection
                // ahead of it are both waited on AND their result is checked
                // (f_UT_RestartModem/f_UT_ManualPLMN_Select themselves only wait, they never inspect
                // Result -- see NGAP_UtProbe.ttcn investigation), so a genuine AT+CFUN/AT+COPS
                // failure stops here instead of silently placing the call regardless.
                // Have the real UE (modem) restart, register on the network and then place a data call.
                // None of these requests is waited on here, because each of them overlaps with NAS
                // signalling this component must serve from f_await_registration_request onwards:
                // - the modem registers by itself as soon as it has restarted, about 30 s after
                //   AT+CFUN=1,1. While this component is blocked on a confirmation, a_defaultNGAP
                //   consumes any NGAP message, so the Registration Request would be lost (the gNB
                //   then sends NGReset 5 s later). The restart is therefore sent with
                //   LOCAL_CNF_REQUIRED, i.e. confirmed as soon as the command is written to the modem;
                // - AT+COPS=1 only answers once the registration has completed, so the optional
                //   manual PLMN selection is sent with LOCAL_CNF_REQUIRED too;
                // - the upper tester only dials the data call once the modem is attached, so that
                //   request is sent with NO_CNF_REQUIRED.
                // The upper tester runs the three requests one after the other, each one starting
                // when the previous one has completed. Their actual results are only visible in the
                // upper tester log; here only the resulting NAS signalling is checked.
                var UT_COMMON_CNF v_utCnf;

                log("f_NGAP_gnb_UE_Register: Restarting the modem");
                v_utCnf := fl_UT_ApplyCommandRetCnf(utPtcMtcPort, cas_UT_Req(MODEM_RESTART, CNF_REQUIRED, {cs_Ut_Parameter_Common("CFUN", "1,1")}));
                v_utCnf := fl_UT_ApplyCommandRetCnf(utPtcMtcPort, cas_UT_Req(MODEM_RESTART, LOCAL_CNF_REQUIRED, {cs_Ut_Parameter_Common("CFUN", "1,1")}));
                if (not v_utCnf.Result) {
                    log("*** " & __SCOPE__ & ": FAIL: modem restart failed: ", v_utCnf.ResultString);
                    setverdict(fail, "*** " & __SCOPE__ & ": FAIL: modem restart failed");
                    log("*** " & __SCOPE__ & ": FAIL: modem restart could not be sent to the modem");
                    setverdict(inconc, "*** " & __SCOPE__ & ": FAIL: modem restart could not be sent to the modem");
                    return;
                }

                if (PX_UT_PLMN_MANUAL_SELECT) {
                    log("f_NGAP_gnb_UE_Register: Selecting PLMN manually: MCC=", PX_UT_PLMN_MCC, ", MNC=", PX_UT_PLMN_MNC);
                v_utCnf := fl_UT_ApplyCommandRetCnf(utPtcMtcPort, cas_UT_Req(PLMN_MANUAL, CNF_REQUIRED, cs_ManualPlmn("\"" & f_ConvertPLMNtoString(fl_NasNN_MCC2PlmnId(PX_UT_PLMN_MCC, PX_UT_PLMN_MNC)) & "\"")));
                    v_utCnf := fl_UT_ApplyCommandRetCnf(utPtcMtcPort, cas_UT_Req(PLMN_MANUAL, LOCAL_CNF_REQUIRED, cs_ManualPlmn("\"" & f_ConvertPLMNtoString(fl_NasNN_MCC2PlmnId(PX_UT_PLMN_MCC, PX_UT_PLMN_MNC)) & "\"")));
                    if (not v_utCnf.Result) {
                    log("*** " & __SCOPE__ & ": FAIL: manual PLMN selection failed: ", v_utCnf.ResultString);
                    setverdict(fail, "*** " & __SCOPE__ & ": FAIL: manual PLMN selection failed");
                        log("*** " & __SCOPE__ & ": FAIL: manual PLMN selection could not be sent to the modem");
                        setverdict(inconc, "*** " & __SCOPE__ & ": FAIL: manual PLMN selection could not be sent to the modem");
                        return;
                    }
                }

                log("f_NGAP_gnb_UE_Register: Requesting a data call: APN=", PX_UT_DATA_CALL_APN, ", attach timeout=", PX_UT_DATA_CALL_ATTACH_TIMEOUT);
                fl_UT_ApplyCommand(utPtcMtcPort, cas_UT_Req(ACTIVATE_BEARER, NO_CNF_REQUIRED, {
+5 −1
Changes for ttcn/LibNGAP/lib/LibNGAP_Pixits.ttcn: 5 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -736,7 +736,11 @@ module LibNGAP_Pixits {
    /** @desc Time, in seconds, the upper tester waits for the real UE to be attached before it dials the data call; it must cover the registration procedure */
    modulepar float      PX_UT_DATA_CALL_ATTACH_TIMEOUT := 60.0;

    /** @desc PLMN the real UE (AT commands) is manually camped on before the data call is placed; see f_NGAP_gnb_UE_Register.
    /** @desc Whether the real UE (AT commands) is forced onto PX_UT_PLMN_MCC/PX_UT_PLMN_MNC with AT+COPS after its restart; see f_NGAP_gnb_UE_Register.
     *        Not needed when the UE selects that PLMN by itself; AT+COPS then runs while the UE is already registering. */
    modulepar boolean     PX_UT_PLMN_MANUAL_SELECT := false;

    /** @desc PLMN the real UE (AT commands) is manually camped on when PX_UT_PLMN_MANUAL_SELECT is true; see f_NGAP_gnb_UE_Register.
     *        Independent from PX_NAS_MCC/PX_NAS_MNC (those are for the simulated NAS/AKA side, not the AT+COPS command). */
    modulepar NAS_Mcc     PX_UT_PLMN_MCC := '999'H;
    modulepar hexstring   PX_UT_PLMN_MNC := '40'H;