-->
Page 4 of 7

Re: Client Name

PostPosted: Sun Apr 10, 2016 8:10 am
by martinayotte
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)

Re: Client Name

PostPosted: Wed May 11, 2016 11:43 am
by srrobinson2
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.

Re: Client Name

PostPosted: Wed May 11, 2016 1:15 pm
by srrobinson2
Also, this code will return the host name:

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

Re: Client Name

PostPosted: Mon Jun 13, 2016 8:03 pm
by EnormousSoft
i have error when use this code ? !!!