I have a Node MCU V3 and I've been trying to rename the host name for my ESP8266, however even though I am using `WiFi.hostname("HostName")` I still can not see it change on my mobile phone when I search for new wifi connections.
Moreover it does not have any password, meaning I can connect to it without using any password.
I've come across with other topics as well but none worked for me so far.
#include <ESP8266WiFi.h>
const char* ssid = "ESP8266";
const char* password = "12345";
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
delay(10);
Serial.println('\n');
WiFi.hostname("ESP8266");
WiFi.softAP(ssid, password);
Serial.print("Access Point \"");
Serial.print(ssid);
Serial.println("\" started");
Serial.print("IP address:\t");
Serial.println(WiFi.softAPIP());
Serial.println(WiFi.hostname()); // Here hostname is written as "ESP8266" but it shows up as "ESP-9414D5" on my phone
}
void loop() {
// put your main code here, to run repeatedly:
}