Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

Is it possible for me to run a Zeroconf mDNS server on my Android phone? Something like Avahi on Linux.

The reason I ask is because I run an SSH/SFTP server on my phone for transferring files to/from the phone. Right now I have to connect using the local IP address (10.1.0.x) and the IP changes via DHCP. I'd like to simply be able to connect to my phone using a .local address.

I don't think Dynamic DNS will work, because I want my LAN address (the private IP, 10.1.0.x) not my public NAT IP.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Do you have any control over the (presumably wireless) LAN that you're connecting your phone to? It seems to me that the main part of your problem is just that your phone picks up different IP addresses each time it connects to your LAN. If it always had the same IP, then you could either make a note of this, save it in your SSH client, or assign a name to that IP on your other machine(s) using a HOSTS file or similar.

Are you in control of your network, or do you know the person that is? You (or they) should be able to assign a static IP address, or a reserved IP address, to your device so that every time you connect your phone to the LAN it always picks up the same IP address.

If it's a small, personal network then this would just be a setting on your device's record on your router, if this is a larger network then it would be setup on the DHCP server and a matching A name record could also be setup on their internal DNS to give you a permanent name.

share|improve this answer
    
Thanks, this was what I ended up doing -- I assigned a static DHCP mapping for the phone on my router, and then added that IP to my local DNS server. Solved the problem for me but it wouldn't necessarily solve it for others. –  Josh Dec 3 '12 at 15:06

Currently there is no Avahi daemon on Android and open ticket #354 at Avahi tracker, where there are attached patches, needs to be addressed to make a build for Android possible.

You can try to build it manually, if really needed.

share|improve this answer
    
Is there still no avahi daemon on Android? :) –  Mazze Apr 7 at 8:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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