1

Scenario. We have a product controlling some sort of household thing. Since its 2015, it also runs a small webserver so that people in the house can control the product using their phones. Everything is using wifi network and the product has local name, say, productx.local. In this scenario, people in the household does not know anything about DNS, IP, router configurations, etc, etc. They buy the stuff, connect it and it should work.

As far as I understand, with an android phone I can't access the product with the local name, but have to use it's IP-address?! This seems strange. Does it mean that services provided by the product must expose their API to an external server so that an Android user must connect to the external service in order to communicate with local device?

Edit:

Here is a similar question which is unresolved. And another post here. In the second link (from 2011) its stated that Android devices have to rely on the DHCP configuration, whereas Windows and Macs provide alternative name resolutions. Is it still true that Android (4.4) fully relies on DHCP for resolution? Have tested both Chrome and Firefox, and both return that the requested page was not found. (...and even more similar unresolved questions)

Edit:

Have noticed that it's now working with Chrome 52.0.2743.98 and Android 4.4.2. For exampel: I have a local mopidy server running on a raspberry pi named mopidy2. Now I can give Chrome the address "mopidy2:6680" and it will find the service(s)" Interestingly, Chrome on a pc will also accept "mopidy2.local:6680", whereas Chrome on Androind will return ERR_NAME_NOT_RESOLVED.

0

Of course it would work without the convoluted process you described. What makes you think Android phones aren't capable of a simple DNS lookup?

If your product sets a hostname in its initial DHCP request, most consumer routers will serve it out to other clients over DNS, including Android phones. The process you described should only be used as a fallback mechanism when the user's router isn't configured that way.

  • From experience. Have only problem accessing the device by name with android phones (no problem with ip-addresses). – Alexander Jun 18 '15 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.