我已经实现了使用WCN(WPS)连接到设备的Delphi代码,该设备适用于Windows 7和Windows 7。 Windows 8(.1)。
首先,代码尝试检测正确的IWCNDevice
,一旦找到合适的设备,它将:
wcnDevice.SetPassword( )
wcnDevice.Connect( wcnConnectionNotify )
在Windows 10下,检索wcnDevice,可以创建wcnConnectNotify对象并接收以下MSM / ACM事件序列:
- 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次: source = 0x10:0x0010:MSM / Code = 0x39:
然后IWCNConnectNotify.ConnectFailed( )
会触发错误代码0x80004005,而不会在设备上按下WPS按钮(对于超时来说太早了)。
- 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临时配置文件reasonCode = 0x38001
我没有找到关于WCN的MSDN文档的新信息,这些信息表明Windows 10发生了变化:https://msdn.microsoft.com/en-us/library/windows/desktop/dd323260%28v=vs.85%29.aspx
是否有人遇到过同样的问题,并且能够找到解决方法?