Hi,
Recently I'm doing development on ESP8266, and I'm trying to get the IP address by pinging the hostname.
I set the hostname using wifi_station_set_hostname().
I'm able to get the hostname by pinging the ip address, but I couldn't get the IP address by pinging the hostname.
Anyone face the same issue before?
Any idea?
Thanks!!!
[SOLVED] Ping ESP using hostname
-
- Posts: 4
- Joined: Wed Jun 08, 2016 3:30 pm
Re: Ping ESP using hostname
Postby pratik » Wed Aug 10, 2016 10:28 am
Hello,
You will have to set up mDNS or you always have the option of adding a custom DNS record to your devices. If you are pinging your ESP8266 using Windows or Linux, please look up articles online on how to add custom DNS record.
If you added
192.168.3.66 abc.xyz.mnp
Then the address abc.xyz.mnp will be resolved as 192.168.3.66 by the accessing device.
You will have to set up mDNS or you always have the option of adding a custom DNS record to your devices. If you are pinging your ESP8266 using Windows or Linux, please look up articles online on how to add custom DNS record.
If you added
192.168.3.66 abc.xyz.mnp
Then the address abc.xyz.mnp will be resolved as 192.168.3.66 by the accessing device.
-
- Posts: 4
- Joined: Wed Jun 08, 2016 3:30 pm
Re: Ping ESP using hostname
Postby teckhaokoh » Thu Aug 11, 2016 5:07 pm
Thanks for the suggestion.
Then I guess mDNS is the best option.
Because I would like to make ESP a station connecting to a gateway, getting IP through DHCP.
This is why I prefer to use the hostname to access, so that no longer need to know the IP address, once I connected to the same network.
Thank you very much.
Then I guess mDNS is the best option.
Because I would like to make ESP a station connecting to a gateway, getting IP through DHCP.
This is why I prefer to use the hostname to access, so that no longer need to know the IP address, once I connected to the same network.
Thank you very much.
Who is online
Users browsing this forum: No registered users and 13 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.