-->
Page 2 of 7

Re: Client Name

PostPosted: Mon Jul 06, 2015 12:13 pm
by martinayotte
Not exactly ! in most systems, the DHCP client config has an option which tell it to send its hostname to the DHCP server, that allow the server to place that in its log files. This option is the following in linux /etc/dhcp/dhcpclient.conf :

Code: Select allsend host-name "<hostname>";


But, unfortunately, the ESPs are not Linux machine, so the tiny DHCP client coded in Espressif libraries doesn't not provide such functionality. They could have added such feature, but it is simply not there. Maybe you can submit a request to them, they will maybe add it in future firmware ...

Re: Client Name

PostPosted: Mon Jul 06, 2015 12:58 pm
by kolban
Looking in the ESP8266 SDK Programming Guide 1.2, I see two APIs ... one called:

wifi_station_get_hostname()

and one called

wifi_station_set_hostname(char *name)

It might be that these will work.

I'm afraid I'd missed the story on my last post. I had assumed (wrongly) that we were talking about DNS and not about DHCP (which I know nothing about).

Re: Client Name

PostPosted: Mon Jul 06, 2015 1:23 pm
by martinayotte
Ah ! this is good news ! Yes, those are the things David was looking at.
(Maybe I missed that one with the tons of SDK updates)
About DNS, it's sure that a DHCP can provide the new hostnames to a DNS, but it requires to have those setup to talk each other.

Re: Client Name

PostPosted: Sat Apr 09, 2016 11:22 am
by PaulRB
I can see on my router that the esp does have a client name. For example:

ESP_104D87

The router can't know that the client is an esp chip, so the name must have come from the esp itself. The hex digits at the end of the name are the last 3 bytes of its mac address.