You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am doing a project where device is connected to WiFi and MQTT server and some bluetooth related activity is going on. I have implemented on demand portal. When i trigger it, root page is being displayed on browser, but when pressed setup, it just doesn't load (stuck on blank page in browser). My setup has parameters for MQTT credentials. What can go wrong? Should I disconnect wifi and mqtt server below starting portal?
Below is my function to start config portal. some part is removed from original function.
mqttClient.disconnect(true);
WiFi.mode(WIFI_STA); // explicitly set mode, esp defaults to STA+AP
open_for_AP = false;
wm.setConfigPortalTimeout(100);
if (!wm.startConfigPortal("ER-BLE-Scanner11")) {
Serial.println("failed to connect and hit timeout");
delay(3000);
//reset and try again, or maybe put it to deep sleep
ESP.restart();
delay(5000);
}
//if you get here you have connected to the WiFi
Serial.println("connected...yeey :)");
xTimerStart(mqttReconnectTimer, 0);
AP_config_mode = wm.getConfigPortalActive();
}
`
The text was updated successfully, but these errors were encountered:
I am doing a project where device is connected to WiFi and MQTT server and some bluetooth related activity is going on. I have implemented on demand portal. When i trigger it, root page is being displayed on browser, but when pressed setup, it just doesn't load (stuck on blank page in browser). My setup has parameters for MQTT credentials. What can go wrong? Should I disconnect wifi and mqtt server below starting portal?
Below is my function to start config portal. some part is removed from original function.
`
void mannual_wifi_init() {
xTimerStop(mqttReconnectTimer, 0);
mqttClient.disconnect(true);
WiFi.mode(WIFI_STA); // explicitly set mode, esp defaults to STA+AP
open_for_AP = false;
wm.setConfigPortalTimeout(100);
if (!wm.startConfigPortal("ER-BLE-Scanner11")) {
Serial.println("failed to connect and hit timeout");
delay(3000);
//reset and try again, or maybe put it to deep sleep
ESP.restart();
delay(5000);
}
//if you get here you have connected to the WiFi
Serial.println("connected...yeey :)");
xTimerStart(mqttReconnectTimer, 0);
AP_config_mode = wm.getConfigPortalActive();
}
`
The text was updated successfully, but these errors were encountered: