为了连接到一个开放的接入点,我填写了 WLAN_CONNECTION_PARAMETERS 结构如下
WLAN_CONNECTION_PARAMETERS ConnectionParameters;
ConnectionParameters.wlanConnectionMode = wlan_connection_mode_discovery_unsecure;
ConnectionParameters.strProfile = L"";
ConnectionParameters.pDot11Ssid = &Dot11Ssid;
ConnectionParameters.pDesiredBssidList = nullptr;
ConnectionParameters.dot11BssType = dot11_BSS_type_independent;
ConnectionParameters.dwFlags = WLAN_CONNECTION_ADHOC_JOIN_ONLY;
WlanConnect()
函数ERROR_SUCCESS
返回。
NotificationCallback()
函数打印:
wlan_notification_acm_connection_start
Currently connecting to "BT.03" using profile "BT.03" **// Correct**
WLAN_NOTIFICATION_SOURCE_ACM
**wlan_notification_acm_connection_attempt_fail**
The connection failed. wlanReasonCode: 163851
The reason is "La rete specificata non è disponibile."
错误在哪里?
您是否有一段代码可以连接到具有特定 ssid 的新开放无线接入点?