# A Mechanism for Reliable Mobility Management for Internet of Things Using CoAP
## 2 Architecture and Procedure of Reliable Mobility Management
### Procedure for Reliable Mobility Management  
Figure 2 shows the signaling flow diagram for CoMP. All control messages use a confirmable message as Figure 2 indicates. The signaling flow diagram includes registration, connection, holding, and binding. We assume that mCSN obtains the P_Addr, T_Addr, and Lifetime from old-ER.  
Step 1: Both CWC and mCSN register their own P_Addr and Lifetime in the MMT of the IMMS by exchanging a POST registration request message and ACK registration response message.  
Step 2: CWC performs the connection procedure to retrieve the destination IP address of the T_Addr and the P_Addr of mCSN. To accomplish this, CWC sends a GET connection request message to the IMMS. As a response, CWC receives an ACK connection response, which includes the T_Addr and Lifetime of mCSN in the MMT of the IMMS. CWC then inserts the T_Addr and Lifetime with the corresponding P_Addr of mCSN in the LBC. CWC then attempts to connect to mCSN by referring to P_Addr and T_Addr. Subsequently, CWC can exchange data with mCSN directly until the Lifetime of T_Addr of mCSN expires.  
Step 3: We consider the case where mCSN moves from the network domain covered by old-ER to that of the new-ER. As mCSN moves away from old-ER and enters the network domain of new-ER, it requires an IP handover operation. To perform the handover operation, mCSN first detects the radio signal strength (RSS) from the access point or base station connected to the old-ER. As mCSN detects a degradation of the RSS from the access point or base station connected to the old-ER, it sends a PUT holding request message to the IMMS to hold the request messages from the other CoAP nodes to prevent packet loss of the request message of other CoAP nodes. As the IMMS receives the PUT holding request message, the IMMS updates the H_Flag of mCSN in the MMT to \"1\". IMMS then sends the PUT holding request message to CWC. Next, CWC updates the H_Flag in the LBC to \"1\". As a response, CWC sends an ACK holding response message to the IMMS.  
Figure 2: Signaling flow diagram of CoMP.  
Because the RSS from the access point or base station connected to the old-ER is less than the threshold value, mCSN cannot send or receive data from old-ER, and disconnects a connection from the access point or base station connected to the old-ER. mCSN then discovers the new-ER. mCSN attempts to perform the connection attachment to the access point or base station connected to the new-ER. It then retrieves a new T_Addr through the DHCP server, which includes both Discovery and Offer procedures.  
Step 4: After obtaining a new T_Addr, mCSN sends a PUT binding update request message to both the IMMS and CWC through new-ER, simultaneously, by referring to the T_Addr of CWC in the LBC, to inform them of the new T_Addr. The PUT binding update (BU) request message includes the P_Addr, T_Addr, and Lifetime of mCSN. After the IMMS and mCSN receive the PUT BU message, the T_Addr and Lifetime are updated in the MTT and LBC and the H_Flag is set to \"0\". Finally, CoMP node A can retrieve the data from mCSN. In this manner, the connection between CWC and mCSN can be seamlessly maintained during the handover operation.