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 codeMeaning
WLAN_REASON_CODE_SUCCESSThe operation succeeds.
WLAN_REASON_CODE_UNKNOWNThe reason for failure is unknown.

 

The following table lists automatic configuration error codes.

Reason CodeMeaning
WLAN_REASON_CODE_NETWORK_NOT_COMPATIBLEThe wireless network is not compatible.
WLAN_REASON_CODE_PROFILE_NOT_COMPATIBLEThe wireless network profile is not compatible.

 

The following table lists automatic connection error codes.

Reason CodeMeaning
WLAN_REASON_CODE_NO_AUTO_CONNECTIONThe profile specifies no auto connection.
WLAN_REASON_CODE_NOT_VISIBLEThe wireless network is not visible.
WLAN_REASON_CODE_GP_DENIEDThe wireless network is blocked by group policy.
WLAN_REASON_CODE_USER_DENIEDThe wireless network is blocked by the user.
WLAN_REASON_CODE_BSS_TYPE_NOT_ALLOWEDThe basic service set (BSS) type is not allowed on this wireless adapter.
WLAN_REASON_CODE_IN_FAILED_LISTThe wireless network is in the failed list.
WLAN_REASON_CODE_IN_BLOCKED_LISTThe wireless network is in the blocked list.
WLAN_REASON_CODE_SSID_LIST_TOO_LONGThe size of the service set identifiers (SSID) list exceeds the maximum size supported by the adapter.
WLAN_REASON_CODE_CONNECT_CALL_FAILThe Media Specific Module (MSM) connect call fails.
WLAN_REASON_CODE_SCAN_CALL_FAILThe MSM scan call fails.
WLAN_REASON_CODE_NETWORK_NOT_AVAILABLEThe 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_DELETEDThe profile was changed or deleted before the connection was established.
WLAN_REASON_CODE_KEY_MISMATCHThe profile key does not match the network key.
WLAN_REASON_CODE_USER_NOT_RESPONDThe user is not responding.
WLAN_REASON_CODE_AP_PROFILE_NOT_ALLOWED_FOR_CLIENTAn 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_ALLOWEDAn 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 CodeMeaning
WLAN_REASON_CODE_INVALID_PROFILE_SCHEMAThe profile invalid according to the schema.
WLAN_REASON_CODE_PROFILE_MISSINGThe WLANProfile element is missing.
WLAN_REASON_CODE_INVALID_PROFILE_NAMEThe name of the profile is invalid.
WLAN_REASON_CODE_INVALID_PROFILE_TYPEThe type of the profile is invalid.
WLAN_REASON_CODE_INVALID_PHY_TYPEThe PHY type is invalid.
WLAN_REASON_CODE_MSM_SECURITY_MISSINGThe MSM security settings are missing.
WLAN_REASON_CODE_IHV_SECURITY_NOT_SUPPORTEDThe independent hardware vendor (IHV) security settings are missing.
WLAN_REASON_CODE_IHV_OUI_MISMATCHThe IHV profile OUI did not match with the adapter OUI.
WLAN_REASON_CODE_IHV_OUI_MISSINGThe IHV OUI settings are missing.
WLAN_REASON_CODE_IHV_SETTINGS_MISSINGThe IHV security settings are missing.
WLAN_REASON_CODE_IHV_CONNECTIVITY_NOT_SUPPORTEDAn application tried to apply an IHV profile on an adapter that does not support IHV connectivity settings.
WLAN_REASON_CODE_CONFLICT_SECURITYThe security settings conflict.
WLAN_REASON_CODE_SECURITY_MISSINGThe security settings are missing.
WLAN_REASON_CODE_INVALID_BSS_TYPEThe BSS type is not valid.
WLAN_REASON_CODE_INVALID_ADHOC_CONNECTION_MODEAutomatic connection cannot be set for an ad hoc network.
WLAN_REASON_CODE_NON_BROADCAST_SET_FOR_ADHOCNon-broadcast cannot be set for an ad hoc network.
WLAN_REASON_CODE_AUTO_SWITCH_SET_FOR_ADHOCAuto-switch cannot be set for an ad hoc network.
WLAN_REASON_CODE_AUTO_SWITCH_SET_FOR_MANUAL_CONNECTIONAuto-switch cannot be set for a manual connection profile.
WLAN_REASON_CODE_IHV_SECURITY_ONEX_MISSINGThe IHV 802.1X security settings are missing.
WLAN_REASON_CODE_PROFILE_SSID_INVALIDThe SSID in the profile is invalid or missing.
WLAN_REASON_CODE_TOO_MANY_SSIDToo many SSIDs were specified in the profile.
WLAN_REASON_CODE_IHV_CONNECTIVITY_NOT_SUPPORTED
WLAN_REASON_CODE_BAD_MAX_NUMBER_OF_CLIENTS_FOR_APAn 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_CHANNELThe channel specified is invalid.
WLAN_REASON_CODE_OPERATION_MODE_NOT_SUPPORTED
WLAN_REASON_CODE_AUTO_AP_PROFILE_NOT_ALLOWEDAn 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 CodeMeaning
WLAN_REASON_CODE_UNSUPPORTED_SECURITY_SET_BY_OSThe security settings are not supported by the operating system.
WLAN_REASON_CODE_UNSUPPORTED_SECURITY_SETThe security settings are not supported.
WLAN_REASON_CODE_BSS_TYPE_UNMATCHThe BSS type does not match.
WLAN_REASON_CODE_PHY_TYPE_UNMATCHThe PHY type does not match.
WLAN_REASON_CODE_DATARATE_UNMATCHThe data rate does not match.

 

The following table lists MSM connection failure error codes.

Reason CodeMeaning
WLAN_REASON_CODE_USER_CANCELLEDUser has canceled the operation.
WLAN_REASON_CODE_ASSOCIATION_FAILUREDriver disconnected while associating.
WLAN_REASON_CODE_ASSOCIATION_TIMEOUTAssociation timed out.
WLAN_REASON_CODE_PRE_SECURITY_FAILUREPre-association security failure.
WLAN_REASON_CODE_START_SECURITY_FAILUREFailed to start security after association.
WLAN_REASON_CODE_SECURITY_FAILURESecurity ends up with failure.
WLAN_REASON_CODE_SECURITY_TIMEOUTSecurity operation times out.
WLAN_REASON_CODE_ROAMING_FAILUREDriver disconnected while roaming.
WLAN_REASON_CODE_ROAMING_SECURITY_FAILUREFailed to start security for roaming.
WLAN_REASON_CODE_ADHOC_SECURITY_FAILUREFailed to start security for ad hoc peer.
WLAN_REASON_CODE_DRIVER_DISCONNECTEDDriver disconnected.
WLAN_REASON_CODE_DRIVER_OPERATION_FAILUREDriver failed to perform some operations.
WLAN_REASON_CODE_IHV_NOT_AVAILABLEThe IHV service is not available.
WLAN_REASON_CODE_IHV_NOT_RESPONDINGThe response from the IHV service timed out.
WLAN_REASON_CODE_DISCONNECT_TIMEOUTTimed out waiting for the driver to disconnect.
WLAN_REASON_CODE_INTERNAL_FAILUREAn internal error prevented the operation from being completed.
WLAN_REASON_CODE_UI_REQUEST_TIMEOUTA 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_FAILUREAn 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 CodeMeaning
WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_KEY_INDEXKey index specified is not valid.
WLAN_REASON_CODE_MSMSEC_PROFILE_PSK_PRESENTKey required, PSK present.
WLAN_REASON_CODE_MSMSEC_PROFILE_KEY_LENGTHInvalid key length.
WLAN_REASON_CODE_MSMSEC_PROFILE_PSK_LENGTHInvalid PSK length.
WLAN_REASON_CODE_MSMSEC_PROFILE_NO_AUTH_CIPHER_SPECIFIEDNo auth/cipher pairs specified.
WLAN_REASON_CODE_MSMSEC_PROFILE_TOO_MANY_AUTH_CIPHER_SPECIFIEDToo many auth/cipher pairs specified.
WLAN_REASON_CODE_MSMSEC_PROFILE_DUPLICATE_AUTH_CIPHERProfile contains duplicate auth/cipher pair.
WLAN_REASON_CODE_MSMSEC_PROFILE_RAWDATA_INVALIDProfile raw data is invalid.
WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_AUTH_CIPHERInvalid auth/cipher combination.
WLAN_REASON_CODE_MSMSEC_PROFILE_ONEX_DISABLED802.1X disabled when it is required to be enabled.
WLAN_REASON_CODE_MSMSEC_PROFILE_ONEX_ENABLED802.1X enabled when it is required to be disabled.
WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_PMKCACHE_MODEInvalid PMK cache mode.
WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_PMKCACHE_SIZEInvalid PMK cache size.
WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_PMKCACHE_TTLInvalid PMK cache TTL.
WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_PREAUTH_MODEInvalid preauth mode.
WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_PREAUTH_THROTTLEInvalid preauth throttle.
WLAN_REASON_CODE_MSMSEC_PROFILE_PREAUTH_ONLY_ENABLEDPreauth enabled when PMK cache is disabled.
WLAN_REASON_CODE_MSMSEC_CAPABILITY_NETWORKCapability matching failed at network.
WLAN_REASON_CODE_MSMSEC_CAPABILITY_NICCapability matching failed at NIC.
WLAN_REASON_CODE_MSMSEC_CAPABILITY_PROFILECapability matching failed at profile.
WLAN_REASON_CODE_MSMSEC_CAPABILITY_DISCOVERYNetwork does not support specified capability type.
WLAN_REASON_CODE_MSMSEC_PROFILE_PASSPHRASE_CHARPassphrase contains invalid character.
WLAN_REASON_CODE_MSMSEC_PROFILE_KEYMATERIAL_CHARKey material contains invalid character.
WLAN_REASON_CODE_MSMSEC_PROFILE_WRONG_KEYTYPEThe key type specified does not match the key material.
WLAN_REASON_CODE_MSMSEC_MIXED_CELLA 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_INVALIDThe number of authentication timers or the number of timeouts specified in the profile is invalid.
WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_GKEY_INTVThe group key update interval specified in the profile is invalid.
WLAN_REASON_CODE_MSMSEC_TRANSITION_NETWORKA "transition network" is suspected. Legacy 802.11 security is used for the next authentication attempt.
WLAN_REASON_CODE_MSMSEC_PROFILE_KEY_UNMAPPED_CHARThe key contains characters that are not in the ASCII character set.
WLAN_REASON_CODE_MSMSEC_CAPABILITY_PROFILE_AUTHCapability matching failed because the network does not support the authentication method in the profile.
WLAN_REASON_CODE_MSMSEC_CAPABILITY_PROFILE_CIPHERCapability matching failed because the network does not support the cipher algorithm in the profile.
WLAN_REASON_CODE_MSMSEC_PROFILE_SAFE_MODEFIPS 140-2 mode value in the profile is invalid.
WLAN_REASON_CODE_MSMSEC_CAPABILITY_PROFILE_SAFE_MODE_NICProfile requires FIPS 140-2 mode, which is not supported by network interface card (NIC).
WLAN_REASON_CODE_MSMSEC_CAPABILITY_PROFILE_SAFE_MODE_NWProfile requires FIPS 140-2 mode, which is not supported by network.
WLAN_REASON_CODE_MSMSEC_PROFILE_UNSUPPORTED_AUTHProfile specifies an unsupported authentication ,mechanism.
WLAN_REASON_CODE_MSMSEC_PROFILE_UNSUPPORTED_CIPHERProfile specifies an unsupported cipher.
WLAN_REASON_CODE_MSMSEC_UI_REQUEST_FAILUREFailed to queue the user interface request.
WLAN_REASON_CODE_MSMSEC_CAPABILITY_MFP_NW_NICThe wireless LAN requires Management Frame Protection (MFP) and the network interface does not suppport MFP. For more informarion, see the IEEE 802.11w amendment to the 802.11 standard.

 

The following table lists MSM connection error codes.

Reason CodeMeaning
WLAN_REASON_CODE_MSMSEC_AUTH_START_TIMEOUT802.1X authentication did not start within configured time.
WLAN_REASON_CODE_MSMSEC_AUTH_SUCCESS_TIMEOUT802.1X authentication did not complete within configured time.
WLAN_REASON_CODE_MSMSEC_KEY_START_TIMEOUTDynamic key exchange did not start within configured time.
WLAN_REASON_CODE_MSMSEC_KEY_SUCCESS_TIMEOUTDynamic key exchange did not complete within configured time.
WLAN_REASON_CODE_MSMSEC_M3_MISSING_KEY_DATAMessage 3 of 4-way handshake has no key data.
WLAN_REASON_CODE_MSMSEC_M3_MISSING_IEMessage 3 of 4-way handshake has no IE.
WLAN_REASON_CODE_MSMSEC_M3_MISSING_GRP_KEYMessage 3 of 4-way handshake has no GRP key.
WLAN_REASON_CODE_MSMSEC_PR_IE_MATCHINGMatching security capabilities of IE in M3 failed.
WLAN_REASON_CODE_MSMSEC_SEC_IE_MATCHINGMatching security capabilities of secondary IE in M3 failed.
WLAN_REASON_CODE_MSMSEC_NO_PAIRWISE_KEYRequired a pairwise key but access point (AP) configured only group keys.
WLAN_REASON_CODE_MSMSEC_G1_MISSING_KEY_DATAMessage 1 of group key handshake has no key data.
WLAN_REASON_CODE_MSMSEC_G1_MISSING_GRP_KEYMessage 1 of group key handshake has no group key.
WLAN_REASON_CODE_MSMSEC_PEER_INDICATED_INSECUREAP reset secure bit after connection was secured.
WLAN_REASON_CODE_MSMSEC_NO_AUTHENTICATOR802.1X indicated that there is no authenticator, but the profile requires one.
WLAN_REASON_CODE_MSMSEC_NIC_FAILUREPlumbing settings to NIC failed.
WLAN_REASON_CODE_MSMSEC_CANCELLEDOperation was canceled by a caller.
WLAN_REASON_CODE_MSMSEC_KEY_FORMATEntered key format is not in a valid format.
WLAN_REASON_CODE_MSMSEC_DOWNGRADE_DETECTEDA security downgrade was detected.
WLAN_REASON_CODE_MSMSEC_PSK_MISMATCH_SUSPECTEDA PSK mismatch is suspected.
WLAN_REASON_CODE_MSMSEC_FORCED_FAILUREThere was a forced failure because the connection method was not secure.
WLAN_REASON_CODE_MSMSEC_M3_TOO_MANY_RSNIEMessage 3 of 4 way handshake contains too many RSN IE (RSN).
WLAN_REASON_CODE_MSMSEC_M2_MISSING_KEY_DATAMessage 2 of 4 way handshake has no key data (RSN Adhoc).
WLAN_REASON_CODE_MSMSEC_M2_MISSING_IEMessage 2 of 4 way handshake has no IE (RSN Adhoc).
WLAN_REASON_CODE_MSMSEC_AUTH_WCN_COMPLETED
WLAN_REASON_CODE_MSMSEC_SECURITY_UI_FAILUREThe 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_KEYMessage 3 of 4 way handshake has no Mgmt Group Key (RSN).
WLAN_REASON_CODE_MSMSEC_G1_MISSING_MGMT_GRP_KEYMessage 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 CodeMeaning
ONEX_UNABLE_TO_IDENTIFY_USERNo 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_FOUNDThe 802.1X identity could not be found.
ONEX_UI_DISABLEDAuthentication could only be completed through the user interface and this interface could not be displayed.
ONEX_EAP_FAILURE_RECEIVEDThe EAP authentication failed.
ONEX_AUTHENTICATOR_NO_LONGER_PRESENTThe 802.1X authenticator went away from the network.
ONEX_PROFILE_VERSION_NOT_SUPPORTEDThe version of the OneX profile supplied is not supported.
ONEX_PROFILE_INVALID_LENGTHThe OneX profile has an invalid length.
ONEX_PROFILE_DISALLOWED_EAP_TYPEThe EAP type specified in the OneX profile(possibly supplied by the EAPType element) is not allowed.
ONEX_PROFILE_INVALID_EAP_TYPE_OR_FLAGThe 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_FLAGSThe supplicant flags (possibly supplied in the EAPConfig element) in the OneX profile are invalid.
ONEX_PROFILE_INVALID_TIMER_VALUEA timer specified in the OneX profile (possibly supplied by the heldPeriod, authPeriod, or startPeriod element) is invalid.
ONEX_PROFILE_INVALID_SUPPLICANT_MODEThe supplicant mode specified in the OneX profile (possibly supplied by the supplicantMode element) is invalid.
ONEX_PROFILE_INVALID_AUTH_MODEThe authentication mode specified in the OneX profile (possibly supplied by the authMode element) is invalid.
ONEX_PROFILE_INVALID_EAP_CONNECTION_PROPERTIESThe 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

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

Wlanapi.h

See also

WlanReasonCodeToString
WlanSetProfile

 

 

Community Additions

ADD
Show:
© 2014 Microsoft