[GH-ISSUE #508] Sporadic problem with portal (Access Point) #424

Open
opened 2026-02-28 01:25:13 +03:00 by kerem · 3 comments
Owner

Originally created by @fabianoriccardi on GitHub (Feb 7, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/508

Hi everyone,
I was working on little library to manage the wifi config, when I found this one (very good job, thanks @tzapu ).

Unfortunately, the Ap mode sometimes doesn't work, in the sense that the client doesn't connect to the esp8266.

After a reading of the library, I discovered that you use the AP_STA mode. I don't understand why you are using this mode, because I think that should be better to separete the STA mode and the AP mode.

So I tried to rewrite few lines of the library and magically it starts to work perfectly.
The modification is very simple:
boolean startConfigPortal(...){
boolean WiFiManager::startConfigPortal(char const *apName, char const *apPassword) {
//setup AP
if(WiFi.getMode()==WIFI_STA){
WiFi.disconnect();
// don't know if this delay is really necessary
delay(100);
WiFi.mode(WIFI_OFF);
delay(100);
}
WiFi.mode(WIFI_AP);
DEBUG_WM("SET AP");
........
}

Maybe my code is wrong and useless, but I'm curious about the mixed AP_STA mode :)

Originally created by @fabianoriccardi on GitHub (Feb 7, 2018). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/508 Hi everyone, I was working on little library to manage the wifi config, when I found this one (very good job, thanks @tzapu ). Unfortunately, the Ap mode sometimes doesn't work, in the sense that the client doesn't connect to the esp8266. After a reading of the library, I discovered that you use the AP_STA mode. I don't understand why you are using this mode, because I think that should be better to separete the STA mode and the AP mode. So I tried to rewrite few lines of the library and magically it starts to work perfectly. The modification is very simple: boolean startConfigPortal(...){ boolean WiFiManager::startConfigPortal(char const *apName, char const *apPassword) { //setup AP if(WiFi.getMode()==WIFI_STA){ WiFi.disconnect(); // don't know if this delay is really necessary delay(100); WiFi.mode(WIFI_OFF); delay(100); } WiFi.mode(WIFI_AP); DEBUG_WM("SET AP"); ........ } Maybe my code is wrong and useless, but I'm curious about the mixed AP_STA mode :)
Author
Owner

@tablatronix commented on GitHub (Feb 7, 2018):

this is already addressed in development branch

<!-- gh-comment-id:363819542 --> @tablatronix commented on GitHub (Feb 7, 2018): this is already addressed in development branch
Author
Owner

@tzapu commented on GitHub (Feb 7, 2018):

thank you @fabiuz7 but lately it's @tablatronix who has put an absolutely massive amount of work in
thanks

<!-- gh-comment-id:363840054 --> @tzapu commented on GitHub (Feb 7, 2018): thank you @fabiuz7 but lately it's @tablatronix who has put an absolutely massive amount of work in thanks
Author
Owner

@fabianoriccardi commented on GitHub (Feb 7, 2018):

Sorry I have read your name in the github link ;) so thanks to @tablatronix

<!-- gh-comment-id:363915184 --> @fabianoriccardi commented on GitHub (Feb 7, 2018): Sorry I have read your name in the github link ;) so thanks to @tablatronix
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#424
No description provided.