Disco4uf Disco4uf - 8 months ago 106
Android Question

Internet of Things : ESP module Wifi Ip address

as you can read in title I'm making a super simple IOT (Not really)

and

using a esp8266 and want to make it connect to my home wifi network and make a communication between a android app and the module (android app connects to home wifi)

Note : Iam Using CODE VISION AVR

you may say :


Why not directly connect to ESP when its on Server Mode?

that's fine cause when ESP is server "he" can set ip for him self so
ip will be always same BUT I want it to connect to home wifi


-


Why you wont connect with IP ?

you cant find the module ip easily because its given by Wifi


-


Find ESP ip using IP scanner

Its not possible cause it changes every time and user have to change
IP every time in android app AND my app cant scann every time it want
to connect to a single device its so dumb...


-


Do a Static Ip for ESP !

well that's not possible too because maybe that IP was taken by
someone before ESP send static IP AT command ! + if IP wasent taken it may taken after Home Wifi Restarts !


Sorry for bad English :X

Answer Source

Use mDNS responder:

https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266mDNS/examples/mDNS_Web_Server/mDNS_Web_Server.ino

This way you would be able to connect to ESP8266 via hardcoded url like http://esp8266.local.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download