Section: 5.1.5 Contention Resolution
Content: Contention Resolution is based on either C-RNTI on PDCCH of the SpCell or UE Contention Resolution Identity on DL-SCH. Once Msg3 is transmitted, the MAC entity shall: - if the UE is an NB-IoT UE, a BL UE or a UE in enhanced coverage: - if Msg3 is transmitted on a non-terrestrial network: - if, for EDT, edt-SmallTBS-Enabled is set to TRUE for the corresponding PRACH resource: - start mac-ContentionResolutionTimer and restart mac-ContentionResolutionTimer at each HARQ retransmission of the bundle in the subframe corresponding to the last subframe of a PUSCH transmission corresponding to the largest TBS indicated by the UL grant plus UE-eNB RTT. - else: - start mac-ContentionResolutionTimer and restart mac-ContentionResolutionTimer at each HARQ retransmission of the bundle in the subframe containing the last repetition of the corresponding PUSCH transmission plus UE-eNB RTT. - else: - if, for EDT, edt-SmallTBS-Enabled is set to TRUE for the corresponding PRACH resource: - start mac-ContentionResolutionTimer and restart mac-ContentionResolutionTimer at each HARQ retransmission of the bundle in the subframe corresponding to the last subframe of a PUSCH transmission corresponding to the largest TBS indicated by the UL grant. - else: - start mac-ContentionResolutionTimer and restart mac-ContentionResolutionTimer at each HARQ retransmission of the bundle in the subframe containing the last repetition of the corresponding PUSCH transmission. - else: - start mac-ContentionResolutionTimer and restart mac-ContentionResolutionTimer at each HARQ retransmission. - regardless of the possible occurrence of a measurement gap or Sidelink Discovery Gap for Reception, monitor the PDCCH until mac-ContentionResolutionTimer expires or is stopped; - if notification of a reception of a PDCCH transmission is received from lower layers, the MAC entity shall: - if the C-RNTI MAC control element was included in Msg3: - if the Random Access procedure was initiated by the MAC sublayer itself or by the RRC sublayer and the PDCCH transmission is addressed to the C-RNTI and contains an UL grant for a new transmission; or - if the Random Access procedure was initiated by a PDCCH order and the PDCCH transmission is addressed to the C-RNTI: - consider this Contention Resolution successful; - stop mac-ContentionResolutionTimer; - discard the Temporary C-RNTI; - if the UE is an NB-IoT UE: - the UL grant or DL assignment contained in the PDCCH transmission is valid only for the configured carrier (i.e. UL/DL carrier used prior to this Random Access procedure). - consider this Random Access procedure successfully completed. - else if the CCCH SDU was included in Msg3 and the PDCCH transmission is addressed to its Temporary C-RNTI: - if the MAC PDU is successfully decoded: - stop mac-ContentionResolutionTimer; - if the MAC PDU contains a UE Contention Resolution Identity MAC control element; and - if the UE Contention Resolution Identity included in the MAC control element matches the 48 first bits of the CCCH SDU transmitted in Msg3: - consider this Contention Resolution successful and finish the disassembly and demultiplexing of the MAC PDU; - set the C-RNTI to the value of the Temporary C-RNTI; - discard the Temporary C-RNTI; - consider this Random Access procedure successfully completed. - else: - discard the Temporary C-RNTI; - consider this Contention Resolution not successful and discard the successfully decoded MAC PDU. - if mac-ContentionResolutionTimer expires: - for BL UEs or UEs in CE or NB-IoT UEs: - if notification of a reception of a PDCCH transmission has been received from lower layers before mac-ContentionResolutionTimer expired; and - if the MAC PDU received until the subframe that contains the last repetition of the corresponding PDSCH transmission is successfully decoded; and - if the MAC PDU contains a UE Contention Resolution Identity MAC control element; and - if the UE Contention Resolution Identity included in the MAC control element matches the 48 first bits of the CCCH SDU transmitted in Msg3: - consider this Contention Resolution successful and finish the disassembly and demultiplexing of the MAC PDU; - set the C-RNTI to the value of the Temporary C-RNTI; - discard the Temporary C-RNTI; - consider this Random Access procedure successfully completed. - else if Msg3 was transmitted on a non-terrestrial network: - if no notification of a reception of a PDCCH transmission addressed to the Temporary C-RNTI indicating an uplink grant for a Msg3 retransmission was received after the start of the mac-ContentionResolutionTimer: - discard the Temporary C-RNTI; - consider the Contention Resolution not successful. - else: - discard the Temporary C-RNTI; - consider this Contention Resolution not successful. - except for BL UEs or UEs in CE or NB-IoT UEs: - discard the Temporary C-RNTI; - consider the Contention Resolution not successful. - if the Contention Resolution is considered not successful the MAC entity shall: - flush the HARQ buffer used for transmission of the MAC PDU in the Msg3 buffer; - if the notification of power ramping suspension has not been received from lower layers: - increment PREAMBLE_TRANSMISSION_COUNTER by 1; - if the UE is an NB-IoT UE, a BL UE or a UE in enhanced coverage: - if PREAMBLE_TRANSMISSION_COUNTER = preambleTransMax-CE + 1: - indicate a Random Access problem to upper layers; - if NB-IoT: - consider the Random Access procedure unsuccessfully completed. - else: - if PREAMBLE_TRANSMISSION_COUNTER = preambleTransMax + 1: - indicate a Random Access problem to upper layers. - based on the backoff parameter, select a random backoff time according to a uniform distribution between 0 and the Backoff Parameter Value; - delay the subsequent Random Access transmission by the backoff time; - proceed to the selection of a Random Access Resource (see clause 5.1.2).