Commit 7d0b8ebb authored by Yann Garcia's avatar Yann Garcia
Browse files

Enhance UT sequence (AT+COPTS=2 replaced by AT+CFUN=1)

parent d18236fa
Loading
Loading
Loading
Loading
+1 −1
Changes for etc/AtsNGAP/AtsNGAP_GNB_p_net.cfg_: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ LibNGAP_Pixits.PX_NAS_MNC := '40'H
LibNGAP_Pixits.PX_UT_PLMN_MCC      := '999'H;
LibNGAP_Pixits.PX_UT_PLMN_MNC      := '39'H;

# The real UE (modem) radio is switched off and on, then it registers on this PLMN (AT+COPS), without a restart
# After its restart, the real UE (modem) is forced onto this PLMN: AT+CFUN=1, then AT+COPS=1
LibNGAP_Pixits.PX_UT_PLMN_MANUAL_SELECT := true
LibNGAP_Pixits.PX_UT_PLMN_MCC      := '999'H
LibNGAP_Pixits.PX_UT_PLMN_MNC      := '40'H
+13 −25
Changes for ttcn/AtsNGAP/NGAP_Steps.ttcn: 13 added lines, 25 removed lines.
Original line number Diff line number Diff line
@@ -603,43 +603,31 @@ module NGAP_Steps { // TODO FSCOM f_xxx_UE_SecurityMode to be mmoved into NAG_NG
                // to the modem); a later request is only written once the previous ones are done, which
                // can be after the Registration Request. The actual results are only visible in the
                // upper tester log; here only the resulting NAS signalling is checked.
                // Two ways to trigger the registration:
                // - PX_UT_PLMN_MANUAL_SELECT: the radio of the modem is switched off (AT+CFUN=4,
                //   DEREGISTER) and on again (AT+CFUN=1, POWER_ON), and the PLMN is selected at once
                //   with AT+COPS=1, before the modem has found a cell by itself. The modem is not
                //   restarted, as it registers by itself as soon as it is back from a restart.
                //   AT+COPS=2 is not used to keep it off the network: on the RM520N-GL it makes the
                //   following AT+COPS=1 fail with "+CME ERROR: SIM failure";
                // - otherwise: the modem is restarted with AT+CFUN=1,1 and registers by itself, about
                //   30 s later, on the PLMN it selects.
                // The modem is restarted with AT+CFUN=1,1 (MODEM_RESTART); the upper tester only
                // carries on with the next request once the modem answers again, about 30 s later.
                // With PX_UT_PLMN_MANUAL_SELECT, the modem is then set to full functionality with
                // AT+CFUN=1 (POWER_ON) and the PLMN is selected with AT+COPS=1 (PLMN_MANUAL);
                // otherwise the modem registers by itself on the PLMN it selects.
                // AT+COPS=2 is not used to keep the modem off the network: on the RM520N-GL it makes
                // the following AT+COPS=1 fail with "+CME ERROR: SIM failure".
                var UT_COMMON_CNF v_utCnf;

                if (PX_UT_PLMN_MANUAL_SELECT) {
                    log("f_NGAP_gnb_UE_Register: Switching the modem radio off");
                    v_utCnf := fl_UT_ApplyCommandRetCnf(utPtcMtcPort, cas_UT_Req(DEREGISTER, LOCAL_CNF_REQUIRED));
                log("f_NGAP_gnb_UE_Register: Restarting the modem");
                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: radio off could not be sent to the modem");
                        setverdict(fail, "*** " & __SCOPE__ & ": FAIL: radio off could not be sent to the modem");
                    log("*** " & __SCOPE__ & ": FAIL: modem restart could not be sent to the modem");
                    setverdict(fail, "*** " & __SCOPE__ & ": FAIL: modem restart could not be sent to the modem");
                    return;
                }

                    log("f_NGAP_gnb_UE_Register: Switching the modem radio on");
                if (PX_UT_PLMN_MANUAL_SELECT) {
                    log("f_NGAP_gnb_UE_Register: Setting the modem to full functionality");
                    fl_UT_ApplyCommand(utPtcMtcPort, cas_UT_Req(POWER_ON, NO_CNF_REQUIRED));

                    log("f_NGAP_gnb_UE_Register: Selecting PLMN manually: MCC=", PX_UT_PLMN_MCC, ", MNC=", PX_UT_PLMN_MNC);
                    fl_UT_ApplyCommand(utPtcMtcPort, cas_UT_Req(PLMN_MANUAL, NO_CNF_REQUIRED, cs_ManualPlmn("\"" & f_ConvertPLMNtoString(fl_NasNN_MCC2PlmnId(PX_UT_PLMN_MCC, PX_UT_PLMN_MNC)) & "\"")));
                } else {
                    log("f_NGAP_gnb_UE_Register: Restarting the modem");
                    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 could not be sent to the modem");
                        setverdict(fail, "*** " & __SCOPE__ & ": FAIL: modem restart could not be sent to the modem");
                        return;
                    }
                }

                N2_gNBaMF_P.clear; // Delete any NGAP messages that may have been received before the registration request (e.g. automatic registration).

                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, {
                                                                                               cs_Ut_Parameter_Common("APN", PX_UT_DATA_CALL_APN),
+3 −3
Changes for ttcn/LibNGAP/lib/LibNGAP_Pixits.ttcn: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -736,9 +736,9 @@ 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 How the real UE (AT commands) is made to register; see f_NGAP_gnb_UE_Register.
     *        true: its radio is switched off and on (AT+CFUN=4, AT+CFUN=1), then it registers on PX_UT_PLMN_MCC/PX_UT_PLMN_MNC (AT+COPS=1), without a restart.
     *        false: it is restarted (AT+CFUN=1,1) and registers by itself on the PLMN it selects. */
    /** @desc Whether, after its restart (AT+CFUN=1,1), the real UE (AT commands) is set to full functionality (AT+CFUN=1) and
     *        forced onto PX_UT_PLMN_MCC/PX_UT_PLMN_MNC (AT+COPS=1); see f_NGAP_gnb_UE_Register.
     *        false: it is only restarted, and registers by itself on the PLMN it selects. */
    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.