3.1.5.5 Receiving an Open Command

If the connection (1) is not in the ‘established’ state, or a session identified by the contained SessionId field already exists, the recipient MUST send a ConnectClose command as specified in section 3.1.4.2, with a ReasonId of TooManyUnknownSessionCmds (0x0f).

Upon receipt of an Open command the receiving session state MUST be set to ‘opening’.

The receiving device MUST set the session InboundAddressingEntry to the session addressing entry in the ResourceURL, IdentityURL, and DeviceURL fields.

The higher-layer MUST provide the ResourcHandlerAvailability state for the addressing entry.

The recipient MUST send an OpenResponse command. The ResponseId MUST be determined based on the ResourcHandlerAvailability state as follows:

If the state is:

  • ‘fault’, the ResponseId MUST be set to Unknown (0x05), and session state MUST be removed.

  •  ‘notReady’, the ResponseId MUST be set to OkStopSending (0x0b), and the session state MUST be set to the ‘suspended’ state.

  •  ‘‘ready’’, the ResponseId MUST be set to Ok (0x00), and the session state MUST be set to the ‘ready’ state.

  • Upon sending the OpenResponse for a session, the receiving session MessageReceiver state MUST be set to ‘waiting’.