3.1.5 Message Processing Events and Sequencing Rules

The following diagram depicts the messaging sequence between WFDA2A and a proximate device.  

Messaging sequence between WFDA2A and a proximate device

Figure 3: Messaging sequence between WFDA2A and a proximate device

The message sequence between the WFDA2A and a proximate device is distributed into five steps:

  1. Advertise device information: A higher layer triggers the advertising of device information.   The higher layer passes advertisement IE content to WFDA2A which then publishes the information on the wire to be discovered by proximate devices.

  2. Search for proximate devices: A higher layer triggers the search for proximate devices that are performing the complementary role (for details about Roles, see section 3.1.3). WFDA2A MUST send Probe Requests containing the advertisement IE content to proximate devices. If a proximate device is discovered that is performing a complementary role, the device MUST reply with a Probe Response containing its advertisement IE content.

  3. Establish an L2 connection: A higher layer selects a proximate device and designates it as the initiator. The initiator’s protocol prepares the initiator's Connection data and sends an incoming connection request to the proximate device designated as the recipient.  After the recipient accepts the incoming connection request, the recipient sends its Connection data back to the initiator. At this point, both devices have requested a connection with each other. The devices create an L2 connection using the WFP2P pairing procedure.

  4. Establish an L3 connection: The two devices establish an L3 connection based on the Connection data. During creation of the L3 connection, WFDA2A assigns one device as the client and the other as the server, the difference being that the client connects on an L3 socket, as defined in section 3.2.5, while the server listens on an L3 socket, as defined in section 3.3.5. Note that the L3 client and server designations are assigned independently of the L2 initiator and recipient roles defined in step 3.

  5. Confirm the connection: Upon establishment of the connection, the client MUST send the AppWFDAcceptHeader message to the server (see section 2.2.1). When the AppWFDAcceptHeader message is received, the server MUST validate the SessionId from AppWFDAcceptHeader by comparing it to the value of its SessionId. If the two SessionId values match, the server MUST send the AppWFDAcceptHeader message to the client; otherwise, the server MUST abort the connection. When the AppWFDAcceptHeader message is sent to the client, the client MUST validate the AppWFDAcceptHeader received from the server by comparing it to what was previously sent by the client. If the two AppWFDAcceptHeader messages are identical, establishment of the connection is complete; otherwise, the client MUST abort the connection.