Is there a way to set the certificate to "do not validate" in the PEAP/MSCHAPv2 settings ?
Our network has this option when we are connecting to the WiFi and IT has told me it needs to be set to "Do not Validate"
I have not made it back there to try it with that whole line deleted.
THANKS!
// WPA Enterprise with PEAP/MSCHAPv2
// We are setting WPA Enterprise credentials
WiFiCredentials credentials("My_Enterprise_AP", WPA_ENTERPRISE);
// EAP type: PEAP/MSCHAPv2
credentials.setEapType(WLAN_EAP_TYPE_PEAP);
// Set username
credentials.setIdentity("username");
// Set password
credentials.setPassword("password");
// Set outer identity (optional, default - "anonymous")
credentials.setOuterIdentity("anonymous");
// I believe this is the setting that our network needs to be " Do not Validate "
// Root (CA) certificate in PEM format (optional)
credentials.setRootCertificate("-----BEGIN CERTIFICATE-----\r\n" \
/* ... */ \
"-----END CERTIFICATE-----\r\n\r\n"
);
// Save credentials
WiFi.setCredentials(credentials);
@txrocks If I understand the setup of WPA2 Enterprise being used - there is an identity and a password but no certificate is required or used? It is while since I have done this for a client, in the credentials setup I would omit credentials.setRootCertificate() all together.
For a Photon - client has username and password and no certificate.
If the credentials are set with identity, outer identity and password - no root certificate and no client certificate then a test of WiFi.hasCredentials() returns false. Any explanation for this?
Thanks - even deeper mystery.
The identity being used is like XYZ not X.Y@Z.com - I wondered if the WICED was checking for a certain format in the identity.
[Update - indeed on the Photon the WICED stack checks the format of the identity and if it does not conform to a format such as X@Y.com then it will not store the credentials!]