WCN (connect to device using WPS) does not work under Windows 10

可紊 提交于 2019-12-24 14:13:35

问题


I have implemented Delphi code to connect to a device using WCN (WPS) that works on Windows 7 & Windows 8(.1).

First, the code tries to detect the proper IWCNDevice, and once the proper device has been found it will:

  • Set the password to empty using wcnDevice.SetPassword( )
  • Create an object that implements IWCNConnectNotify. (= wcnConnectionNotify )
  • Call wcnDevice.Connect( wcnConnectionNotify )

Under Windows 10, the wcnDevice is retrieved, the wcnConnectNotify object can be created and the following sequence of MSM / ACM Events is received:

  • source=0x10: 0x0010:MSM / Code=0x1: wlan_notification_msm_associating
  • source=0x10: 0x0010:MSM / Code=0x39:
  • source=0x10: 0x0010:MSM / Code=0x39:
  • ...
  • source=0x10: 0x0010:MSM / Code=0x2: wlan_notification_msm_associated
  • source=0x10: 0x0010:MSM / Code=0x3: wlan_notification_msm_authenticating
  • source=0x4: 0x0004:OneX / Code=0x1: OneXNotificationTypeResultUpdate
  • 10 times: source=0x10: 0x0010:MSM / Code=0x39:

Then IWCNConnectNotify.ConnectFailed( ) fires with error code 0x80004005, without the WPS button being pressed on the device (and way too early for a timeout).

  • source=0x8: 0x0008:ACM / Code=0x14: wlan_notification_acm_disconnecting
  • ProcessAcmMessage: code=0x14 ssid= profile= reasonCode=0x0

  • source=0x8: 0x0008:ACM / Code=0xA: wlan_notification_acm_connection_complete

  • ProcessAcmMessage: code=0xA ssid=WCN Temporary Profile profile=WCN Temporary Profile reasonCode=0x38001

I have found no new information on the MSDN documentation for WCN that would indicate that something changed for Windows 10:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd323260%28v=vs.85%29.aspx

Has anyone encountered the same issue, and was able to find a workaround?

来源:https://stackoverflow.com/questions/33283181/wcn-connect-to-device-using-wps-does-not-work-under-windows-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!