-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WiFiDirect cppwinrt misplaced '}' #1401
Comments
I also saw this problem. After you fixed it, do you get the GO and GC connected? |
I believe so. I worked more with the C# sample. So see also #1399. Best way of testing is to make sure the devices aren't already paired and get the C# sample working first. Life will be better if you make this change to Scenario2_Connector.cpp at approx. line 78.
It will make it correctly report the pairing status for the device you are connecting to and stop it from trying to pair when already paired (which fails).
is throwing an exception for me at the moment, but it does make the WiFi Direct connection, but I haven't run this code for a couple of months. I let all the GO settings default and add "Push button" configuration methods on both sides. I suggest trying this first. Note that the Advertiser only advertises for a couple of minutes and the Connector only looks for a few seconds. Once it says the enumeration is complete, you won't see any more devices until you stop/restart the watcher. You are better off doing this:
every 30 seconds or so while you aren't suspended. |
@orineman After look at your reply and the link you mentioned, I realize that only GC needs to do DeviceInformationCustomPairing::PairAsync(...), then both side can get a valid IP address and ping each other. But the problem is that how to use WiFiDirectConfigurationMethod::DisplayPin and ProvidePin? PushButton is kind of unsafe. |
Which sample are you reporting a bug in?
WifiDirect/cppwinrt
Describe the bug
Listener fails to accept connection from an unpaired device.
To Reproduce
Steps to reproduce the behavior:
Run the sample, start a listener using default settings, try to connect to it from an unpaired device.
Expected behavior
It should work the same as the C# sample and successfully connect.
Configuration
Any.
Additional context
The '}' currently at line 235 should be at line 182 in Scenario1_Advertiser.cpp. I.e. immediately before the following user notification:
rootPage.NotifyUser(L"Connecting to " + deviceName + L"...", NotifyType::StatusMessage);
See also Scenario1_Advertiser.xaml.cs in th C# sample which has identical flow.
The text was updated successfully, but these errors were encountered: