3.2.5.4 Miracast Connection Complete

When the connection to the Sink over TCP port 7250 fails, the Source MUST do the following:

  1. Abandon its attempt to start a Miracast over Infrastructure session by closing any connections to the Sink and deleting its state.

  2. Fall back to using standard Miracast [WF-WSC2.0.2].

If the connection attempt succeeds, the Source MUST do the following.

  1. Determine the optional features of the protocol to use and store them for the session (section 3.2.1). If the Sink had the StreamEncryptionSupported bit set in the Capability Attribute (section 2.2.8.1) the Source SHOULD<10> use stream encryption in the connection setup. If the Sink had the PinSupported bit set in the Capability Attribute, the Source SHOULD<11> use PIN display for the connection. The decision to use these capabilities is implementation specific and the result is stored in Selected Sink Capabilities (section 3.2.1).

  2. If PIN entry is set in Selected Sink Capabilities (section 3.2.1):

    1. The Source MUST send a Session Request message (section 2.2.4) over the TCP session. The Security Option TLV (section 2.2.7.5) in this message MUST contain the appropriate bits based on the Selected Sink Capabilities (section 3.2.1).

  3. If Stream Encryption is set in Selected Sink Capabilities (section 3.2.1):

    1. Send a Security Handshake message (section 2.2.3) containing the first DTLS handshake message [RFC6347] over the TCP session.

  4. If Stream Encryption is not set in Selected Sink Capabilities (section 3.2.1):

    1. Begin listening on RTSP control port 7236 for a connection request.

    2. Send a Source Ready message (section 2.2.1) over the TCP session.