- DU_LOG("\nDEBUG --> PHY_STUB: Forming MSG5 PDU");
- uint8_t msg5PduLen = 33;
- /* For RRC setup complete
- MAC subheader format is R/F/LCId/L (2/3 bytes)
- LCId is 1 for SRB1
- L is length of PDU i.e 6bytes here
- From 38.321 section 6.1.1
- */
- uint8_t msg5[] = {1, msg5PduLen, 0, 0, 16, 0, 5, 223, 128, 16, 94, \
- 64, 3, 64, 68, 252, 97, 0, 0, 0, 0, 4, 0, 0, 4, 68, 11, 128, \
- 184, 56, 0, 0, 0, 0, 0};
-
- msg5PduLen += 2; /* 2bytes of header */
- memcpy(pdu, &msg5, msg5PduLen);
- byteIdx += msg5PduLen; /* 2 bytes of header */
- break;
+ /* For RRC setup complete
+ *
+ * MAC subheader format is R/F/LCId/L (2/3 bytes)
+ * LCId is 1 for SRB1
+ * L is length of PDU i.e 6bytes here
+ * From 38.321 section 6.1.1
+ *
+ * RLC subheader for AM PDU is D/C/P/SI/SN (2 bytes for 12-bit SN)
+ * From 38.322, section 6.2.2.4
+ */
+ DU_LOG("\nDEBUG --> PHY_STUB: Forming MSG5 PDU");
+ uint8_t msg5PduLen = 33; /* Length of MSG5 */
+ msg5PduLen += 2; /* RLC subheader */
+ uint8_t msg5[] = {1, msg5PduLen, 128, ueDb.ueCb[ueId-1].rlcSnForSrb1++, 0, ueDb.ueCb[ueId-1].pdcpSn++, 16, 0, \
+ 5, 223, 128, 16, 94, 64, 3, 64, 68, 252, 97, 0, 0, 0, 0, 4, 0, 0, 4, 68, 11, 128, 184, 56, 0, 0, 0, 0, 0};
+
+ msg5PduLen += 2; /* 2 bytes of MAC header */
+ memcpy(pdu, &msg5, msg5PduLen);
+ byteIdx += msg5PduLen; /* 4 bytes of header : MAC+RLC */
+ break;