Should the UI include WFD peers that have no WFD IE yet?
It looks like there's a small design problem in that NetworkManager doesn't send WFD IEs when scanning (P2P Find phase) but gnome-network-displays requires the WFD IEs to be present on the peer devices (specifically in src/nd-wfd-p2p-provider.c:peer_added_cb
). The WFD (v2.1.0) says:
5.2.2 Probe Request Frame Format
The Probe Request frames are transmitted by any WFD Device.
A WFD Device shall insert one or more WFD IEs after the other information elements in the Probe Request frames it transmits.
...
5.2.3 Probe Response Frame
The Probe Response frames are transmitted by any WFD Device as per the rules specified in [7].
When a WFD Device responds to the Probe Request frame that is transmitted by other WFD Device and contains a WFD IE, the WFD Device shall insert one or more WFD IEs after the other information elements in the Probe Response frames it transmits.
So to do a proper search for WFD devices, NM must be sending its own WFD IEs also in its Probe Requests, otherwise those peers that have been first discovered from their Probe Request will have a WFD IE recorded by NM, but those that are discovered from their Probe Response (response to our Probe Request) will not. This seems to be a design problem in the NM P2P API. Perhaps a solution would be to accept a wfd_ies entry in the options
parameter to the o.f.NM.Device.WifiP2P.StartFind(options)
call. That way no changes are required in NM client libraries.
In the meantime a workaround would be for the gnome-network-displays UI to display both WFD devices that have a WFD IE and those that have a display
category and maybe some multimedia-device
subcategories.