Section: 4.7.4.2.2 Network initiated GPRS detach procedure completion by the MS
Content: When receiving the DETACH REQUEST message and the detach type indicates "re-attach required", the MS shall deactivate the PDP context(s), the MBMS context(s) and deactivate the logical link(s), if any. The MS shall stop the timer T3346, if it is running. The MS shall also stop timer(s) T3396, if it is running. The MS shall send a DETACH ACCEPT message to the network and shall enter the state GMM-DEREGISTERED. The MS shall, after the completion of the GPRS detach procedure, initiate a GPRS attach procedure. The MS should also activate PDP context(s) that were originally activated by the MS to replace any previously MS activated PDP context(s). The MS should also perform the procedures needed in order to activate any previously active multicast service(s). NOTE 1: When the detach type indicates "re-attach required", user interaction is necessary in some cases when the MS cannot re-activate the PDP/MBMS context(s) automatically. A GPRS MS operating in MS operation mode A or B in network operation mode I, which receives an DETACH REQUEST message with detach type indicating "re-attach required" or "re-attach not required" and no cause code, is only detached for GPRS services in the network. When receiving the DETACH REQUEST message and the detach type IE indicates "IMSI detach", the MS shall not deactivate the PDP/MBMS contexts. The MS shall set the MM update status to U2 NOT UPDATED. An MS in operation mode A or B in network operation mode I may send a DETACH ACCEPT message to the network, and shall re-attach to non-GPRS service by performing the combined routing area updating procedure according to subclause 4.7.5.2, sending a ROUTING AREA UPDATE REQUEST message with Update type IE indicating "combined RA/LA updating with IMSI attach". An MS in operation mode A that is in an ongoing circuit-switched transaction shall initiate the combined routing area updating after the circuit-switched transaction has been released. An MS in operation mode C, or in MS operation mode A or B in network operation mode II, shall send a DETACH ACCEPT message to the network. If the detach type IE indicates "IMSI detach", or "re-attach required" then the MS shall ignore the cause code if received. If the MS is attached for GPRS and non-GPRS services and the network operates in network operation mode I, then if in the MS the timer T3212 is not already running, the timer T3212 shall be set to its initial value and restarted if: - the detach type IE indicates "re-attach required"; or - the detach type IE indicates "re-attach not required" and no cause code is included. When receiving the DETACH REQUEST message and the detach type IE indicates "re-attach not required" and no cause code, or "re-attach not required" and the cause code is not #2 "IMSI unknown in HLR", the MS shall deactivate the PDP contexts, the MBMS contexts and deactivate the logical link(s), if any. The MS shall then send a DETACH ACCEPT message to the network and shall change state to GMM-DEREGISTERED. If the detach type IE indicates "re-attach not required" and no cause code is included, - the MS shall set the GPRS update status to GU2 NOT UPDATED, delete the GMM parameters P-TMSI, P-TMSI signature, RAI, and GPRS ciphering key sequence number, and start timer T3302. If the MS is operating in MS operation mode C, it may enter the state GMM-DEREGISTERED.PLMN-SEARCH in order to perform a PLMN selection according to 3GPP TS 23.122[ Non-Access-Stratum (NAS) functions related to Mobile Station (MS) in idle mode ]  [6]; otherwise the MS shall enter the state GMM-DEREGISTERED.ATTEMPTING-TO-ATTACH; and - if S1 mode is supported in the MS, the MS shall handle the EMM parameters EMM state, EPS update status, GUTI, last visited registered TAI, TAI list and KSI, as specified in 3GPP TS 24.301[ Non-Access-Stratum (NAS) protocol for Evolved Packet System (EPS); Stage 3 ]  [120] for the case when a DETACH REQUEST is received with the no EMM cause included and with detach type set to "re-attach not required". If the detach type IE indicates "re-attach not required" and a cause code is included, then, depending on the received cause code, the MS shall act as follows: # 2 (IMSI unknown in HLR); The MS shall set the update status to U3 ROAMING NOT ALLOWED and shall delete any TMSI, LAI and ciphering key sequence number. The new MM state is MM IDLE. The SIM/USIM shall be considered as invalid for non-GPRS services until switching off or the SIM/USIM is removed. If the message has been successfully integrity checked by the lower layers and the MS maintains a counter for "SIM/USIM considered invalid for non-GPRS services", then the MS shall set this counter to MS implementation-specific maximum value. A GPRS MS operating in MS operation mode A or B in network operation mode I, is still IMSI attached for GPRS services in the network. # 3 (Illegal MS); # 6 (Illegal ME); The MS shall set the GPRS update status to GU3 ROAMING NOT ALLOWED (and shall store it according to subclause 4.1.3.2) and shall delete any P-TMSI, P-TMSI signature, RAI and GPRS ciphering key sequence number. The MS shall delete the list of equivalent PLMNs. The new GMM state is GMM-DEREGISTERED.NO-IMSI. The SIM/USIM shall be considered as invalid for GPRS services until switching off or the SIM/USIM is removed. If the message has been successfully integrity checked by the lower layers and the MS maintains a counter for "SIM/USIM considered invalid for GPRS services", then the MS shall set this counter to MS implementation-specific maximum value. A GPRS MS operating in MS operation mode A or B shall in addition set the update status to U3 ROAMING NOT ALLOWED, shall delete any TMSI, LAI and ciphering key sequence number. If the MS is operating in MS operation mode A and an RR connection exists, the MS shall abort the RR connection, unless an emergency call is ongoing. The SIM/USIM shall be considered as invalid also for non-GPRS services until switching off or the SIM/USIM is removed. If the message has been successfully integrity checked by the lower layers and the MS maintains a counter for "SIM/USIM considered invalid for non-GPRS services", then the MS shall set this counter to MS implementation-specific maximum value. If S1 mode is supported in the MS, the MS shall handle the EMM parameters EMM state, EPS update status, GUTI, last visited registered TAI, TAI list and KSI as specified in 3GPP TS 24.301[ Non-Access-Stratum (NAS) protocol for Evolved Packet System (EPS); Stage 3 ]  [120] for the case when a DETACH REQUEST is received with the EMM cause with the same value and with detach type set to "re-attach not required". NOTE 2: The possibility to configure an MS so that the radio transceiver for a specific radio access technology is not active, although it is implemented in the MS, is out of scope of the present specification. # 7 (GPRS services not allowed); The MS shall set the GPRS update status to GU3 ROAMING NOT ALLOWED (and shall store it according to subclause 4.1.3.2) and shall delete any P-TMSI, P-TMSI signature, RAI and GPRS ciphering key sequence number. The SIM/USIM shall be considered as invalid for GPRS services until switching off or the SIM/USIM is removed. The new state is GMM-DEREGISTERED. If the message has been successfully integrity checked by the lower layers and the MS maintains a counter for "SIM/USIM considered invalid for GPRS services", then the MS shall set this counter to MS implementation-specific maximum value. A GPRS MS operating in MS operation mode A or B which is already IMSI attached for CS services is still IMSI attached for CS services in the network. A GPRS MS operating in MS operation mode A or B in network operation mode I shall then proceed with the appropriate MM specific procedure. NOTE 3: Optionally the MS starts the timer T3340 as described in subclause 4.7.1.9. If S1 mode is supported in the MS, the MS shall handle the EMM parameters EMM state, EPS update status, GUTI, last visited registered TAI, TAI list and KSI as specified in 3GPP TS 24.301[ Non-Access-Stratum (NAS) protocol for Evolved Packet System (EPS); Stage 3 ]  [120] for the case when a DETACH REQUEST is received with the EMM cause with the same value and with detach type set to "re-attach not required". # 8 (GPRS services and non-GPRS services not allowed); The MS shall set the GPRS update status to GU3 ROAMING NOT ALLOWED (and shall store it according to subclause 4.1.3.2) and shall delete any P-TMSI, P-TMSI signature, RAI and GPRS ciphering key sequence number. The MS shall delete the list of equivalent PLMNs. The new GMM state is GMM-DEREGISTERED.NO-IMSI. The MS shall set the update status to U3 ROAMING NOT ALLOWED, shall delete any TMSI, LAI and ciphering key sequence number. If the MS is operating in MS operation mode A and an RR connection exists, the MS shall abort the RR connection, unless an emergency call is ongoing. The SIM/USIM shall be considered as invalid for GPRS and non-GPRS services until switching off or the SIM/USIM is removed. If the message has been successfully integrity checked by the lower layers and the MS maintains a counter for "SIM/USIM considered invalid for GPRS services", then the MS shall set this counter to MS implementation-specific maximum value. If the message has been successfully integrity checked by the lower layers and the MS maintains a counter for "SIM/USIM considered invalid for non-GPRS services", then the MS shall set this counter to MS implementation-specific maximum value. NOTE 4: Optionally the MS starts the timer T3340 as described in subclause 4.7.1.9. If S1 mode is supported in the MS, the MS shall handle the EMM parameters EMM state, EPS update status, GUTI, last visited registered TAI, TAI list and KSI as specified in 3GPP TS 24.301[ Non-Access-Stratum (NAS) protocol for Evolved Packet System (EPS); Stage 3 ]  [120] for the case when a DETACH REQUEST is received with the EMM cause with the same value and with detach type set to "re-attach not required". # 11 (PLMN not allowed); The MS shall delete any RAI or LAI, P-TMSI, P-TMSI signature and GPRS ciphering key sequence number, shall set the GPRS update status to GU3 ROAMING NOT ALLOWED (and shall store it according to subclause 4.1.3.2) and shall reset the GPRS attach attempt counter. The MS shall delete the list of equivalent PLMNs. The new GMM state is GMM-DEREGISTERED. The MS shall store the PLMN identity in the "forbidden PLMN list" and if the MS is configured to use timer T3245 (see 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]) then the MS shall start timer T3245 and proceed as described in subclause 4.1.1.6. If the message has been successfully integrity checked by the lower layers and the MS maintains a PLMN-specific attempt counter for that PLMN, then the MS shall set this counter to the MS implementation-specific maximum value. The MS shall start timer T3340 as described in subclause 4.7.1.9. If no RR connection exists, the MS shall perform the following additional actions immediately. If the MS is operating in MS operation mode A and an RR connection exists, the MS shall perform these actions when the RR connection is subsequently released: - A GPRS MS operating in MS operation mode A or B shall set the update status to U3 ROAMING NOT ALLOWED and shall delete any TMSI, LAI and ciphering key sequence number. The new MM state is MM IDLE. - The MS shall perform a PLMN selection according to 3GPP TS 23.122[ Non-Access-Stratum (NAS) functions related to Mobile Station (MS) in idle mode ]  [14]. An MS in GAN mode shall request a PLMN list in GAN (see 3GPP TS 44.318[ None ]  [76b]) prior to perform a PLMN selection from this list according to 3GPP TS 23.122[ Non-Access-Stratum (NAS) functions related to Mobile Station (MS) in idle mode ]  [14]. If S1 mode is supported in the MS, the MS shall handle the EMM parameters EMM state, EPS update status, GUTI, last visited registered TAI, TAI list, KSI and attach attempt counter as specified in 3GPP TS 24.301[ Non-Access-Stratum (NAS) protocol for Evolved Packet System (EPS); Stage 3 ]  [120] for the case when a DETACH REQUEST is received with the EMM cause with the same value and with detach type set to "re-attach not required". # 12 (Location area not allowed); The MS shall delete any RAI, P-TMSI, P-TMSI signature GPRS ciphering key sequence number, shall set the GPRS update status to GU3 ROAMING NOT ALLOWED(and shall store it according to clause 4.1.3.2) and shall reset the GPRS attach attempt counter. The state is changed to GMM-DEREGISTERED.LIMITED-SERVICE. The MS shall store the LAI in the list of "forbidden location areas for regional provision of service". The MS shall start timer T3340 as described in subclause 4.7.1.9. If no RR connection exists, the MS shall perform the following additional actions immediately. If the MS is operating in MS operation mode A and an RR connection exists, the MS shall perform these actions when the RR connection is subsequently released: - If the MS is IMSI attached, the MS shall set the update status to U3 ROAMING NOT ALLOWED, shall delete any TMSI, LAI and ciphering key sequence number and shall reset the location update attempt counter. The new MM state is MM IDLE. - The MS shall perform a cell selection according to 3GPP TS 43.022[ None ]  [82] and 3GPP TS 25.304[ None ]  [98]. NOTE 5: The cell selection procedure is not applicable for an MS in GAN mode. If S1 mode is supported in the MS, the MS shall handle the EMM parameters EMM state, EPS update status, GUTI, last visited registered TAI, TAI list, KSI and attach attempt counter as specified in 3GPP TS 24.301[ Non-Access-Stratum (NAS) protocol for Evolved Packet System (EPS); Stage 3 ]  [120] for the case when a DETACH REQUEST is received with the EMM cause with the same value and with detach type set to "re-attach not required". # 13 (Roaming not allowed in this location area); The MS shall delete any RAI, P-TMSI, P-TMSI signature and GPRS ciphering key sequence number, shall set the GPRS update status to GU3 ROAMING NOT ALLOWED (and shall store it according to clause 4.1.3.2) and shall reset the GPRS attach attempt counter. The MS shall delete the list of equivalent PLMNs. The state is changed to GMM-DEREGISTERED.LIMITED-SERVICE or optionally to GMM-DEREGISTERED.PLMN-SEARCH. The MS shall store the LAI in the list of "forbidden location areas for roaming". The MS shall start timer T3340 as described in subclause 4.7.1.9. If no RR connection exists, the MS shall perform the following additional actions immediately. If the MS is operating in MS operation mode A and an RR connection exists, the MS shall perform these actions when the RR connection is subsequently released: - If the MS is IMSI attached, the MS shall set the update status to U3 ROAMING NOT ALLOWED, shall delete any TMSI, LAI and ciphering key sequence number and shall reset the location update attempt counter. The new MM state is MM IDLE. - The MS shall perform a PLMN selection according to 3GPP TS 23.122[ Non-Access-Stratum (NAS) functions related to Mobile Station (MS) in idle mode ]  [14]. An MS in GAN mode shall request a PLMN list in GAN (see 3GPP TS 44.318[ None ]  [76b]) prior to perform a PLMN selection from this list according to 3GPP TS 23.122[ Non-Access-Stratum (NAS) functions related to Mobile Station (MS) in idle mode ]  [14]. If S1 mode is supported in the MS, the MS shall handle the EMM parameters EMM state, EPS update status, GUTI, last visited registered TAI, TAI list, KSI and attach attempt counter as specified in 3GPP TS 24.301[ Non-Access-Stratum (NAS) protocol for Evolved Packet System (EPS); Stage 3 ]  [120] for the case when a DETACH REQUEST is received with the EMM cause with the same value and with detach type set to "re-attach not required". # 14 (GPRS services not allowed in this PLMN); The MS shall delete any RAI, P-TMSI, P-TMSI signature, and GPRS ciphering key sequence number stored, shall set the GPRS update status to GU3 ROAMING NOT ALLOWED (and shall store it according to subclause 4.1.3.2), shall reset the GPRS attach attempt counter and shall change to state GMM-DEREGISTERED. The MS shall store the PLMN identity in the "forbidden PLMNs for GPRS service" list and if the MS is configured to use timer T3245 (see 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]) then the MS shall start timer T3245 and proceed as described in subclause 4.1.1.6. If the message has been successfully integrity checked by the lower layers and the MS maintains a PLMN-specific PS-attempt counter for that PLMN, then the MS shall set this counter to the MS implementation-specific maximum value. A GPRS MS operating in MS operation mode C shall delete the list of equivalent PLMNs and perform a PLMN selection according to 3GPP TS 23.122[ Non-Access-Stratum (NAS) functions related to Mobile Station (MS) in idle mode ]  [14]. A GPRS MS operating in MS operation mode A or B which is already IMSI attached for CS services is still IMSI attached for CS services in the network. A GPRS MS operating in MS operation mode A or B in network operation mode I shall then proceed with the appropriate MM specific procedure. If S1 mode is supported in the MS, the MS shall handle the EMM parameters EMM state, EPS update status, GUTI, last visited registered TAI, TAI list, KSI and attach attempt counter as specified in 3GPP TS 24.301[ Non-Access-Stratum (NAS) protocol for Evolved Packet System (EPS); Stage 3 ]  [120] for the case when a DETACH REQUEST is received with the EMM cause with the same value and with detach type set to "re-attach not required". # 15 (No Suitable Cells In Location Area); The MS shall delete any RAI, P-TMSI, P-TMSI signature and GPRS ciphering key sequence number, shall set the GPRS update status to GU3 ROAMING NOT ALLOWED(and shall store it according to clause 4.1.3.2) and shall reset the GPRS attach attempt counter. The state is changed to GMM-DEREGISTERED.LIMITED-SERVICE. The MS shall store the LAI in the list of "forbidden location areas for roaming". The MS shall start timer T3340 as described in subclause 4.7.1.9. If no RR connection exists, the MS shall perform the following additional actions immediately. If the MS is operating in MS operation mode A and an RR connection exists, the MS shall perform these actions when the RR connection is subsequently released: - If the MS is IMSI attached, the MS shall set the update status to U3 ROAMING NOT ALLOWED, shall delete any TMSI, LAI and ciphering key sequence number and shall reset the location update attempt counter. The new MM state is MM IDLE. - The MS shall search for a suitable cell in another location area or a tracking area according to 3GPP TS 43.022[ None ]  [82] and 3GPP TS 25.304[ None ]  [98] or 3GPP TS 36.304[ Evolved Universal Terrestrial Radio Access (E-UTRA); User Equipment (UE) procedures in idle mode ]  [121]. NOTE 6: The cell selection procedure is not applicable for an MS in GAN mode. If S1 mode is supported in the MS, the MS shall handle the EMM parameters EMM state and EPS update status, GUTI, last visited registered TAI, TAI list, KSI and attach attempt counter as specified in 3GPP TS 24.301[ Non-Access-Stratum (NAS) protocol for Evolved Packet System (EPS); Stage 3 ]  [120] for the case when a DETACH REQUEST is received with the EMM cause with the same value and with detach type set to "re-attach not required". # 25 (Not authorized for this CSG) The MS shall set the GPRS update status to GU3 ROAMING NOT ALLOWED (and store it according to subclause 4.1.3.2) and shall reset the GPRS attach attempt counter. The state is changed to GMM-DEREGISTERED.LIMITED-SERVICE. If the cell where the MS has received the DETACH REQUEST message is a CSG cell and the CSG ID and associated PLMN identity of the cell are contained in the Allowed CSG list stored in the MS, the MS shall remove the CSG ID and associated PLMN identity from the Allowed CSG list. If the cell where the MS has received the DETACH REQUEST message is a CSG cell and the CSG ID and associated PLMN identity of the cell are contained in the Operator CSG list, the MS shall proceed as specified in 3GPP TS 23.122[ Non-Access-Stratum (NAS) functions related to Mobile Station (MS) in idle mode ]  [14] subclause 3.1A. The MS shall start timer T3340 as described in subclause 4.7.1.9. If the MS is IMSI attached for non-GPRS services, the MS shall set the update status to U3 ROAMING NOT ALLOWED and shall reset the location update attempt counter. The new MM state is MM IDLE. The MS shall search for a suitable cell according to 3GPP TS 43.022[ None ]  [82] and 3GPP TS 25.304[ None ]  [98]. If S1 mode is supported in the MS, the MS shall handle the EMM parameters EMM state and EPS update status, GUTI, last visited registered TAI, TAI list, KSI and attach attempt counter as specified in 3GPP TS 24.301[ Non-Access-Stratum (NAS) protocol for Evolved Packet System (EPS); Stage 3 ]  [120] for the case when a DETACH REQUEST is received with the EMM cause with the same value and with detach type set to "re-attach not required". NOTE 7: CSG is applicable only for UMTS. Other cause values shall not impact the update status. Further actions of the MS are implementation dependent.