Detach Request can be initiated from UE or by the Network.
We shall learn both types of detach request in this chapter.
Below are the messages that are exchanged between UE and Network during detach procedure:
UE initiated Detach Procedure:
UE will initiate detach procedure on following scenarios:
1. UE switched off
2. USIM is removed.
3. Detach for EPS service only
Steps involved in UE initiated detach procedure:
1. UE will send detach procedure by sending DETACH REQUEST message.
2. The Detach type IE included in the message indicates whether detach is due to a “switch off” or not.
3. The Detach type IE also indicates whether the detach is for EPS services only, for non-EPS services only, or for both.
4. If the UE has a valid GUTI, the UE shall populate the EPS mobile identity IE with the valid GUTI. If the UE does not have a valid GUTI, the UE shall populate the EPS mobile identity IE with its IMSI.
5. If the detach is not due to switch off and the UE is in the state EMM-REGISTERED or EMM-REGISTERED- INITIATED, timer T3421 shall be started in the UE after the DETACH REQUEST message has been sent.
6. Network will send DETACH ACCEPT message to UE and store the current EPS security context, if the Detach type IE is not “switch off”.
7. If it is “switch off”, then MME shall delete the current EPS security context.
8. The UE, when receiving the DETACH ACCEPT message, shall stop timer T3421.
9. On the first four expiries of the timer, the UE shall retransmit the DETACH REQUEST message and shall reset and restart timer T3421. On the fifth expiry of timer T3421, the detach procedure shall be aborted.
10. Network will not send DETACH ACCEPT if the Detach Type is “switch off”.
Network initiated Detach Procedure:
Network will initiate detach procedure for the following scenarios:
1. Detach the UE for EPS services or non-EPS services or both
2. Network will initiate detach procedure by sending DETACH REQUEST. It may include EMM Cause IE to specify the reason for detach request.
3. If the detach type IE indicates “re-attach required” or “re-attach not required”, the network shall deactivate the EPS bearer context(s) for the UE locally and enter state EMM-DEREGISTERED-INITIATED.
4. If the DETACH REQUEST message and the detach type indicates “re-attach required”, the UE shall deactivate the EPS bearer context(s). The UE shall then send a DETACH ACCEPT message to the network and enter state EMM-DEREGISTERED.
DETACH ACCEPT can be sent by Network or by UE.
* In case of UE initiated DETACH REQUEST, if the “Detach Type” IE is set to “Switch Off”, the network will not send “DETACH ACCEPT” to UE.
* If the network receives a DETACH REQUEST, with “Detach Type” IE is set to “normal detach”, the network will send “DETACH ACCEPT” to UE.
* If network initiated DETACH REQUEST, the UE shall send DETACH ACCEPT message, to indicate the successful completion of the detach procedure.
Reference: 3GPP TS 24.301