We try to run a web service on the edison with apmode.
On Iphone, the domain name seaching is work fine.
On Android, there doesn't implement bonjour service so that we need to replace the domain name with ip directly.
Actually we need the domain name, the idea is we try to run a fake dns with python on edison.
Under apmode, the client(android) can't get any dns server, the fake dns couldn't get any request either.
Is there any idea or suggestion to use domain name on android device with apmode?
You could try to set the DNS on hostapd.conf which is the where all the configurations of AP mode are stored, you can find this file in /etc/hostapd/hostapd.conf. Or you could set the DNS manually on your Android phone. This is a guide on how to set the DNS server on your Android phone without having root access:
http://xslab.com/2013/08/how-to-change-dns-settings-on-android/ How to Change DNS Settings on Android
I hope it helps.
Thanks, it could do what we want.
Actually, we need more easier way for everyone who has smartphone
could just connect to the edison with apmode and
just type the edison.local or something(instead of 192.168.42.1) to surf our website service running on the edison.
You are not able to access the board's "website" when you type edison.local, right? But you are able to access it when you type its IP address, right?
The edison.local method works with the name you have given to your board when setting it up with "configure_edison --setup". I my case I named my Edison "Peter", so I'd have to type "Peter.local", did you make sure that you are entering the board's correct name in your browser?
I tried to set dns server on /etc/hostapd/hostapd.conf
But i couldn't find any hint to set.
In other hand, I found /etc/hostapd/udhcpd-for-hostapd.conf
Then, set with "opt dns 192.168.42.1" and restart apmode.
Still can not work for android device, any hints?
I have not so good news. Edison AP mode uses multicast Domain Name System (mDNS) service.
Bonjour can locates devices such as printers, other computers, and the services that those devices offer on a local network using mDNS. In case of Apple's OSX and iOS devices, Bonjour comes built-in in such devices and can be installed on Windows PCs. Unfortunately Android OS does not have this feature, so the issue is not in Edison but in Android.
I'm afraid I can't give you a better answer than to search for an alternative for bonjour in Android.