The purpose of this tutorial is to show you how to test 2Step RACH. Since I don't have any commercial UE supporting 2 step RACH I used Amari UEsim as DUT.  I will put the test with commercial UE when I have any commercial UE supporting the feature. The regular RACH that is commonly used is 4 step RACH. Obviously 2 step RACH takes less steps to complete. It would shorten the signaling time greatly and I can even shorten the required timing for PUSCH transmission since PUSCH can be transmitted at the first step (Step 1) of the process. Overall process and Configuration of 2 Step RACH is as follows.

NR SA 2Step RACH Overview 01

Image Source : Sharetechnote  

NOTE : This feature is supported from the release 2021-12-17



Table of Contents



Test Setup


Setup A


Test setup for this tutorial is as shown below.

TestSetup Callbox UEsim 1sdr 01




Key Configuration Parameters


Followings are important configuration parameters for this tutorial. You may click on the items for the descriptions from Amarisoft documents.




Test 1 : 2 step RACH with FDD, UL MIMO 2x2

This is to show how to configure and validate the 2 step RACH in NR SA. The duplex mode configured in this test is FDD and MIMO scheme for UL is 2x2.



An important thing in using UE sim is to do proper matching between UE sim configuration and Call box configuration In this tutorial, I used the ue.default.cfg and and enb.default.cfg without any change

If you use other Network (e.g, other network simulator or real network), you have to make it sure to configure UE sim according to the settings on network side

I used ue-nr-sa-2step-rach.cfg which is copied from ue-nr-sa.cfg.

NR SA 2step RACH Test 1 Config 01

I used gnb-sa-2step-rach.cfg which is copied from gnb-sa.cfg.

NR SA 2step RACH Test 1 Config 02


Configuration for Callbox

The configuration in gnb-sa-2step-rach.cfg (Callbox) is set as follows.

NR_TDD is set to 0 which mean that FDD is used. N_ANTENNA_DL is set to 2 indicating that downlink MIMO is 2x2 and N_ANTENNA_UL is set to 2 indicating that uplink MIMO is 2x2. SRS is enabled by setting USE_SRS to 1 for proper UL MIMO.

NR SA 2step RACH Test 1 Config 03

Configure a FDD band and frequency as you desire. In this test, a frequency in band 7 (n7) is used.

NR SA 2step RACH Test 1 Config 04

Configure two_steps_prach parameter in nr_cell_default setting. The important settings you need to do in two_steps_prach configuration is shared_ro, msgA and msgB configurations. In msga_pusch parameter, you need to configure physical layer parameters for the PUSCH used for msgA.

NR SA 2step RACH Test 1 Config 05

In srs_resource configuration, n_ports is set to be same as N_ANTENNA_UL which is required for UL MIMO operation.

NR SA 2step RACH Test 1 Config 06

Also, max_rank in pusch configuration is set to be same as N_ANTENNA_UL for MIMO operation.

NR SA 2step RACH Test 1 Config 07


Configuration for UEsim

The configuration in ue-nr-sa-2step-rach.cfg  (UEsim) is set as follows.

Set N_ANTENNA_DL and N_ANTENNA_UL to be same as the settings of Callbox.  Set TDD to 0 which means FDD. Band and frequency (band, dl_nr_arfcn, subcarrier_pacing) is set to be same as the setting of callbox.

Set rx_to_tx_latency to be less than time_domain_offset of two_step_prach configuration in Callbox setting.

NR SA 2step RACH Test 1 Config 08


Perform the Test

Check out the cell configurations with 'cell phy' and 'cell' command and see if they are configured as intended.

NR SA 2step RACH Test 1 Run 01

Power on UE on UEsim with 'power on' command on UEsim(Turn on UE if you are using commercial phone) if the cell is configured as intended.

NR SA 2step RACH Test 1 Run 02

Confirm that the initial attach is established and phy data is flowing using 't' command. You cannot check anything specific about 2-step-RACH in trace log, you need to check those details in the captured protocol log.

NR SA 2step RACH Test 1 Run 03


Log Analysis

Sample Log

Check SIB1 of the cell and check if rach configuration is set as intended. You can check on these from rach-ConfigCommon. In addition, check on pusch-ConfigCommon since they will be used for both RACH procedure (msgB) and PUSCH after the RACH.

NR SA 2step RACH Test 1 Log 01

Then check on msgA configuration in SIB1. You can confirm about all the details from msgA-ConfigCommon IE.

NR SA 2step RACH Test 1 Log 02

Now check out the low layer log and see if the two step RACH really works. In this log, you see a pair of PRACH and PUSCH which corresponds to the Step 1 of the RACH procedure and then a pair of PDCCH/PDSCH which corresponds to Step 2 of the rach procedure.

NR SA 2step RACH Test 1 Log 03




RRC / NAS Signaling



: This is the SIB1 message sent by gNB  to configure parameters for NR 2 Step RACH. (NOTE : You would see some IEs that has a specific assigned vale here, but consider it as just an example value. Those values should vary depending on test requirement)


  message c1: systemInformationBlockType1: {

    cellSelectionInfo {



    cellAccessRelatedInfo {



    connEstFailureControl {



    servingCellConfigCommon {

      downlinkConfigCommon {

        frequencyInfoDL {



        initialDownlinkBWP {

          genericParameters {



          pdcch-ConfigCommon setup: {



          pdsch-ConfigCommon setup: {




        bcch-Config {



        pcch-Config {




      uplinkConfigCommon {

        frequencyInfoUL {



        initialUplinkBWP {

          genericParameters {



          rach-ConfigCommon setup: {

            rach-ConfigGeneric {

              prach-ConfigurationIndex 16,

              msg1-FDM one,

              msg1-FrequencyStart 7,

              zeroCorrelationZoneConfig 15,

              preambleReceivedTargetPower -110,

              preambleTransMax n7,

              powerRampingStep dB4,

              ra-ResponseWindow sl10


            ssb-perRACH-OccasionAndCB-PreamblesPerSSB one: n8,

            ra-ContentionResolutionTimer sf64,

            prach-RootSequenceIndex l839: 1,

            restrictedSetConfig unrestrictedSet


          pusch-ConfigCommon setup: {



          pucch-ConfigCommon setup: {



          msgA-ConfigCommon-r16 setup: {

            rach-ConfigCommonTwoStepRA-r16 {

              rach-ConfigGenericTwoStepRA-r16 {

                msgB-ResponseWindow-r16 sl40


              msgA-CB-PreamblesPerSSB-PerSharedRO-r16 16,

              msgA-RSRP-Threshold-r16 56


            msgA-PUSCH-Config-r16 {

              msgA-PUSCH-ResourceGroupA-r16 {

                msgA-MCS-r16 5,

                nrofSlotsMsgA-PUSCH-r16 1,

                nrofMsgA-PO-PerSlot-r16 one,

                msgA-PUSCH-TimeDomainOffset-r16 4,

                startSymbolAndLengthMsgA-PO-r16 27,

                mappingTypeMsgA-PUSCH-r16 typeA,

                guardBandMsgA-PUSCH-r16 0,

                frequencyStartMsgA-PUSCH-r16 7,

                nrofPRBs-PerMsgA-PO-r16 1,

                nrofMsgA-PO-FDM-r16 four,

                msgA-DMRS-Config-r16 {

                  msgA-PUSCH-NrofPorts-r16 1


                nrofDMRS-Sequences-r16 1


              msgA-TransformPrecoder-r16 disabled




        timeAlignmentTimerCommon infinity


      ssb-PositionsInBurst {

        inOneGroup '80'H




    ue-TimersAndConstants {