Change hostname.
Change hostname.
Hello.
I'm trying to change the board hostname but I can't. Please, could you tell my in which file is set?
Thanks in advance.
MODERATOR NOTE: I moved this to ESP8266 since I assume that's the board you're using?
I'm trying to change the board hostname but I can't. Please, could you tell my in which file is set?
Thanks in advance.
MODERATOR NOTE: I moved this to ESP8266 since I assume that's the board you're using?
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Change hostname.
Have you looked at http://docs.micropython.org/en/latest/e ... ckref.html?
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Change hostname.
I don't understand what hostname is in this context. It is a concept more heavyweight operating systems have and the normal place to read it is through os.uname()
Re: Change hostname.
It means what the esp8266 sends to the DHCP server on the local network when requesting an IP address.
Re: Change hostname.
Thanks. That's exactly the kind of answer that makes me happy.
Why not have the DHCP server key on MAC address instead ? The MAC addresses ought to be unique (if not you've got big trouble anyway) and all belong to a block issued to the manufacturer.
Why not have the DHCP server key on MAC address instead ? The MAC addresses ought to be unique (if not you've got big trouble anyway) and all belong to a block issued to the manufacturer.
Re: Change hostname.
The DHCP server already gets the MAC address -- it's required by the protocol. The hostname is supposed to be a human-readable convenience, so that you can see on the router's side which address is which.
Re: Change hostname.
Sorry, but I'm blind. I cannot find in the documentaion from pythoncoder (http://docs.micropython.org/en/latest/e ... ckref.html?) where I can set the hostname?
Re: Change hostname.
I don't think you can.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Change hostname.
Apologies. Looking again at the doc I referenced, there's nothing.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Change hostname.
No problem! I only wat to make shure that I didnÄt miss something.
After an internet research I found this: http://www.esp8266.com/viewtopic.php?p=22608 There is an function for setting the hostname in the ESP-SDK named wifi_station_set_hostname().
I think someone has to implement a new method in the ESP- or network- or WLAN-module? But to be hornest, this is not rellay important
After an internet research I found this: http://www.esp8266.com/viewtopic.php?p=22608 There is an function for setting the hostname in the ESP-SDK named wifi_station_set_hostname().
I think someone has to implement a new method in the ESP- or network- or WLAN-module? But to be hornest, this is not rellay important