[GH-ISSUE #1276] How to Determine AP Credential Failure using autoConnect()? #1095

Open
opened 2026-02-28 01:28:30 +03:00 by kerem · 5 comments
Owner

Originally created by @tonyc770 on GitHub (Jul 31, 2021).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1276

I am using the autoConnect() function, but if the wrong WiFi credentials are entered there is no feedback while in AP mode.
Only when the credentials are correct does the autoConnect() return true, or if there is a timeout, returns false.

Is there a way to detect that the credentials failed?

Thanks...

Originally created by @tonyc770 on GitHub (Jul 31, 2021). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1276 I am using the autoConnect() function, but if the wrong WiFi credentials are entered there is no feedback while in AP mode. Only when the credentials are correct does the autoConnect() return true, or if there is a timeout, returns false. Is there a way to detect that the credentials failed? Thanks...
Author
Owner

@monodop commented on GitHub (Nov 2, 2021):

I am also interested to know if there's a good way to determine this.

<!-- gh-comment-id:958185686 --> @monodop commented on GitHub (Nov 2, 2021): I am also interested to know if there's a good way to determine this.
Author
Owner

@tablatronix commented on GitHub (Nov 3, 2021):

you might be able to use

    // get last connection result, includes autoconnect and wifisave
    uint8_t       getLastConxResult();
<!-- gh-comment-id:959137357 --> @tablatronix commented on GitHub (Nov 3, 2021): you might be able to use ```C++ // get last connection result, includes autoconnect and wifisave uint8_t getLastConxResult(); ```
Author
Owner

@monodop commented on GitHub (Nov 4, 2021):

is there a callback we can use to check once an attempt to save the configuration has been made?

For success, we have setSaveConfigCallback, but I can't see a corresponding callback for failure.

Edit: I also see that you can set setBreakAfterConfig but it would be good to be able to get a callback on failure without aborting the autoConnect

<!-- gh-comment-id:961485683 --> @monodop commented on GitHub (Nov 4, 2021): is there a callback we can use to check once an attempt to save the configuration has been made? For success, we have `setSaveConfigCallback`, but I can't see a corresponding callback for failure. Edit: I also see that you can set `setBreakAfterConfig` but it would be good to be able to get a callback on failure without aborting the autoConnect
Author
Owner

@tablatronix commented on GitHub (Nov 6, 2021):

Hmm could be handy let me see what works best

<!-- gh-comment-id:962291306 --> @tablatronix commented on GitHub (Nov 6, 2021): Hmm could be handy let me see what works best
Author
Owner

@monodop commented on GitHub (Jan 5, 2022):

Any thoughts?

<!-- gh-comment-id:1005385410 --> @monodop commented on GitHub (Jan 5, 2022): Any thoughts?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#1095
No description provided.