Chat freely about anything...

User avatar
By martinayotte
#45224 Yes ! Espressif has sometime tendancies to expose variable names which are too easy to get into conflict. That why I've choosen HostName instead of hostname.
If I remember, months ago, we discovered that a variable was simply named "a"or "b" (I don't recall exactly)
User avatar
By srrobinson2
#47297 It looks like the client or host name is ESP_lastSixDigitsofMAC. Example: ESP_0AC201.

I have programmed several chips and checked my DHCP server to see what host names were used for the IP addresses leased, and each one used this format. I have a mix of ESP13, ESP12E and ESP12F chips. Some are bare chips, I use the Olimex ESP8266-EXP board and the Wemos D1 shield in addition to the bare chips. I have also used the ESP 13 shield from doit.am, so this seems to be a very consistent pattern.
User avatar
By srrobinson2
#47303 Also, this code will return the host name:

// print the host name
Serial.print("Host Name: ");
Serial.println(WiFi.hostname());