Close

Note on Android DNS on a LAN

A project log for Sci-fi grade Home Automation

A system that ties some home automation with various APIs and hardware hacks.

conradcnconradcn 03/15/2014 at 04:100 Comments

I ran into an interesting problem while trying to make the Android app talk to the server. Specifically, it couldn't find the host "edi". After much debugging, I finally came across an interesting fact: Android can't resolve machine names as IP addresses on the local network in the same way that windows can. There are a couple solutions for this: 

1: You can get a router that supports enterprise grade DNS (or just one which can handle Tomato/OpenWRT). My router did not have either of these features.

2: You can set the server to use a static IP on the local network, and configure the Android app appropriately. This was the option I took.

It's not an ideal solution, but it resolved the communication problems, so I call it a win.

Discussions