[GH-ISSUE #1212] Get SSID AND PASSWORD FROM CONFIG PORTAL #1034

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

Originally created by @shakirhussain78652 on GitHub (Feb 11, 2021).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1212

Hello, I am new here and don't have much knowledge about programming.
I want to use the auto connect non-blocking code for my project and for that I will be needing the SSID and PASSWORD entered by the user from config portal into my remotexy project.

#define REMOTEXY_WIFI_SSID "Redmi" // these should be fetch from the config portal
#define REMOTEXY_WIFI_PASSWORD "123456789" // these should be fetch from the config portal
#define REMOTEXY_CLOUD_SERVER "cloud.remotexy.com"

below is the autocoonect non blocking code that i will be using
Untitled
Untitled

#include <WiFiManager.h> // https://github.com/tzapu/WiFiManager
WiFiManager wm;

void setup() {
WiFi.mode(WIFI_STA); // explicitly set mode, esp defaults to STA+AP
// put your setup code here, to run once:
Serial.begin(115200);

//reset settings - wipe credentials for testing
//wm.resetSettings();

wm.setConfigPortalBlocking(false);

//automatically connect using saved credentials if they exist
//If connection fails it starts an access point with the specified name
if(wm.autoConnect("BLUE1", "12345678")){
    Serial.println("connected...yeey :)");
}
else {
    Serial.println("Configportal running");
}

}

void loop() {
wm.process();
// put your main code here, to run repeatedly:

}

Originally created by @shakirhussain78652 on GitHub (Feb 11, 2021). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1212 Hello, I am new here and don't have much knowledge about programming. I want to use the auto connect non-blocking code for my project and for that I will be needing the SSID and PASSWORD entered by the user from config portal into my remotexy project. #define REMOTEXY_WIFI_SSID "Redmi" // these should be fetch from the config portal #define REMOTEXY_WIFI_PASSWORD "123456789" // these should be fetch from the config portal #define REMOTEXY_CLOUD_SERVER "cloud.remotexy.com" below is the autocoonect non blocking code that i will be using ![Untitled](https://user-images.githubusercontent.com/78459887/107600358-926d9680-6c49-11eb-889b-51633a7fb9dc.png) ![Untitled](https://user-images.githubusercontent.com/78459887/107600387-a31e0c80-6c49-11eb-8bd5-a8de696eb3ba.png) #include <WiFiManager.h> // https://github.com/tzapu/WiFiManager WiFiManager wm; void setup() { WiFi.mode(WIFI_STA); // explicitly set mode, esp defaults to STA+AP // put your setup code here, to run once: Serial.begin(115200); //reset settings - wipe credentials for testing //wm.resetSettings(); wm.setConfigPortalBlocking(false); //automatically connect using saved credentials if they exist //If connection fails it starts an access point with the specified name if(wm.autoConnect("BLUE1", "12345678")){ Serial.println("connected...yeey :)"); } else { Serial.println("Configportal running"); } } void loop() { wm.process(); // put your main code here, to run repeatedly: }
Author
Owner

@sn00zerman commented on GitHub (Feb 11, 2021):

If you want to read the SSID and password, after you made a succesfull connection in the Captive Portal,
you simple need to read out:
WiFi.SSID() //this contains the SSID
WiFi.psk() //this contains the password

<!-- gh-comment-id:777265144 --> @sn00zerman commented on GitHub (Feb 11, 2021): If you want to read the SSID and password, after you made a succesfull connection in the Captive Portal, you simple need to read out: **WiFi.SSID()** //this contains the SSID **WiFi.psk()** //this contains the password
Author
Owner

@shakirhussain78652 commented on GitHub (Feb 13, 2021):

Thank you so much for your help. That saved my day.

<!-- gh-comment-id:778554038 --> @shakirhussain78652 commented on GitHub (Feb 13, 2021): Thank you so much for your help. That saved my day.
Author
Owner

@shakirhussain78652 commented on GitHub (Feb 13, 2021):

Also please help me to enter these
WiFi.SSID() //this contains the SSID
WiFi.psk() //this contains the password
into this code

#define REMOTEXY_WIFI_SSID ""
#define REMOTEXY_WIFI_PASSWORD ""
#define REMOTEXY_CLOUD_SERVER "cloud.remotexy.com"
#define REMOTEXY_CLOUD_PORT 6376
#define REMOTEXY_CLOUD_TOKEN "479a49b065595afa5cdd3e7a3f8a66f0"

<!-- gh-comment-id:778560020 --> @shakirhussain78652 commented on GitHub (Feb 13, 2021): Also please help me to enter these WiFi.SSID() //this contains the SSID WiFi.psk() //this contains the password into this code #define REMOTEXY_WIFI_SSID "" #define REMOTEXY_WIFI_PASSWORD "" #define REMOTEXY_CLOUD_SERVER "cloud.remotexy.com" #define REMOTEXY_CLOUD_PORT 6376 #define REMOTEXY_CLOUD_TOKEN "479a49b065595afa5cdd3e7a3f8a66f0"
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#1034
No description provided.