leedennis519 0 Posted March 22, 2016 Share Posted March 22, 2016 Hi, I know that wifi.begin uses DHCP and grabs an IP assigned to the cc3200. my question is, can I convert the IP to a website name instead of just the IP numbers ? Right now, I am using the simplewebserver example and I get the IP for the device to be 192.168.1.224. It says to open and see the webpage, type that IP into a browser. But Instead of putting that IP into the browser,is there a way that I could put something like mywebsite.com and still get to the same page on IP 192.168.1.224 ? this is all local, so no port forwarding and no accessing the website from outside the router. Thanks, Dennis Quote Link to post Share on other sites
spirilis 1,264 Posted March 22, 2016 Share Posted March 22, 2016 There is an mDNS server built in which (I believe) should let you do this. I don't think Energia modifies that though. Perhaps a good feature addition? https://github.com/energia/Energia Quote Link to post Share on other sites
dubnet 238 Posted March 22, 2016 Share Posted March 22, 2016 If you are using Windows you could add an entry to the hosts file to resolve the name to the IP. Quote Link to post Share on other sites
cde 334 Posted March 23, 2016 Share Posted March 23, 2016 Just local? From a single PC, use a host file. This requires a static ip on the device. For a network, try checking your router's configuration. It can either map single static IPs to a hostname, or allow mapping a mac address to a hostname. Or allows mapping a mac to a specific DHCP lease, which can then be mapped to a hostname. From the device, edit the code so that it registers a hostname with the DHCP server. A bit more complex. Quote Link to post Share on other sites
leedennis519 0 Posted March 23, 2016 Author Share Posted March 23, 2016 hmmm I see, currently I configured it to a static IP, I guess to map the website name to the static Ip, it'll have to be done on the router I guess. Btw how do you use the mDNS in my case ? Quote Link to post Share on other sites
cde 334 Posted March 23, 2016 Share Posted March 23, 2016 There is an mDNS server built in which (I believe) should let you do this. I don't think Energia modifies that though. Perhaps a good feature addition? https://github.com/energia/Energia I don't think mDNS is what OP wants. More like Dynamic DNS. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.