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

Review UT sequense as CFUN,1,1 trgger automatic registering

parent 42116e3b
Loading
Loading
Loading
Loading
+9 −9
Changes for etc/AtsNGAP/AtsNGAP_GNB_p_net.cfg_: 9 added lines, 9 removed lines.
Original line number Diff line number Diff line
[MODULE_PARAMETERS]
# This section shall contain the values of all parameters that are defined in your TTCN-3 modules.

LibCommon_Time.PX_TDONE                 := 150.0
LibCommon_Time.PX_TAC                   := 150.0
LibCommon_Time.PX_TNOAC                 := 50.0
LibCommon_Time.PX_TWAIT                 := 200.0
LibCommon_Sync.PX_TSYNC_TIME_LIMIT      := 200.0
LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 200.0

LibNGAP_Pixits.PX_NGAP_TWAIT            := 200.0
LibCommon_Time.PX_TDONE                 := 30.0;
LibCommon_Time.PX_TAC                   := 30.0;
LibCommon_Time.PX_TNOAC                 := 10.0;
LibCommon_Time.PX_TWAIT                 := 30.0;
LibCommon_Sync.PX_TSYNC_TIME_LIMIT      := 40.0;
LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 40.0;

LibNGAP_Pixits.PX_NGAP_TWAIT            := 40.0
LibNGAP_Pixits.PX_TIMER_T3560           := 500

NGAP_Pics.PICS_NGAP_AMF_IUT    := false
@@ -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;

# PLMN the real UE (modem) is forced onto with AT+COPS after its restart
# The real UE (modem) is taken off the network, then registers on this PLMN on demand (AT+COPS), without a restart
LibNGAP_Pixits.PX_UT_PLMN_MANUAL_SELECT := true
LibNGAP_Pixits.PX_UT_PLMN_MCC      := '999'H
LibNGAP_Pixits.PX_UT_PLMN_MNC      := '40'H
+21 −29
Changes for ttcn/AtsNGAP/NGAP_Steps.ttcn: 21 added lines, 29 removed lines.
Original line number Diff line number Diff line
@@ -592,25 +592,24 @@ 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) 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.
                // Have the real UE (modem) register on the network and then place a data call.
                // This component must not block on any of these requests: each of them overlaps with
                // NAS signalling it has to serve from f_await_registration_request onwards, and while
                // it 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 upper tester runs the 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.
                // With PX_UT_PLMN_MANUAL_SELECT, the modem is first taken off the network with
                // AT+COPS=2 (DETACH). Provided the modem keeps that setting over its restart, it then
                // stays unregistered until the manual PLMN selection, which becomes the one trigger
                // of the registration.
                // previous one has completed. So only the first request may ask for a confirmation,
                // and only a local one (LOCAL_CNF_REQUIRED: confirmed as soon as the command is written
                // 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 modem is taken off the network with AT+COPS=2
                //   (DETACH), then registers on demand on the PLMN selected with AT+COPS=1. The modem
                //   is not restarted: it does not keep AT+COPS=2 over a restart and registers by
                //   itself as soon as it is back;
                // - otherwise: the modem is restarted with AT+CFUN=1,1 and registers by itself, about
                //   30 s later, on the PLMN it selects.
                var UT_COMMON_CNF v_utCnf;

                if (PX_UT_PLMN_MANUAL_SELECT) {
@@ -621,22 +620,15 @@ module NGAP_Steps { // TODO FSCOM f_xxx_UE_SecurityMode to be mmoved into NAG_NG
                        setverdict(fail, "*** " & __SCOPE__ & ": FAIL: deregistration could not be sent to the modem");
                        return;
                    }
                }

                    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(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, 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 could not be sent to the modem");
                        setverdict(inconc, "*** " & __SCOPE__ & ": FAIL: manual PLMN selection could not be sent to the modem");
                        setverdict(fail, "*** " & __SCOPE__ & ": FAIL: modem restart could not be sent to the modem");
                        return;
                    }
                }
+3 −2
Changes for ttcn/LibNGAP/lib/LibNGAP_Pixits.ttcn: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -736,8 +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 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. */
    /** @desc How the real UE (AT commands) is made to register; see f_NGAP_gnb_UE_Register.
     *        true: it is taken off the network (AT+COPS=2), then 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. */
    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.