maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   mDNS support for Maemo 5 (https://talk.maemo.org/showthread.php?t=82397)

pali 2012-02-17 10:15

mDNS support for Maemo 5
 
Hi,

I created package mdns-support and pushed it into Extras-Devel. Package can be installed via HAM (search for mDNS). This package install & configure Maemo 5 system for mDNS support.

It install packages avahi-daemon libnss-mdns library and edit /etc/nsswitch.conf.

After installation is reboot required.

mDNS provide hostname resolving for domain .local. Every device which support mDNS have domain <hostname>.local. So when computer (with mDNS support) and Nokia N900 connect to wifi network, mDNS can be used for identifing network devices and resolving hostname to ip addresses. Usefull for SSH when DHCP server assigning random ip address.

So on computer I can ping Nokia N900 device with:
Code:

$ ping Nokia-N900.local
PING Nokia-N900.local (192.168.15.110) 56(84) bytes of data.
64 bytes from Nokia-N900.local (192.168.15.110): icmp_req=1 ttl=128 time=29.4 ms
64 bytes from Nokia-N900.local (192.168.15.110): icmp_req=2 ttl=128 time=51.1 ms
64 bytes from Nokia-N900.local (192.168.15.110): icmp_req=3 ttl=128 time=73.7 ms
...

And from N900 I can ping computer:
Code:

$ sudo ping Pali.local
PING Pali.local (192.168.15.107) 56(84) bytes of data.
64 bytes from Pali.local (192.168.15.107): icmp_req=1 ttl=128 time=96.6 ms
64 bytes from Pali.local (192.168.15.107): icmp_req=2 ttl=128 time=16.5 ms
64 bytes from Pali.local (192.168.15.107): icmp_req=3 ttl=128 time=42.0 ms
64 bytes from Pali.local (192.168.15.107): icmp_req=4 ttl=128 time=1.41 ms
...

I also fixed problem in avahi-daemon package (which create non working /etc/init.d/avahi-daemon script).

http://maemo.org/packages/view/mdns-support/
http://maemo.org/packages/view/libnss-mdns/
http://maemo.org/packages/view/avahi-daemon/

ForeverYoung 2012-02-23 20:50

Re: mDNS support for Maemo 5
 
Sometimes (or always), after boot, avahi-daemon not starting.
When I "sudo start avahi-daemon", it says about too frequent starting.
But if I "sudo avahi-daemon", it starts normally. Then Ctrl-C, and "sudo start avahi-daemon" now ok.

pali 2012-02-24 08:09

Re: mDNS support for Maemo 5
 
Try to uninstall and install again all avahi packages. In old version was some init.d bugs.

ukki 2012-02-24 08:49

Re: mDNS support for Maemo 5
 
Quote:

Originally Posted by pali (Post 1166152)
Hi,

I created package mdns-support and pushed it into Extras-Devel.

I like you.

ForeverYoung 2012-02-24 12:28

Re: mDNS support for Maemo 5
 
Quote:

Originally Posted by pali (Post 1169109)
Try to uninstall and install again all avahi packages. In old version was some init.d bugs.

I purged avahi-daemon and 2 other packages, reinstalled them.
But after reboot again - too fast respawning.

pali 2012-02-24 14:06

Re: mDNS support for Maemo 5
 
Try:
$ sudo start avahi-daemon
and write output from syslog (after command)

Also please write output:
$ ls -l -a /etc/init.d | grep -i avahi
$ ls -l -a /etc/event.d | grep -i avahi

ForeverYoung 2012-02-27 07:33

Re: mDNS support for Maemo 5
 
sudo start avahi-daemon - if some time passed after reboot - normal start. I think some service prevents start of avahi-daemon on startup (at least on my phone, many programs installed). Maybe it will be enough to start after hildon-desktop e.g., not after dbus.

Code:

[1|user@Nokia-N900|~]ls -l -a /etc/init.d | grep -i avahi
-rwxr-xr-x  1 root root  225 2012-02-16 17:06 avahi-daemon
-rwxr-xr-x  1 root root  2428 2009-03-24 16:06 avahi-dnsconfd
[1|user@Nokia-N900|~]ls -l -a /etc/event.d | grep -i avahi
-rw-r--r--  1 root root  176 2012-02-16 17:26 avahi-daemon


pali 2012-04-10 19:56

Re: mDNS support for Maemo 5
 
Ok, now I found problem why avahi-daemon is not starting. It is because upstart trying it start before /opt is mounted and avahi-daemon is optified.

I will fix it ASAP and push new version of avahi-daemon to extras-devel.

pali 2012-05-25 21:38

Re: mDNS support for Maemo 5
 
Package is fixed in extras-devel for a long time. But I do not have permissions to promote it to extras-testing and extras...

JadeH 2012-05-26 05:25

Re: mDNS support for Maemo 5
 
this is a cool package


All times are GMT. The time now is 04:31.

vBulletin® Version 3.8.8