Chat freely about anything...

User avatar
By cookieoreo18
#86082 I recently bought a NodeMCU ESP8266. It has worked perfectly in the past 2 months but yesterday weird things started to happen. I flashed a scetch using the arduino IDE to use my ESP as a web server. The scetch was successfully uploaded but the SSID didn't change. It stayed with the ssid of the previous one. I tried using different flash settings, different IDEs etc nothing worked. The password is 8 letters so its not a problem. So i used the ESP Download tool to "format" it. I downloaded a blank bin file and flashed the entire memory. Surprisingly, the wifi name was changed using the bin file. I flashed the wifi deauther bin file and that worked perfectly but i still can't change the SSID using the Arduino IDE or any other kid of IDE. Sorry for my bad english :)
User avatar
By scottyanke
#86085 Could you post the section of code that sets the SSID? For example, I use code like this to dynamically set the SSID based on the MAC address, which helps when I've got over a dozen ESP8266s running at once in the same room.
Code: Select all  WiFi.macAddress(mac_address);     // get the mac address of this chip to make it unique in the building
  sprintf(my_ssid,"%02X%02X%02X",mac_address[3],mac_address[4],mac_address[5]); // Use the hex version of the MAC address as our SSID
  WiFi.softAP(my_ssid, "87654321",1,false,2);             // Start the access point with password of 87654321

my_ssid could be anything you want. Even though the code might change, and the same code is copied to multiple chips, the SSID remains the same for each chip, since it uses the MAC address as the SSID.
So how is your SSID set?
User avatar
By cookieoreo18
#86097
Code: Select all#include <ESP8266WiFi.h>

const char* ssid = "testtt";    //  Your Wi-Fi Name
const char* password = "chickenisthicc";   // Wi-Fi Password
int LED = LED_BUILTIN;   // led connected to GPIO2 (D4)
WiFiServer server(80);
void setup()
{
  Serial.begin(115200); //Default Baudrate
  pinMode(LED, OUTPUT);
  digitalWrite(LED, LOW);
  Serial.print("Connecting to the Newtork");
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED)
  {
    delay(500);
    Serial.print(".");
  }
  Serial.println("WiFi connected");
  server.begin();  // Starts the Server
  Serial.println("Server started");
  Serial.print("IP Address of network: "); // will IP address on Serial Monitor
  Serial.println(WiFi.localIP());
  Serial.print("Copy and paste the following URL: https://"); // Will print IP address in URL format
  Serial.print(WiFi.localIP());
  Serial.println("/");

}