3.1.4.4 Close by Higher Layer

The Close by Higher Layer event is triggered when the upper layer closes a session. When this happens, the following MUST occur:

  • If SMP is in the SESSION ESTABLISHED state, send the FIN packet and then enter the FIN SENT state.

  • If SMP is in the FIN RECEIVED state, send the FIN packet to the peer, recycle the Session object, and then enter the CLOSED state.

Note The Session object cannot be recycled and the CLOSED state ought not be entered until the SMP layer receives a FIN packet from its peer, as described in section 3.1.5.1.3. It is also important to both receive and send a FIN packet (the order does not matter) before entering the CLOSED state to prevent a new session from attempting to use an existing session identifier (SID). See section 2.2.1 for a description of the SID field.