Skip to content

How to find IP address of ESP32? #1937

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nomanshahsyed opened this issue Oct 8, 2018 · 8 comments
Closed

How to find IP address of ESP32? #1937

nomanshahsyed opened this issue Oct 8, 2018 · 8 comments

Comments

@nomanshahsyed
Copy link

I need to know the IP address of ESP32 on the local network. The idea is to do mDNS or UDP broadcast to send the IP to the android application. The app will then use that IP to do the communication. Is there someone who has already done it? Thanks.

@martinius96
Copy link
Contributor

martinius96 commented Oct 8, 2018

WiFi.localIP();
use it with serial print for instance:
Serial.println(WiFi.localIP());

@nomanshahsyed
Copy link
Author

Hi martin thanks for reply. You didn't get my point. I need to know the IP address without serial monitor. I have tried mDNS which works fine but not on Android. I am now trying UDP with which I have some success.

@uzi18
Copy link

uzi18 commented Oct 8, 2018

WiFi.localIP(); returns IPAddress, You can print it or use it somewhere.

@martinius96
Copy link
Contributor

@nomanshahsyed set it static then :)
#1262 (comment)

@nomanshahsyed
Copy link
Author

Guys thanks for your answers. But please read the question before answering. Anyhow the answer to my question is to use UDP broadcast. mDNS is also working but not on android. UDP broadcast is working fine.

@ghost
Copy link

ghost commented Dec 26, 2019

Guys thanks for your answers. But please read the question before answering. Anyhow the answer to my question is to use UDP broadcast. mDNS is also working but not on android. UDP broadcast is working fine.

Can you please put here how did you solve this problem? Thanks

@uzairali001
Copy link

I also want to achieve this, can you please share the details how you managed to do it?

@martinius96
Copy link
Contributor

mDNS must be enabled on devices and also on network...
It is not that simple like.. I will start it on ESP and it will work on each device. You need to ALLOW Multicast DNS in your network and on your devices aswell..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants