Windows IoT


WifiDirect API fails to pair with device


Hi,
I'm now close to two weeks running circles around a problem that I can't crack. This is the scenario:
I'm developing an IoT solution for which I need either WiFiDirect, or WiFiDirect Services
to exchange messages between an IoT device (Dragonboard 410C) and a controller which can be a Laptop or Tablet running another .NET application.
DEVELOPMENT ENVIRONMENT HARDWARE / SOFTWARE
- One Microsoft Surface Book laptop running Windows 10 - Creators Edition, Visual Studio 2017
- One Desktop with the same OS and VS version (so I can debug applications in debug mode at both ends)
- 2x Dragonboard 410C loaded with Windows IoT Core, one with Insider's preview and the other with latest public release.
- 3x WiFi USB dongles to test with different radio hardware.
I ran a netsh wlan show wirelesscapabilites on all hosts and dongles to ensure that:
Wi-Fi Direct Device : Supported
Wi-Fi Direct GO : Supported
Wi-Fi Direct Client : Supported
Out of that I know that one of the dongles does not support WiFi Direct. but does
Network Monitor Mode and serves as a WiFi snooper for Wireshark.
To learn the API I started by downloading both sample applications from GitHub for
WifiDirect and WiFiDirect Services. I compiled and deployed both applications locally and remotely without any problem for X86, X64 and ARM platforms.
I started with WiFiDirect. The Advertiser (host) starts to advertise, the Connector (client) detects the advertiser in a flash as soon as I click Start Watcher in the client app.
THE PROBLEM
1) I can't get the host and client units to pair reliably. After several trials and error I managed to get a host and a client to pair and after that the connection seems to be stable and I can exchange messages back and forth. I tried all possible combinations
of host and client without apparent change in behavior.
2) If I Unpair the devices, it is virtually impossible to get them to pair again. The host Declines the pairing requests immediately.
A search on one of the host registry's HKLM section shows that there are two sections with several entries with a decorated SSID of the client (i.e. DIRECT-UVDB410C-01DSWB, been DB410C-01 the windows name of the client in this case. Each entry has a
unique variant of pre and suffixes)
there are several entries in this branch:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles\{-different-GUIDs-}
And also in this branch:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\Unmanaged\-very-long-numbers-xxx
Which tells me that the host registry is now contaminated with flaw profiles of the client and probably won't let me do a clean pairing again. Obviously I don't want to risk deleting these entries by hand without understanding the consequences. So, first
question:
How do I clean my registry of all these probably faulty profiles?
I tried all possible combinations of host and client and WiFi dongles to get to the conclusion that this problem is somewhere in the API or the OS. I spent the last two days trying to locate in GitHub the source or at least the symbol library for
Windows.Devices.WifiDirect.dll without luck.
Question 2: Isn't this suppose to be open source code?
Finally, I tried also the WiFiDirect Services sample. In this case the pairing seems to be handled well initially, but the app fails later to maintain the connection (devices are 2 to 10 feet apart). I didn't explore more on this and
went back to first problem.
If I left two devices paired with this app and switch back to the original WiFiDirect app, the host is initially listed as
PAIRED by the client, but when I try to connect them the pairing gets immediately revoked. (the client shows the change of status).
The Channel 9 Video shows how simple it suppose to be using this API.
https://channel9.msdn.com/Events/Build/2015/3-98
Unfortunately that was not my experience. I don't intend to get a PHd in WiFi, but at this point it looks like where I'm heading. I need help and direction please!
Question 3: Where do I go from here?
Hi GMGallo,
Are you following the steps at
https://developer.microsoft.com/en-us/windows/iot/docs/setupwifidirect ? If these are failing for you there is also the option to give feedback at GITHUB.
Are you adapters in the supported list on that page? Where do the steps actually fail for you?
Sincerely,
IOTGirl

Related Links

Remote Desktop\Thin Client
Win 10 IoT Remote update multiple devices
Node.js Express 4 App not running on Raspberry pi 15063
windows iot remote display security
The accuracy of measuring a plus width by using GPIO event and stopwatch
Installing application on Windows IoT
RPi Serial Port Start Bit
Older Insider Preview ISOs
Formatting an SD card once windows 10 is installed on it
Infrared sensor needed für Win IoT
GPIOOneWire DHT22/AM2302
HD Photo Capture on Dragonboard
How to do plugins or scripting in UWP for Windows 10 IoT Core (RPi)
Checking if SpiDevice is ready
Microsoft.IoT.Lightning namespace unavailable in Microsoft.IoT.Lightning nuget package 1.0.4
serving asp.net pages from my raspberry p2 device

Categories

MSDN
SharePoint
Commerce Server
HealthVault
SQL Server
SQL Server (Pre-release)
Dynamics
Software Entwicklung f...
Visual F#
Visual Studio Setup an...
Visual Studio Diagnost...
Publishing Windows Sto...
Submitting and Publish...
AdSDK Integration & Ad...
Store Engagement Frame...
Windows Desktop Develo...
Peer-to-Peer Networkin...
User Interface develop...
Windows Desktop Pro-Au...
Windows Desktop Winsoc...
Windows Hardware WDK a...
Developing Apps for Of...
Excel for Developers
Open XML Format SDK
SharePoint 2013 - Usin...
SharePoint Legacy Vers...
Microsoft Azure Site R...
Azure Scheduler
Azure Mobile Engagement
Azure DevTest Labs
Publishing Apps for th...
Team Foundation Server...
Commerce Server 2009
Microsoft Solver Found...
Debugger Canvas
Microsoft Device Emulator
SQL Server Analysis Se...
Transact-SQL
SQL Server Samples and...
Microsoft StreamInsight
Database Design
SQL Server Manageability
Standard 2009: Compone...
SQL Server 2012 Spatia...
SQL Server 2012 PowerP...
Windows Forms Designer
Windows Live  Spaces: ...
Windows Live ID: Devel...
Bing Maps for Windows ...
Windows File Sharing P...
Project Customization ...
Microsoft Atlas APIs: ...
Silverlight 4
Visual Studio & Silver...
WCF RIA Services with ...
Game Development with ...
Retired SharePoint Bus...
Retired SharePoint Exc...
ASMX Web Services and ...
Building Windows Store...
Core Coding Experience...
Crystal Reports for Vi...
HealthVault Data Types
(Retired) Exchange Pre...
JScript for the .NET F...
Parallel Computing Gen...
patterns & practices: ...
Pex and Moles PowerTool
Popfly Explorer
POS for .NET
Search Server: Develop...
Search Server: Feature...
SQL Azure Labs Support
SQL Server 2014 Data Q...
Team Foundation Server...
TFS Deployment to Azure
Visual C# 2008 (Pre-re...
Visual C++ 2008 (Pre-r...
Visual Studio Async CTP
Windows Developer Prev...
Windows Live Search: D...
Windows XP Wireless SDK

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile