ESP32 DHCP assigned ip address detection from iOS

Prasad
Posts: 13
Joined: Sun Jul 23, 2017 5:26 pm

ESP32 DHCP assigned ip address detection from iOS

Postby Prasad » Wed Oct 18, 2017 8:30 pm

Good day to you all,

I have a coap server running on my ESP32 and i'm accessing it from my iOS application. It's all good when i hardcode the ip address of the ESP32. But as we all know the ip address is not fixed, It will eventually change when i power up ESP32. Now i'm aware of the below method provided by @kolban to disable DHCP and assign our own IP address,

[url]esp32-snippets/wifi/fragments/connect_with_static_ip.c[/url]

But there are two problems with above solution,

    1. It fails to provide internet connectivity even though ESP32 has connected to AP with given IP address
    2. It is not reliable to use with practical/end-product since there can be an IP conflicts and breakdown the whole process/system

Because of the above drawbacks, i'm looking for a new way to somehow detect my ESP32 module IP address from my iOS application.

Your opinions/solutions are most welcome,

Thanks in advance!

WiFive
Posts: 1158
Joined: Tue Dec 01, 2015 7:35 am

Re: ESP32 DHCP assigned ip address detection from iOS

Postby WiFive » Wed Oct 18, 2017 10:48 pm

This is what mdns is for

Who is online

Users browsing this forum: No registered users and 11 guests