WLAN_REASON_CODE
The WLAN_REASON_CODE type indicates the reason a WLAN operation has failed.
You can use the WlanReasonCodeToString function to map a numeric reason code (for example, 0x00050007) to its text meaning. You can also use the lookup table to help interpret the numeric value of the reason code. To view the lookup table, see Appendix E: Mapping of reason codes to event messages in the document Troubleshooting Windows Vista 802.11 Wireless Connections.
typedef DWORD WLAN_REASON_CODE, *PWLAN_REASON_CODE;
The following table lists general error codes.
Reason code | Meaning |
---|---|
WLAN_REASON_CODE_SUCCESS | The operation succeeds. |
WLAN_REASON_CODE_UNKNOWN | The reason for failure is unknown. |
The following table lists automatic configuration error codes.
Reason Code | Meaning |
---|---|
WLAN_REASON_CODE_NETWORK_NOT_COMPATIBLE | The wireless network is not compatible. |
WLAN_REASON_CODE_PROFILE_NOT_COMPATIBLE | The wireless network profile is not compatible. |
The following table lists automatic connection error codes.
Reason Code | Meaning |
---|---|
WLAN_REASON_CODE_NO_AUTO_CONNECTION | The profile specifies no auto connection. |
WLAN_REASON_CODE_NOT_VISIBLE | The wireless network is not visible. |
WLAN_REASON_CODE_GP_DENIED | The wireless network is blocked by group policy. |
WLAN_REASON_CODE_USER_DENIED | The wireless network is blocked by the user. |
WLAN_REASON_CODE_BSS_TYPE_NOT_ALLOWED | The basic service set (BSS) type is not allowed on this wireless adapter. |
WLAN_REASON_CODE_IN_FAILED_LIST | The wireless network is in the failed list. |
WLAN_REASON_CODE_IN_BLOCKED_LIST | The wireless network is in the blocked list. |
WLAN_REASON_CODE_SSID_LIST_TOO_LONG | The size of the service set identifiers (SSID) list exceeds the maximum size supported by the adapter. |
WLAN_REASON_CODE_CONNECT_CALL_FAIL | The Media Specific Module (MSM) connect call fails. |
WLAN_REASON_CODE_SCAN_CALL_FAIL | The MSM scan call fails. |
WLAN_REASON_CODE_NETWORK_NOT_AVAILABLE | The specified network is not available.This reason code is also used when there is a mismatch between capabilities specified in an XML profile and interface and/or network capabilities. For example, if a profile specifies the use of WPA2 when the NIC only supports WPA, then this error code is returned. Also, if a profile specifies the use of FIPS mode when the NIC does not support FIPS mode, then this error code is returned. |
WLAN_REASON_CODE_PROFILE_CHANGED_OR_DELETED | The profile was changed or deleted before the connection was established. |
WLAN_REASON_CODE_KEY_MISMATCH | The profile key does not match the network key. |
WLAN_REASON_CODE_USER_NOT_RESPOND | The user is not responding. |
WLAN_REASON_CODE_AP_PROFILE_NOT_ALLOWED_FOR_CLIENT | An application tried to apply a wireless Hosted Network profile to a physical wireless network adapter using the WlanSetProfile function, rather than to a virtual device. |
WLAN_REASON_CODE_AP_PROFILE_NOT_ALLOWED | An application tried to apply a wireless Hosted Network profile to a physical wireless network adapter using the WlanSetProfile function, rather than to a virtual device. |
The following table lists profile validation error codes.
Reason Code | Meaning |
---|---|
WLAN_REASON_CODE_INVALID_PROFILE_SCHEMA | The profile invalid according to the schema. |
WLAN_REASON_CODE_PROFILE_MISSING | The WLANProfile element is missing. |
WLAN_REASON_CODE_INVALID_PROFILE_NAME | The name of the profile is invalid. |
WLAN_REASON_CODE_INVALID_PROFILE_TYPE | The type of the profile is invalid. |
WLAN_REASON_CODE_INVALID_PHY_TYPE | The PHY type is invalid. |
WLAN_REASON_CODE_MSM_SECURITY_MISSING | The MSM security settings are missing. |
WLAN_REASON_CODE_IHV_SECURITY_NOT_SUPPORTED | The independent hardware vendor (IHV) security settings are missing. |
WLAN_REASON_CODE_IHV_OUI_MISMATCH | The IHV profile OUI did not match with the adapter OUI. |
WLAN_REASON_CODE_IHV_OUI_MISSING | The IHV OUI settings are missing. |
WLAN_REASON_CODE_IHV_SETTINGS_MISSING | The IHV security settings are missing. |
WLAN_REASON_CODE_IHV_CONNECTIVITY_NOT_SUPPORTED | An application tried to apply an IHV profile on an adapter that does not support IHV connectivity settings. |
WLAN_REASON_CODE_CONFLICT_SECURITY | The security settings conflict. |
WLAN_REASON_CODE_SECURITY_MISSING | The security settings are missing. |
WLAN_REASON_CODE_INVALID_BSS_TYPE | The BSS type is not valid. |
WLAN_REASON_CODE_INVALID_ADHOC_CONNECTION_MODE | Automatic connection cannot be set for an ad hoc network. |
WLAN_REASON_CODE_NON_BROADCAST_SET_FOR_ADHOC | Non-broadcast cannot be set for an ad hoc network. |
WLAN_REASON_CODE_AUTO_SWITCH_SET_FOR_ADHOC | Auto-switch cannot be set for an ad hoc network. |
WLAN_REASON_CODE_AUTO_SWITCH_SET_FOR_MANUAL_CONNECTION | Auto-switch cannot be set for a manual connection profile. |
WLAN_REASON_CODE_IHV_SECURITY_ONEX_MISSING | The IHV 802.1X security settings are missing. |
WLAN_REASON_CODE_PROFILE_SSID_INVALID | The SSID in the profile is invalid or missing. |
WLAN_REASON_CODE_TOO_MANY_SSID | Too many SSIDs were specified in the profile. |
WLAN_REASON_CODE_IHV_CONNECTIVITY_NOT_SUPPORTED | |
WLAN_REASON_CODE_BAD_MAX_NUMBER_OF_CLIENTS_FOR_AP | An application tried to apply a wireless Hosted Network profile to a physical network adapter NIC using the WlanSetProfile function, and specified an unacceptable value for the maximum number of clients allowed. |
WLAN_REASON_CODE_INVALID_CHANNEL | The channel specified is invalid. |
WLAN_REASON_CODE_OPERATION_MODE_NOT_SUPPORTED | |
WLAN_REASON_CODE_AUTO_AP_PROFILE_NOT_ALLOWED | An internal operating system error occurred with the wireless Hosted Network. |
WLAN_REASON_CODE_AUTO_CONNECTION_NOT_ALLOWED |
The following table lists MSM network incompatibility error codes.
Reason Code | Meaning |
---|---|
WLAN_REASON_CODE_UNSUPPORTED_SECURITY_SET_BY_OS | The security settings are not supported by the operating system. |
WLAN_REASON_CODE_UNSUPPORTED_SECURITY_SET | The security settings are not supported. |
WLAN_REASON_CODE_BSS_TYPE_UNMATCH | The BSS type does not match. |
WLAN_REASON_CODE_PHY_TYPE_UNMATCH | The PHY type does not match. |
WLAN_REASON_CODE_DATARATE_UNMATCH | The data rate does not match. |
The following table lists MSM connection failure error codes.
Reason Code | Meaning |
---|---|
WLAN_REASON_CODE_USER_CANCELLED | User has canceled the operation. |
WLAN_REASON_CODE_ASSOCIATION_FAILURE | Driver disconnected while associating. |
WLAN_REASON_CODE_ASSOCIATION_TIMEOUT | Association timed out. |
WLAN_REASON_CODE_PRE_SECURITY_FAILURE | Pre-association security failure. |
WLAN_REASON_CODE_START_SECURITY_FAILURE | Failed to start security after association. |
WLAN_REASON_CODE_SECURITY_FAILURE | Security ends up with failure. |
WLAN_REASON_CODE_SECURITY_TIMEOUT | Security operation times out. |
WLAN_REASON_CODE_ROAMING_FAILURE | Driver disconnected while roaming. |
WLAN_REASON_CODE_ROAMING_SECURITY_FAILURE | Failed to start security for roaming. |
WLAN_REASON_CODE_ADHOC_SECURITY_FAILURE | Failed to start security for ad hoc peer. |
WLAN_REASON_CODE_DRIVER_DISCONNECTED | Driver disconnected. |
WLAN_REASON_CODE_DRIVER_OPERATION_FAILURE | Driver failed to perform some operations. |
WLAN_REASON_CODE_IHV_NOT_AVAILABLE | The IHV service is not available. |
WLAN_REASON_CODE_IHV_NOT_RESPONDING | The response from the IHV service timed out. |
WLAN_REASON_CODE_DISCONNECT_TIMEOUT | Timed out waiting for the driver to disconnect. |
WLAN_REASON_CODE_INTERNAL_FAILURE | An internal error prevented the operation from being completed. |
WLAN_REASON_CODE_UI_REQUEST_TIMEOUT | A user interaction request timed out. |
WLAN_REASON_CODE_TOO_MANY_SECURITY_ATTEMPTS | Roaming too often. Post security was not completed after 5 attempts. |
WLAN_REASON_CODE_AP_STARTING_FAILURE | An internal operating system error occurred that resulted in a failure to start the wireless Hosted Network. |
The following table lists MSM security error codes.
Reason Code | Meaning |
---|---|
WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_KEY_INDEX | Key index specified is not valid. |
WLAN_REASON_CODE_MSMSEC_PROFILE_PSK_PRESENT | Key required, PSK present. |
WLAN_REASON_CODE_MSMSEC_PROFILE_KEY_LENGTH | Invalid key length. |
WLAN_REASON_CODE_MSMSEC_PROFILE_PSK_LENGTH | Invalid PSK length. |
WLAN_REASON_CODE_MSMSEC_PROFILE_NO_AUTH_CIPHER_SPECIFIED | No auth/cipher pairs specified. |
WLAN_REASON_CODE_MSMSEC_PROFILE_TOO_MANY_AUTH_CIPHER_SPECIFIED | Too many auth/cipher pairs specified. |
WLAN_REASON_CODE_MSMSEC_PROFILE_DUPLICATE_AUTH_CIPHER | Profile contains duplicate auth/cipher pair. |
WLAN_REASON_CODE_MSMSEC_PROFILE_RAWDATA_INVALID | Profile raw data is invalid. |
WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_AUTH_CIPHER | Invalid auth/cipher combination. |
WLAN_REASON_CODE_MSMSEC_PROFILE_ONEX_DISABLED | 802.1X disabled when it is required to be enabled. |
WLAN_REASON_CODE_MSMSEC_PROFILE_ONEX_ENABLED | 802.1X enabled when it is required to be disabled. |
WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_PMKCACHE_MODE | Invalid PMK cache mode. |
WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_PMKCACHE_SIZE | Invalid PMK cache size. |
WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_PMKCACHE_TTL | Invalid PMK cache TTL. |
WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_PREAUTH_MODE | Invalid preauth mode. |
WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_PREAUTH_THROTTLE | Invalid preauth throttle. |
WLAN_REASON_CODE_MSMSEC_PROFILE_PREAUTH_ONLY_ENABLED | Preauth enabled when PMK cache is disabled. |
WLAN_REASON_CODE_MSMSEC_CAPABILITY_NETWORK | Capability matching failed at network. |
WLAN_REASON_CODE_MSMSEC_CAPABILITY_NIC | Capability matching failed at NIC. |
WLAN_REASON_CODE_MSMSEC_CAPABILITY_PROFILE | Capability matching failed at profile. |
WLAN_REASON_CODE_MSMSEC_CAPABILITY_DISCOVERY | Network does not support specified capability type. |
WLAN_REASON_CODE_MSMSEC_PROFILE_PASSPHRASE_CHAR | Passphrase contains invalid character. |
WLAN_REASON_CODE_MSMSEC_PROFILE_KEYMATERIAL_CHAR | Key material contains invalid character. |
WLAN_REASON_CODE_MSMSEC_PROFILE_WRONG_KEYTYPE | The key type specified does not match the key material. |
WLAN_REASON_CODE_MSMSEC_MIXED_CELL | A mixed cell is suspected. The AP is not signaling that it is compatible with a privacy-enabled profile. |
WLAN_REASON_CODE_MSMSEC_PROFILE_AUTH_TIMERS_INVALID | The number of authentication timers or the number of timeouts specified in the profile is invalid. |
WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_GKEY_INTV | The group key update interval specified in the profile is invalid. |
WLAN_REASON_CODE_MSMSEC_TRANSITION_NETWORK | A "transition network" is suspected. Legacy 802.11 security is used for the next authentication attempt. |
WLAN_REASON_CODE_MSMSEC_PROFILE_KEY_UNMAPPED_CHAR | The key contains characters that are not in the ASCII character set. |
WLAN_REASON_CODE_MSMSEC_CAPABILITY_PROFILE_AUTH | Capability matching failed because the network does not support the authentication method in the profile. |
WLAN_REASON_CODE_MSMSEC_CAPABILITY_PROFILE_CIPHER | Capability matching failed because the network does not support the cipher algorithm in the profile. |
WLAN_REASON_CODE_MSMSEC_PROFILE_SAFE_MODE | FIPS 140-2 mode value in the profile is invalid. |
WLAN_REASON_CODE_MSMSEC_CAPABILITY_PROFILE_SAFE_MODE_NIC | Profile requires FIPS 140-2 mode, which is not supported by network interface card (NIC). |
WLAN_REASON_CODE_MSMSEC_CAPABILITY_PROFILE_SAFE_MODE_NW | Profile requires FIPS 140-2 mode, which is not supported by network. |
WLAN_REASON_CODE_MSMSEC_PROFILE_UNSUPPORTED_AUTH | Profile specifies an unsupported authentication ,mechanism. |
WLAN_REASON_CODE_MSMSEC_PROFILE_UNSUPPORTED_CIPHER | Profile specifies an unsupported cipher. |
WLAN_REASON_CODE_MSMSEC_UI_REQUEST_FAILURE | Failed to queue the user interface request. |
WLAN_REASON_CODE_MSMSEC_CAPABILITY_MFP_NW_NIC | The wireless LAN requires Management Frame Protection (MFP) and the network interface does not support MFP. For more information, see the IEEE 802.11w amendment to the 802.11 standard. |
The following table lists MSM connection error codes.
Reason Code | Meaning |
---|---|
WLAN_REASON_CODE_MSMSEC_AUTH_START_TIMEOUT | 802.1X authentication did not start within configured time. |
WLAN_REASON_CODE_MSMSEC_AUTH_SUCCESS_TIMEOUT | 802.1X authentication did not complete within configured time. |
WLAN_REASON_CODE_MSMSEC_KEY_START_TIMEOUT | Dynamic key exchange did not start within configured time. |
WLAN_REASON_CODE_MSMSEC_KEY_SUCCESS_TIMEOUT | Dynamic key exchange did not complete within configured time. |
WLAN_REASON_CODE_MSMSEC_M3_MISSING_KEY_DATA | Message 3 of 4-way handshake has no key data. |
WLAN_REASON_CODE_MSMSEC_M3_MISSING_IE | Message 3 of 4-way handshake has no IE. |
WLAN_REASON_CODE_MSMSEC_M3_MISSING_GRP_KEY | Message 3 of 4-way handshake has no GRP key. |
WLAN_REASON_CODE_MSMSEC_PR_IE_MATCHING | Matching security capabilities of IE in M3 failed. |
WLAN_REASON_CODE_MSMSEC_SEC_IE_MATCHING | Matching security capabilities of secondary IE in M3 failed. |
WLAN_REASON_CODE_MSMSEC_NO_PAIRWISE_KEY | Required a pairwise key but access point (AP) configured only group keys. |
WLAN_REASON_CODE_MSMSEC_G1_MISSING_KEY_DATA | Message 1 of group key handshake has no key data. |
WLAN_REASON_CODE_MSMSEC_G1_MISSING_GRP_KEY | Message 1 of group key handshake has no group key. |
WLAN_REASON_CODE_MSMSEC_PEER_INDICATED_INSECURE | AP reset secure bit after connection was secured. |
WLAN_REASON_CODE_MSMSEC_NO_AUTHENTICATOR | 802.1X indicated that there is no authenticator, but the profile requires one. |
WLAN_REASON_CODE_MSMSEC_NIC_FAILURE | Plumbing settings to NIC failed. |
WLAN_REASON_CODE_MSMSEC_CANCELLED | Operation was canceled by a caller. |
WLAN_REASON_CODE_MSMSEC_KEY_FORMAT | Entered key format is not in a valid format. |
WLAN_REASON_CODE_MSMSEC_DOWNGRADE_DETECTED | A security downgrade was detected. |
WLAN_REASON_CODE_MSMSEC_PSK_MISMATCH_SUSPECTED | A PSK mismatch is suspected. |
WLAN_REASON_CODE_MSMSEC_FORCED_FAILURE | There was a forced failure because the connection method was not secure. |
WLAN_REASON_CODE_MSMSEC_M3_TOO_MANY_RSNIE | Message 3 of 4 way handshake contains too many RSN IE (RSN). |
WLAN_REASON_CODE_MSMSEC_M2_MISSING_KEY_DATA | Message 2 of 4 way handshake has no key data (RSN Adhoc). |
WLAN_REASON_CODE_MSMSEC_M2_MISSING_IE | Message 2 of 4 way handshake has no IE (RSN Adhoc). |
WLAN_REASON_CODE_MSMSEC_AUTH_WCN_COMPLETED | |
WLAN_REASON_CODE_MSMSEC_SECURITY_UI_FAILURE | The security UI request failed because the request could not be queued or because the user canceled the request. |
WLAN_REASON_CODE_MSMSEC_M3_MISSING_MGMT_GRP_KEY | Message 3 of 4 way handshake has no Mgmt Group Key (RSN). |
WLAN_REASON_CODE_MSMSEC_G1_MISSING_MGMT_GRP_KEY | Message 1 of group key handshake has no group management key. |
The following table lists 802.1X reason codes. Schema elements named below are defined in the OneX schema and specified in the WLAN profile.
Reason Code | Meaning |
---|---|
ONEX_UNABLE_TO_IDENTIFY_USER | No user is available for 802.1X authentication. This error can occur when machine authentication is disabled and no user is logged on to the machine. |
ONEX_IDENTITY_NOT_FOUND | The 802.1X identity could not be found. |
ONEX_UI_DISABLED | Authentication could only be completed through the user interface and this interface could not be displayed. |
ONEX_EAP_FAILURE_RECEIVED | The EAP authentication failed. |
ONEX_AUTHENTICATOR_NO_LONGER_PRESENT | The 802.1X authenticator went away from the network. |
ONEX_PROFILE_VERSION_NOT_SUPPORTED | The version of the OneX profile supplied is not supported. |
ONEX_PROFILE_INVALID_LENGTH | The OneX profile has an invalid length. |
ONEX_PROFILE_DISALLOWED_EAP_TYPE | The EAP type specified in the OneX profile(possibly supplied by the EAPType element) is not allowed. |
ONEX_PROFILE_INVALID_EAP_TYPE_OR_FLAG | The EAP Type specified in the OneX profile (possibly supplied by the EAPType element) is invalid, or one of the EAP flags (possibly supplied in the EAPConfig element) is invalid. |
ONEX_PROFILE_INVALID_ONEX_FLAGS | The supplicant flags (possibly supplied in the EAPConfig element) in the OneX profile are invalid. |
ONEX_PROFILE_INVALID_TIMER_VALUE | A timer specified in the OneX profile (possibly supplied by the heldPeriod, authPeriod, or startPeriod element) is invalid. |
ONEX_PROFILE_INVALID_SUPPLICANT_MODE | The supplicant mode specified in the OneX profile (possibly supplied by the supplicantMode element) is invalid. |
ONEX_PROFILE_INVALID_AUTH_MODE | The authentication mode specified in the OneX profile (possibly supplied by the authMode element) is invalid. |
ONEX_PROFILE_INVALID_EAP_CONNECTION_PROPERTIES | The connection properties specified in the OneX profile (possibly supplied by the EAPConfig element) are invalid. |
Remarks
A limited set of reason codes are supported on Windows XP with Service Pack 3 (SP3) and on the Wireless LAN API for Windows XP with Service Pack 2 (SP2). The profile validation error codes supported on Windows XP with SP3 and on the Wireless LAN API for Windows XP with SP2 are as follows:
- WLAN_REASON_CODE_INVALID_PROFILE_SCHEMA
- WLAN_REASON_CODE_PROFILE_MISSING
- WLAN_REASON_CODE_PROFILE_SSID_INVALID
The MSM security error codes supported on Windows XP with SP3 and on the Wireless LAN API for Windows XP with SP2 are as follows:
- WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_KEY_INDEX
- WLAN_REASON_CODE_MSMSEC_PROFILE_KEY_LENGTH
- WLAN_REASON_CODE_MSMSEC_PROFILE_PSK_LENGTH
- WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_AUTH_CIPHER
- WLAN_REASON_CODE_MSMSEC_PROFILE_ONEX_DISABLED
- WLAN_REASON_CODE_MSMSEC_PROFILE_ONEX_ENABLED
- WLAN_REASON_CODE_MSMSEC_CAPABILITY_NETWORK
- WLAN_REASON_CODE_MSMSEC_CAPABILITY_NIC
- WLAN_REASON_CODE_MSMSEC_PROFILE_KEYMATERIAL_CHAR
- WLAN_REASON_CODE_MSMSEC_PROFILE_WRONG_KEYTYPE
The 802.1x error codes supported on Windows XP with SP3 and on the Wireless LAN API for Windows XP with SP2 are as follows:
- ONEX_PROFILE_INVALID_LENGTH
- ONEX_PROFILE_INVALID_EAP_TYPE_OR_FLAG
- ONEX_PROFILE_INVALID_AUTH_MODE
- ONEX_PROFILE_INVALID_EAP_CONNECTION_PROPERTIES
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista, Windows XP with SP3 [desktop apps only] |
Minimum supported server |
Windows Server 2008 [desktop apps only] |
Redistributable |
Wireless LAN API for Windows XP with SP2 |
Header |
|
See also