3.1.4.1 Requesting Diagnostics Data

When a higher-layer application or protocol requests diagnostics information from a sink identified by name or IP address, the initiator MUST use the following procedure:

  1. The initiator MUST attempt to instantiate a Diagnostic Session. If the session cannot be instantiated, the initiator MUST fail the request.

  2. The per-session Handshaking field MUST be set.

  3. A socket MUST be instantiated and an attempt MUST be made to connect to the sink device indicated by the higher-layer application or protocol, on TCP port 2177. If this connection fails, then the initiator MUST tear down the session and return failure of the request to the calling layer.

    Once a TCP connection is established to the sink, the initiator MUST send a Handshake Header (section 2.2.1.1). It MAY<3> also send a Connect Message (section 2.2.2.1) immediately following this. The Per-Session Response timer MUST be enabled and set to expire after 5 seconds.

    The initiator now waits for a message to arrive in order to continue processing the request. The request can only be completed when processing a message that has arrived or when the Response timer has timed out.

Note When this request is completed successfully, the contents of the Connect Response Cache, Collect Data Response Cache, and BSS List Response Cache fields are also returned to the caller.