-->
Page 1 of 1

How does arduino IDE find OTA esp's?

PostPosted: Thu Jan 04, 2018 3:50 pm
by Veda88
Hi,

I am trying to figure out how the arduino IDE finds esp8266 on the network that have OTA capabilities. If I go to "Tools" -> "Port" I can see my esp8266 listed there (it's loaded with the esp-ota library). How does the arduino IDE find my device (what protocol)?

I tried to look in the esp8266 arduino library:
https://github.com/esp8266/Arduino
But I am unable to find any onformation on this.

The only thing I found is that it might be mDNS. But the mDNS name contains some hardware ID which is different for each device. So it cannot actually search for a device with a specific name, or can it?

Thanks!

Re: How does arduino IDE find OTA esp's?

PostPosted: Sat Jan 06, 2018 11:39 am
by dragondaud
It does use mDNS, and looks for devices advertising "_arduino._tcp". The point of mDNS is you know the service you're looking for, not the name. On a linux system you can use 'avahi-browse' to list all the advertised services on your network. I don't think Windows comes with anything similar, though Bonjour is mDNS.

On many Linux systems, you can install avahi-browse using "sudo apt install avahi-utils" if you don't have it.