Go Down

Topic: configure node mcu as acces point with network connectivity (Read 1 time) previous topic - next topic

rahulkp1986

Hello
Im just new to this IDE
im using the belo code to configure wife, its a client server configuration with node mcu
i need to send an email of received message, but in this configuration Node mcu is not connected to network

how can this be done?
Code: [Select]
void SetWifi(char* Name, char* Password)
  {
    // Stop Any Previous WIFI
    WiFi.disconnect();

    // Setting The Wifi Mode
    WiFi.mode(WIFI_AP_STA);
    Serial.println("WIFI Mode : AccessPoint Station");
    
    // Setting The Access Point
    TKDssid      = Name;
    TKDpassword  = Password;
    
    // Starting The Access Point
    WiFi.softAP(TKDssid, TKDpassword);
    Serial.println("WIFI < " + String(TKDssid) + " > ... Started");
    
    // Wait For Few Seconds
    delay(1000);
    
    // Getting Server IP
    IPAddress IP = WiFi.softAPIP();
    
    // Printing The Server IP Address
    Serial.print("AccessPoint IP : ");
    Serial.println(IP);

    // Starting Server
    TKDServer.begin();
    Serial.println("Server Started");
  }

Juraj


rahulkp1986

If i do it, will it work as client server?
attached is my code

Go Up