Windows 10 中的 WiFi Direct 表示 "UnsupportedHardware" 虽然应该支持

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

我会尽量保持简短。我在 Windows 10 (10130) Microsoft 的 WiFi Direct 服务示例中 运行ning available on GitHub , the C# one in Visual Studio 2015 RC. Now, in their Build conference they said 你可以在 CMD 中 运行 命令来了解你的 WiFi 适配器是否兼容WiFi 直连

netsh wlan show wirelesscap

这让我大吃一惊是的,您的无线适配器兼容

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

但是当我 运行 提到的示例时,一切正常,直到 WiFiDirectServiceWrapper.OnAdvertisementStatusChanged(. . .) 被触发,几乎是在创建广告商。 运行在附加分析器的样本中我得到了这个:

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

我真的不知道该如何净化它,因为我找不到引发此事件的位置(对该方法的唯一引用是

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

^ 那些),我看不到 WifiDirectServiceAdvertiser 实现。

我的 WiFi 卡是 Qualcomm Atheros AR9485,我使用的是可通过 Windows 更新获得的最新驱动程序。在设备管理器中,我得到两个 Wi-Fi Direct 虚拟适配器:

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

第二个有时被禁用(UnsupportedHardware事件是一样的,启用或禁用)。对于所有这些,我都禁用了 "Allow the PC to shut down this device to save energy" 选项。

我尝试将代码编译为 x86 和 x64,但我在同一点得到了相同的结果。我已经尝试了另外两个通用无线拇指(那些 USB WiFi 适配器),Windows 说 是的,它们也兼容 ,但运气不好。

我知道 Windows 10 不是最终的,但我们将不胜感激。

如果您想做的是为服务做广告(实际上是 "new in Windows 10 thing"关于直接)。

您必须执行的命令与之前完全相同:

netsh wlan show wirelesscap

但是如果你想宣传一个服务,相关的能力如下:

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

自 8 和 8.1 起,WiFiDirect 在 Windows 中所做的是 通告整台计算机 ,但自 10 起,WiFiDirectServices 会同时通告一项或多项服务 运行在你的机器里。

假设您是 com.boardgames 的开发者。如果你想在没有 WiFi 硬 AP 的地方举办棋盘游戏比赛,那可能是你所有服务名称的前缀,所以每个客户端只连接到他们想要的那个:例如,com.boardgames.solitairecom.boardgames.chess 而不是连接到 你的机器.

遗憾的是,none 我试过的计算机和 WiFi 天线都与 P2P 发现兼容。