WiFi.getCredentials(ap, 5); Blocks for 17 seconds

I am getting this in the startup where the P1 checks for existing creds. But it this call seems to be blocking for a varying time of up to 17 seconds, depending on the existing creds and wifi connections.

Does anyone know why this would block for so long?

Are you calling this before your device tries to connect at all?
If you do that in parallel to trying to establish a connection things will interfere with eachother causing non-deterministic timing behaviour.

4 Likes

Awsome, I rechecked for this condition and found a call to connect before hand. I thought I got rid of the calls but this made me recheck it.

Now its working!!!

2 Likes