Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WiFi Direct in Windows 10 says "UnsupportedHardware" althought it should be supported

I'll try to keep it short. I've been running in Windows 10 (10130) Microsoft's WiFi Direct Services example available on GitHub , the C# one in Visual Studio 2015 RC. Now, in their Build conference they said you can run in CMD a command to know if your WiFi adapter is compatible with WiFi Direct

netsh wlan show wirelesscap

Which gives me a big YES, your wireless adapter is compatible.

Wi-Fi Direct Device                  : Supported
Wi-Fi Direct GO                      : Supported
Wi-Fi Direct Client                  : Supported

But when I run the mentioned sample, everything goes OK until the WiFiDirectServiceWrapper.OnAdvertisementStatusChanged(. . .) is triggered, almost inmediatly after creating the advertiser. While running the sample with the profiler attached I get this:

private void OnAdvertisementStatusChanged(WiFiDrectServiceAdvertiser sender, object args)

--

sender | {Windows.Devices.WiFiDirect.Services.WiFiDirectServiceAdvertiser}
    AdvertisementStatus: Aborted
    AutoAcceptSession: true
    CustomServiceStatusCode: 0
    DeferredSessionInfo: null
    PreferGroupOwnerMode: true
    PreferredConfigurationMethods : _native, can't see_
    ServiceError: UnsupportedHardware
    ServiceInfo: null
    ServiceName: "myservice"
    ServiceNamePrefixes: {System.__comObject}
    ServiceStatus: Available

I really don't know how I'm supposed to depurate this, as I can't find where this Event is raised (the only references to that method are

this.advertiser.AdversitementStatusChanged += OnAdvertisementStatusChanged
this.advertiser.AdversitementStatusChanged -= OnAdvertisementStatusChanged

^ those), and I can't see the WifiDirectServiceAdvertiser implementation.

My WiFi Card is a Qualcomm Atheros AR9485, and I'm using the latest drivers available through Windows Update. In the device manager I get two Wi-Fi Direct Virtual adapters:

Microsoft Wi-Fi Direct Virtual Adapter
Microsoft Wi-Fi Direct Virtual Adapter #2

The second one is disabled sometimes (the UnsupportedHardware event is the same, enabled or disabled). For all of them I've disabled the "Allow the PC to shut down this device to save energy" option.

I've tried to compile the code to x86 and x64, but I get the same result at the same point. I've tried another two generic wireless thumbs (those USB WiFi adapters) which Windows says yes, they're compatible too with no luck.

I know Windows 10 is not final, but any help is appreciated.

like image 515
S_Luis Avatar asked Jun 23 '15 09:06

S_Luis


1 Answers

It seems that the WiFiDirect capabilities are not the only ones you need to look at if the thing you want to do is advertise a service (which is actually the "new in Windows 10 thing" concerning Direct).

The command you must execute is exactly the same as before:

netsh wlan show wirelesscap

but if you want to advertise a service, the relevant capabilities are the following:

P2P Device Discovery        : Supported
P2P Service Name Discovery  : Supported
P2P Service Info Discovery  : Supported
P2P Background Discovery    : Supported

What WiFiDirect does in Windows since 8 and 8.1 is advertising the whole computer, but since 10, WiFiDirectServices advertises one or more services running simultaneously in your machine.

Lets say you are the developer of com.boardgames. If you want to host a board games competition somewhere without a WiFi hard AP, that could be the prefix of the name of all your services, so each client connects only to the one they want: for example, com.boardgames.solitaire or com.boardgames.chess instead of connecting to your machine.

Sadly, none of the computers nor WiFi antennas I've tried are compatible with P2P discoveries.

like image 181
S_Luis Avatar answered Sep 19 '22 04:09

S_Luis