Find the IP address of the esp32 by another esp32 on the same local network

arslan43711
Posts: 4
Joined: Mon Aug 15, 2022 6:55 am

Find the IP address of the esp32 by another esp32 on the same local network

Postby arslan43711 » Mon Aug 15, 2022 7:45 am

I have two esp32 connected to same Wifi. There is a web server on the 2nd esp32. 1st Esp32 want to get some data, but did not know the ip address of the 2nd esp32. How first esp32 figure out the IP address?

lbernstone
Posts: 831
Joined: Mon Jul 22, 2019 3:20 pm

Re: Find the IP address of the esp32 by another esp32 on the same local network

Postby lbernstone » Tue Aug 16, 2022 3:43 am

The easiest way will be to use mDNS (aka avahi, bonjour). There are examples for service advertisement and browsing at https://github.com/espressif/arduino-es ... S/examples.
Otherwise, learn how DNS and network protocols in general work...

arslan43711
Posts: 4
Joined: Mon Aug 15, 2022 6:55 am

Re: Find the IP address of the esp32 by another esp32 on the same local network

Postby arslan43711 » Tue Aug 16, 2022 9:20 am

I will test this and update you.

arslan43711
Posts: 4
Joined: Mon Aug 15, 2022 6:55 am

Re: Find the IP address of the esp32 by another esp32 on the same local network

Postby arslan43711 » Sat Aug 20, 2022 10:31 am

I have tested it worked like knife through butter. Thanks.

Who is online

Users browsing this forum: No registered users and 48 guests