# 蔡瀚興-讀書會-21/07/28
## <font color="ff0000">Introduction</font>
When UE attached to LTE Network,
1. authenticate the user and registered user on the network side
2. establish an EPS session and bearer to provide services
3. trigger mobility that supports user mobility Management functions
The mobility and session management by NAS protocol, and NAS can be roughly divided into **EPS mobility management EMM** and **EPS session management ESM**.
## <font color="ff0000">EMM, ECM and RRC States</font>
### <font color="0000ff">Types of EMM process</font>

There are three types of EMM process:
1. **EMM general process:**
Refers to a process that can always be initiated when the NAS signaling connection between the UE and the MME exists
2. **EMM special process:**
Refers to the process related to user mobility.
3. **EMM connection management process:**
Refers to the process related to NAS signaling connection establishment.
### <font color="0000ff">EMM / ECM / RRC status</font>

- EMM是NAS層的一個子層
- 隨著EMM過程的進行,UE處於七種EMM狀態之一,MME處於四種EMM狀態之一
- **ECM(EPS connection management):** 為了UE和MME之間相互交換NAS消息,在他們之間建立的信令連接(RRC ,S1 signals)
- 當ECM建立和終止時,RRC和S1 signal全部建立和終止
- EMM可以是“EMM-Registered” or “EMM-Deregistered” 取決於連接或斷連
- ECM是可以是“ECM-Connected” or “ECM-Idle”取決於NAS信令連接是否建立
- RRC可以是“RRCConnected” or “RRC-Idle”狀態取決於是否有RRC連接建立

## <font color="ff0000">EMM State Transition</font>
因為RRC連接是ECM連接的一部分,所以在UE的角度看ECM和RRC總是保持相同的狀態


### <font color="0000ff">EMM-Deregistered</font>
- **A case:** 網絡端處理提供的信息,沒有包含任何UE信息
- **B case:** 網絡保存著UE上次附著時網絡獲得的GUTI和NAS security contexts
- 處於狀態B時,UE再次附著到網絡,網絡保持著鑑權和安全建立所需求的信息,過了一段時間之後,網絡會刪除這些信息,並轉換到狀態A。
- 當UE請求接入網絡時,UE狀態轉換到C(EMM-registered,ECM-connected,RRC-connected)
### <font color="0000ff">EMM-Registered</font>
- The state of ECM and RRC is ECM-connected / RRC-connected or ECM-idle / RRC-idle state depends on the **activation characteristics** of the UE.
- 當UE成功接入網路,則由A or B state轉為C state ,如果停止使用服務便轉為D state
- 當處於D state ,資源不會分給ECM or EPS Bearer(S5除外)。如果要使用,需轉為C state。
- **[D]->[C]:** (i)new UL or DL ,(ii)TAU expire 則當TAU request requir時轉換
- **[C]->[D]:** (i)無 UL or DL 一段時間 ,(ii)TAU完成後釋放資源
- 當(i)UE detach (ii)UE關機 (iii)Radio link fail RLF,則由**[C or D]->[B]**
- 當UE在C切換到非LTE網絡,或UE attach被拒絕,或TAU update被拒絕,則[EMM-registered]轉到[EMM-deregistered]
## <font color="ff0000">EMM Features</font>
Discuss the features related to the EMM process supported by the EPS entity
### <font color="0000ff">UE location information</font>

- **In state C:** 網路知道UE在哪個cell
- **In state D:** 網路知道UE在哪個TA
### <font color="0000ff">EPS bearer and NAS signaling connection</font>
- 當user處於ECM-connected / RRC-connected state,**DRB/S1/S5**皆established and active
- 當user處於ECM-idle / RRC- In the idle state,**只有S5** established


### <font color="0000ff">Mobility</font>
- EMM-registered狀態選則去訊號好的cell,當UE不使用服務時選擇去訊號差的cell
- **TAU:** ECM-idle / RRC-idle state時不論TA是否改變,TAU timer超時便會更新TA。
但須轉為ECM-connected/RRC-connected更新,完後再轉回來
- **Paging:** 當idle狀態時,如有trasmission,則用paging叫醒UE,並轉到C state

### <font color="0000ff">UE ID</font>

## <font color="ff0000">EMM User Information</font>
### <font color="0000ff">EMM-deregistered+ECM-idle/RRC-idle(A state)</font>
在狀態A,除了運營商提供的信息外,網絡沒有用戶信息。

### <font color="0000ff">EMM-deregistered+ECM-idle/RRC-idle(B state)</font>
在狀態B,最後一次UE附著網絡使用的信息在UE和MME中保持有效,在下次UE可以使用相同的信息
**(狀態B中包含的被標記為綠色,已經在狀態A分配的是黑色的)**

### <font color="0000ff">EMM-registered+ECM-connected+RRC-connected</font>
**(狀態C中新加入的標記為藍色)**

### <font color="0000ff">EMM-registered+ECM-idle/RRC-idle</font>
狀態D,在狀態C分配給EPS承載和NAS信令連接的所有資源,除了S5承載,都被釋放了。
**(這些釋放的信息被標記成灰色)**
