Commit 42116e3b authored by Yann Garcia's avatar Yann Garcia
Browse files

Enhance UT sequence

parent 3f5dfd62
Loading
Loading
Loading
Loading
+12 −6
Changes for etc/AtsNGAP/AtsNGAP_AMF_p_net.cfg_: 12 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -3,12 +3,15 @@

# https://www.binaryhexconverter.com/hex-to-binary-converter

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      := 10.0;
LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 10.0;
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
LibNGAP_Pixits.PX_TIMER_T3560           := 500

NGAP_Pics.PICS_NGAP_AMF_IUT    := true
NGAP_Pics.PICS_NGAP_GNB_IUT    := false
@@ -18,6 +21,9 @@ LibNGAP_Pics.PICS_USE_OPEN5GS := false # true to start open5gs, false to not st

LibNGAP_Pixits.PX_NAS_MCC          := '999'H
LibNGAP_Pixits.PX_NAS_MNC          := '39'H
LibNGAP_Pixits.PX_UT_PLMN_MCC      := '999'H;
LibNGAP_Pixits.PX_UT_PLMN_MNC      := '39'H;

LibNGAP_Pixits.PX_RAN_NODE_NAME    := "gnb0012345"
LibNGAP_Pixits.PX_GNB_ID           := '00000000000000000000000000000001'B
LibNGAP_Pixits.PX_RAN_NODE_NAME    := "UERANSIM-gnb-999-70-1"
+13 −6
Changes for etc/AtsNGAP/AtsNGAP_GNB_p_net.cfg_: 13 added lines, 6 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                 := 200.0
LibCommon_Time.PX_TAC                   := 200.0
LibCommon_Time.PX_TDONE                 := 150.0
LibCommon_Time.PX_TAC                   := 150.0
LibCommon_Time.PX_TNOAC                 := 50.0
LibCommon_Time.PX_TWAIT                 := 250.0
LibCommon_Sync.PX_TSYNC_TIME_LIMIT      := 250.0
LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 250.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            := 250.0
LibNGAP_Pixits.PX_NGAP_TWAIT            := 200.0
LibNGAP_Pixits.PX_TIMER_T3560           := 500

NGAP_Pics.PICS_NGAP_AMF_IUT    := false
@@ -24,6 +24,13 @@ LibNGAP_Pics.PICS_REGISTRATION_REQUEST_WITH_NO_UE_CONTEXT_REQUEST := true # true

LibNGAP_Pixits.PX_NAS_MCC          := '999'H
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
LibNGAP_Pixits.PX_UT_PLMN_MANUAL_SELECT := true
LibNGAP_Pixits.PX_UT_PLMN_MCC      := '999'H
LibNGAP_Pixits.PX_UT_PLMN_MNC      := '40'H
LibNGAP_Pixits.PX_RAN_NODE_NAME    := "gnb0012345"
LibNGAP_Pixits.PX_GNB_ID           := '0000011000010010111001'B
LibNGAP_Pixits.PX_RAN_NODE_NAME    := "UERANSIM-gnb-999-70-1"
+17 −3
Changes for ttcn/AtsNGAP/NGAP_Steps.ttcn: 17 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -604,11 +604,25 @@ module NGAP_Steps { // TODO FSCOM f_xxx_UE_SecurityMode to be mmoved into NAG_NG
                //   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.
                // 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.
                var UT_COMMON_CNF v_utCnf;

                if (PX_UT_PLMN_MANUAL_SELECT) {
                    log("f_NGAP_gnb_UE_Register: Deregistering the modem");
                    v_utCnf := fl_UT_ApplyCommandRetCnf(utPtcMtcPort, cas_UT_Req(DETACH, LOCAL_CNF_REQUIRED));
                    if (not v_utCnf.Result) {
                        log("*** " & __SCOPE__ & ": FAIL: deregistration could not be sent to the modem");
                        setverdict(fail, "*** " & __SCOPE__ & ": FAIL: deregistration could not be sent to the modem");
                        return;
                    }
                }

                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) {
+3 −1
Changes for ttcn/LibNGAP/lib_system/LibNGAP_Functions.ttcn: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -1365,8 +1365,10 @@ module LibNGAP_Functions {
        var octetstring v_msg := bit2oct(encvalue(valueof(v_nas_message)));
        // 2. Add security if any
        var NG_SECURITY_PROTECTED_NAS_MESSAGE v_security_Protected_Nas_Message;
        // The Registration Accept is integrity protected and ciphered: TS 24.501 clause 9.3.1 keeps
        // "integrity protected with new 5G NAS security context" for the Security Mode Command only
        vc_sendNAS_PDU := f_EncodeAndCipher_NG_NasPdu_v(
                                                        tsc_SHT_IntegrityProtected_NewSecurityContext,
                                                        tsc_SHT_IntegrityProtected_Ciphered,
                                                        v_msg, 
                                                        tsc_DirectionDL,
                                                        PX_BEARER_ID,
+1 −0
Changes for upper_tester/dummy_modem.py: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ DEFAULT_SCRIPT = {
    "AT": ["OK"],
    "AT+CPIN?": ["+CPIN: READY", "OK"],
    "AT+CFUN=4": ["OK"],
    "AT+COPS=2": ["OK"],
    "AT+CGATT=1": ["OK"],
    "AT+CGATT=0": ["OK"],
    'AT+CGDCONT=1,"IPV4V6","ims"': ["OK"],
Loading