# Activation Process of ONU in EPON/GPON/XG-PON/NG-PON2 Networks
## 4 xPON Activation Processes
### Xg-PON Activation Process  
As mentioned in Section 4.1, the principles of the activation process for XG-PON are basically identical to those for GPON and are defined by the recommendations [26; 27]. State O1, initial state: The ONU is in this state immediately upon switching on or after switching from other states when there is an error requiring a return to the initialization state. The transmission is switched off at this time, and all the previously set TC layer parameters (e.g., ONU-ID) are cleared. Synchronization in the downstream direction is provided by the synchronization machine. The ONU starts in the Hunt State, where it uses the downstream signal to search for the PSync pattern stored in the physical synchronization block downstream (PSBd). If it is found, the ONU verifies that a 64-bsuperframe counter (SFC) structure, which is also found in PSBd and secured by a self-repairing hybrid error correction (HEC), is valid. If the SFC is valid, the ONU stores its values and moves to the Pre-Syncstate. With the next successful validation (at this point, only 62 bits out of the total number of received 64 bits are sufficient), the ONU moves to the Sync state. However, if any of these validations fail, the ONU returns to the Hunt state. The unit remains in the Sync state (the unit has already been successfully synchronized) as long as the PSync and SFC authentication are successful. If the authentication fails, the ONU moves to the Re-Sync state. It moves to the Sync state only after successful validation. The recommended value for the M parameter is three. However, if M-1 consecutive physical interface (PHY) frames validating the PSync or SFC fail, the ONU declares a loss of synchronization with the downstream frame, discards the saved SFC copy and returns to the Hunt state. This process is illustrated in Figure 1. Once synchronized with the downstream PHY frame, the ONU moves to the next state. State of O2-3, Serial Number State: In this state, the ONU activates its transmitter in a burst mode and waits for messages from OLT. The ONU analyzes the PLOAM section of the downstream XG-PON transmission convergence layer (XGTC) frame and begins to learn the burst profile specified in the Profilesection of the message. Upon receiving a serial number grant, it reports with the XGTC frame carrying the Serial Number ONU PLOAM message to send its serial number. As soon as it receives an AssignONU-ID PLOAM message with its serial number, it sets the allocated ONU-ID together with the other assigned parameters and moves to the next state. After receiving the Disable Serial Number PLOAM message (for its serial number or for all ONUs), it moves to the EmergencySTOPSate. If OLT already knows the ONU that is returning to the network (e.g., during recovery, power failure, etc. ), a problem with the Assign ONU-ID PLOAM message could occur. Therefore, the ONU can go directly to the state called the Ranging State when activated without responding to the serial number grant request. State O4, Ranging state: In this state, the ONU receives a ranging grant with a known burst profile. Consequently, the XGTC frame containing the RegistrationPLOAM message is transmitted as a response. The ONU analyzes the PLOAM section of the downstream XGTC frame and responds only to the following messages: Profile, Ranging Time, Deactivate ONU-ID and Disable Serial Number. If the ONU receives the Ranging Time message with the absolute equalization delay, it moves to the next state. In this state, the TO1 timer is used to cancel unsuccessful attempts by limiting the time that the ONU can stay in that state. The recommended value for the TO1 timer is 10 s. If it expires, the unit discards the associated ONU-ID, as well as all other parameters, and returns to the Serial Number state. State O5, Operationstate: The ONU already transmits data and PLOAM messages in the upstream direction as instructed by the OLT. At this point, the OLT can create additional connections with the ONU if they are required.