Section: 4.7.3.1.1 GPRS attach procedure initiation
Content: In state GMM-DEREGISTERED, the MS initiates the GPRS attach procedure by sending an ATTACH REQUEST message to the network, starts timer T3310 and enters state GMM-REGISTERED-INITIATED. If timer T3302 is currently running, the MS shall stop timer T3302. If timer T3311 is currently running, the MS shall stop timer T3311. If the MS is configured for "AttachWithIMSI" as specified in 3GPP TS 24.368[ Non-Access Stratum (NAS) configuration Management Object (MO) ]  [135] or 3GPP TS 31.102[ Characteristics of the Universal Subscriber Identity Module (USIM) application ]  [112] and the selected PLMN is neither the registered PLMN nor in the list of equivalent PLMNs, the MS shall include the IMSI in the Mobile identity IE in the ATTACH REQUEST message. For all other cases: If the MS does not support S1 mode: - the MS capable of both Iu mode and A/Gb mode or only of A/Gb mode shall include a valid P-TMSI, if any is available, the P-TMSI signature associated with the P-TMSI and the routing area identity associated with the P-TMSI in the ATTACH REQUEST message. In addition, the MS shall include P-TMSI type IE with P-TMSI type set to "native P-TMSI". If there is no valid P-TMSI available, the IMSI shall be included instead of the P-TMSI and P-TMSI signature. If the MS supports S1 mode: - if the TIN indicates "GUTI" and the MS holds a valid GUTI allocated by an MME, the MS shall map the GUTI into the Mobile identity IE, P-TMSI signature IE and Old routing area identification IE. The MS shall also include P-TMSI type IE with P-TMSI type set to "mapped P-TMSI". Additionally, if the MS holds a valid P-TMSI and RAI, the MS shall indicate the P-TMSI in the Additional mobile identity IE and the RAI in the Additional old routing area identification IE. NOTE: The mapping of the GUTI to the P-TMSI, P-TMSI signature and RAI is specified in 3GPP TS 23.003[ Numbering, addressing and identification ]  [10]. - If the TIN indicates "P-TMSI" or "RAT-related TMSI" and the MS holds a valid P-TMSI and a RAI, the MS shall indicate the P-TMSI in the Mobile identity IE and the RAI in the Old routing area identification IE. The MS shall also include P-TMSI type IE with P-TMSI type set to "native P-TMSI". If a P-TMSI signature is associated with the P-TMSI, the MS shall include it in the Old P-TMSI signature IE. - If the TIN is deleted and - the MS holds a valid P-TMSI and a RAI, the MS shall indicate the P-TMSI in the Mobile identity IE and the RAI in the Old routing area identification IE. The MS shall also include P-TMSI type IE with P-TMSI type set to "native P-TMSI". If a P-TMSI signature is associated with the P-TMSI, the MS shall include it in the Old P-TMSI signature IE; or - the MS does not hold a valid P-TMSI and RAI, but holds a valid GUTI allocated by an MME, the MS shall map the GUTI into the Mobile identity IE, P-TMSI signature IE and Old routing area identification IE. The MS shall also include P-TMSI type IE with P-TMSI type set to "mapped P-TMSI"; or - the MS does not hold a valid P-TMSI, RAI or GUTI, the MS shall include the IMSI in the Mobile identity IE. - Otherwise the MS shall include the in the Mobile identity IE. In the cases when the MS maps a GUTI into the Mobile identity IE, P-TMSI signature IE and Old routing area identification IE, then: - If a current EPS security exists, the P-TMSI signature shall include a truncated NAS token as specified in 3GPP TS 33.401[ 3GPP System Architecture Evolution (SAE); Security architecture ]  [123]. In the GPRS ciphering key sequence number IE, the MS shall indicate the value of the eKSI associated with the current EPS security context. The MS shall derive CK' and IK' from the KASME and the NAS uplink COUNT value corresponding to the NAS token derived and handle the START value as specified in 3GPP TS 25.331[ None ]  [23c]. Then, the MS shall store the mapped UMTS security context replacing the established UMTS security context for the PS domain. - If a current EPS security does not exist, the MS shall set the truncated NAS token included in the P-TMSI signature to all zeros and the GPRS ciphering key sequence number to "No key is available". If the MS is attaching for emergency bearer services and does not hold a valid GUTI, P-TMSI or IMSI as described above, the IMEI shall be included in the Mobile identity IE. The MS shall also indicate within the DRX parameters whether it supports the split pg cycle option on CCCH. The optional support of the split pg cycle on CCCH by the network is indicated in SI13 or PSI1. Split pg cycle on CCCH is applied by both the network and the MS when the split pg cycle option is supported by both (see 3GPP TS 45.002[ None ]  [32]). If the MS supports eDRX and requests the use of eDRX, the MS shall include the extended DRX parameters IE in the ATTACH REQUEST message. In Iu mode, if the MS wishes to prolong the established PS signalling connection after the GPRS attach procedure (for example, the MS has any CM application request pending), it may set a follow-on request pending indicator on (see subclause 4.7.13). An MS attaching for emergency bearer services shall set the follow-on request pending indicator. If the MS supports PSM and requests the use of PSM, then the MS shall include the T3324 value IE with a requested timer value in the ATTACH REQUEST message. When the MS includes the T3324 value IE and the MS indicates support for extended periodic timer value in the MS network feature support IE, it may also include the T3312 extended value IE to request a particular T3312 value to be allocated. In A/Gb mode, if the MS supports the restriction on use of enhanced coverage, then the MS shall set the Restriction on use of enhanced coverage capability bit to "Mobile station supports restriction of use of enhanced coverage" in the MS network capability IE of the ATTACH REQUEST message. If the MS supports dual connectivity of E-UTRA with New Radio (NR), then the MS shall set the Dual connectivity of E-UTRA with NR capability bit to "Mobile station supports dual connectivity of E-UTRA with NR" in the MS network capability IE of the ATTACH REQUEST message. In A/Gb mode, if a UMTS security context is available and if the MS indicates support of integrity protection in the MS network capability IE included in the ATTACH REQUEST message, then the MS shall derive a GPRS GSM Kint key as described in subclause 4.7.7.3b and a GPRS GSM Kc128 key as described in subclause 4.7.7.3a. The MS shall then assign the GPRS GSM Kint key, the GPRS GSM Kc128 key, the GPRS GSM integrity algorithm and the GPRS GSM ciphering algorithm (identified by the information in the Ciphering Algorithm IE and Integrity Algorithm IE stored in the non-volatile ME memory) to the LLC layer, and indicate to the LLC layer that it shall start integrity protection. This shall be done so that the LLC layer can integrity protect, but not cipher, the ATTACH REQUEST message. The MS shall include the CKSN in the CKSN IE in the ATTACH REQUEST message. If the MS has no UMTS security context available, then the MS shall not integrity protect the ATTACH REQUEST message in the LLC layer. In this case the MS shall set the CKSN IE to the value "no key is available" and send the ATTACH REQUEST unprotected.