Any guide on how to use wpas dbus api to complete the p2p negotiation and setup Group link
Hello, I'm implementing a new Miracast receiver for linux, the mice part works well with gnome-network-display, but not for MS Windows and android at the time, for which I have to implement the WFD P2P part.
This is the diagram of the code: mirocast
Currently, I'm having trouble with wpas p2p operation. All the wpas related operation is done with the dbus API, the basic logic is given in the diagram, to clarify:
-
p2p_set_IE()
: set theWFDIEs
dbus property -
p2p_set_config()
:
- set
P2PDeviceConfig
property, including:DeviceName
,PrimaryDeviceType
,VendorExtension
- set WPS interface property, including:
ConfigMethods='pin'
,ProcessCredentials=true
-
attach_signals()
mainly focus on p2p device interface signals, related to the
- watch p2p events, log, notify(peer, pin, etc.)
- start WPS on
ProvisionDiscoveryPBCRequest
orProvisionDiscoveryRequestDisplayPin
- call
p2p_connect
onGONegotiationRequest
- handle dhcp and launch rtsp connection on
GroupStarted
For this part, I'm not sure whether the VendorExtension
or WPS configuration setup correct or not or am I missing any steps, the android device can connect the GO and gain ip, and even response rtsp messages, but soon disconnect GO after M1, M2 sent by sink. After which there comes a signal from WPS interface:
** [wps] Event: ('fail', {'msg': <0>, 'config_error': <16>, 'error_indication': <0>})
Sincerely appreciate any potential assistance, it will help a lot.
The code is not open source at the time, I can't share it until the company makes the decision. For which I'll also try my best.