Is there any reliable way to discover microcontroler in LAN in iOS / Android / Windows / Linux / macOS?

112 Views Asked by At

I am trying to expose ESP8266 to be available both when working as access point and while connected to the wireless local network (use case would be: is user leaves home with the device - it starts broadcasting its own AP, when at home it connects to available network).

What I am looking for is a single, reliable way to access the device from a browser (via the bookmark) - regardless of the IP / network device is connected to.

My findings so far:

  1. mDNS (Apple Bonjour, .local domains), will work on most of modern machines except Android
  2. Setting up hostname may or may not work depending on the router's firmware - and Chrome on Android may bypass this entirely and try to resolve with 8.8.8.8
  3. Setting up regular DNS service on ESP8266 will work only if the device is working in AP-mode
  4. DNS-SD would require a client of some sort on clients side
  5. Getting browser IP in JavaScript is not possible

My searching skills failed. Is there any way to make it happen?

0

There are 0 best solutions below