Wi-Fi Direct Device Discovery
Windows uses the Device Discovery procedure to ask the miniport driver to search for Wi-Fi Direct Devices and optionally search for legacy Wi-Fi networks. Device discovery is only performed on the NDIS port configured in Wi-Fi Direct Device mode.
The figure below shows the typical interactions between Windows and the miniport driver for device discovery.
A Wi-Fi Direct Device on the PC is not discoverable by default. Before it becomes discoverable, Windows will configure the P2P Device Info on the port and provide the set of IEs to include in the probe response. The Device port should only make itself discoverable once Windows has enabled Listen State on the port.
The Wi-Fi Direct device port is requested to perform Device Discovery with the OID_DOT11_WFD_DISCOVER_REQUEST. The miniport driver follows the guidelines in the Wi-Fi Peer-To-Peer Technical Specification for performing device discovery. It reports the completion of the discovery process using NDIS_STATUS_DOT11_WFD_DISCOVER_COMPLETE. The miniport driver must report the list of discovered devices in this completion indication. This completion behavior is different than scanning in Extensible Station Mode.
Windows may query for the list of discovered devices using OID_DOT11_WFD_ENUM_DEVICE_LIST.