Scope:

            The scope is to support Avahi mDNS in RDK-B Opensource


End-End flow:

Build instructions:

  •   Raspberry Pi4 32 bit build 

     RPI 4B Model Reference Platform

Code changes:

  • Avahi mDNS: Version 0.7

   Recipe path:

   openembedded-core/meta/recipes-connectivity/avahi


  •   meta-cmf-raspberrypi:


diff --git a/recipes-core/packagegroups/packagegroup-rdk-ccsp-broadband.bbappend b/recipes-core/packagegroups/packagegroup-rdk-ccsp-broadband.bbappend

index 87a66a2..3830ffa 100644

--- a/recipes-core/packagegroups/packagegroup-rdk-ccsp-broadband.bbappend

+++ b/recipes-core/packagegroups/packagegroup-rdk-ccsp-broadband.bbappend

@@ -6,6 +6,8 @@ RDEPENDS_packagegroup-rdk-ccsp-broadband_append = "\

     libseshat \

     notify-comp \

     start-parodus \

+    avahi-daemon \

+    avahi-utils \

     \

 "

Additional configurations:

  •   Once device is booted make below changes and reboot the gateway,These changes will be upstreamed soon ..
  •   Allow erouter0 in /etc/avahi/avahi-daemon.conf 

                allow-interfaces=erouter0

  •   Make publish workstation yes   

                publish-workstation=yes

  •   Iptable rule to enable mDNS traffic,These changes will be upstreamed soon ..

                iptables -A INPUT -p udp -m udp --sport 5353 --dport 5353 -j ACCEPT

  •   Inorder to ssh to the device using hostname from a Mac book "ssh root@RaspberryPi-Gateway.local please stop the firewall for timebeing as a workaround for testing.will be sharing a fix for this in a while


Jira Ticket:

  REFPLTB-2197 - Getting issue details... STATUS

Testing:

   Host side(On MacBook):

    1.Flame

     

    2.Discovery

       

  3.ssh from mac:

   

4.Ping from Mac:

   

5.ifconfig


Device side on Raspberry Pi4 32 bit;

  •   Use avahi-browse utility

  

                           root@RaspberryPi-Gateway:~# avahi-browse -art

+ erouter0 IPv6 HQSML-1723260                                 _flametouch._tcp     local

+ erouter0 IPv4 HQSML-1723260                                 _flametouch._tcp     local

+ erouter0 IPv6 88665A4552C1@HQSML-1723260                    _raop._tcp           local

+ erouter0 IPv6 HQSML-1723260                                 _airplay._tcp        local

+ erouter0 IPv4 HQSML-1723260                                 _airplay._tcp        local

+ erouter0 IPv6 HQSML-1723260                                 _smb._tcp            local

+ erouter0 IPv6 HQSML-1723260                                 _ssh._tcp            local

+ erouter0 IPv6 RaspberryPi-Gateway [e4:5f:01:af:38:4d]       _workstation._tcp    local

+ erouter0 IPv4 RaspberryPi-Gateway [e4:5f:01:af:38:4d]       _workstation._tcp    local

= erouter0 IPv6 HQSML-1723260                                 _flametouch._tcp     local

   hostname = [HQSML-1723260.local]

   address = [169.254.124.210]

   port = [1812]

   txt = []

= erouter0 IPv4 HQSML-1723260                                 _flametouch._tcp     local

   hostname = [HQSML-1723260.local]

   address = [169.254.124.210]

   port = [1812]

   txt = []

= erouter0 IPv6 88665A4552C1@HQSML-1723260                    _raop._tcp           local

   hostname = [HQSML-1723260.local]

   address = [169.254.124.210]

   port = [7000]

   txt = ["vv=0" "vs=600.8.1" "vn=65537" "tp=UDP" "pk=2d2dc67784db5df2deb8553ead04cd82b20b94b0a7d488a3be726e472317a48c" "am=MacBookPro16,]

= erouter0 IPv6 HQSML-1723260                                 _airplay._tcp        local

   hostname = [HQSML-1723260.local]

   address = [169.254.124.210]

   port = [7000]

   txt = ["srcvers=600.8.1" "pk=2d2dc67784db5df2deb8553ead04cd82b20b94b0a7d488a3be726e472317a48c" "psi=27933C99-CA42-48AC-AF7F-E2928E52BD]

= erouter0 IPv4 HQSML-1723260                                 _airplay._tcp        local

   hostname = [HQSML-1723260.local]

   address = [169.254.124.210]

   port = [7000]

   txt = ["srcvers=600.8.1" "pk=2d2dc67784db5df2deb8553ead04cd82b20b94b0a7d488a3be726e472317a48c" "psi=27933C99-CA42-48AC-AF7F-E2928E52BD]

= erouter0 IPv6 HQSML-1723260                                 _smb._tcp            local

   hostname = [HQSML-1723260.local]

   address = [169.254.124.210]

   port = [445]

   txt = []

= erouter0 IPv6 HQSML-1723260                                 _ssh._tcp            local

   hostname = [HQSML-1723260.local]

   address = [169.254.124.210]

   port = [22]

   txt = []

= erouter0 IPv6 RaspberryPi-Gateway [e4:5f:01:af:38:4d]       _workstation._tcp    local

   hostname = [RaspberryPi-Gateway.local]

   address = [fe80::e65f:1ff:feaf:384d]

   port = [9]

   txt = []

= erouter0 IPv4 RaspberryPi-Gateway [e4:5f:01:af:38:4d]       _workstation._tcp    local

   hostname = [RaspberryPi-Gateway.local]

   address = [192.168.2.8]

   port = [9]

   txt = []

+ erouter0 IPv6 HQSML-1723260                                 _sftp-ssh._tcp       local

= erouter0 IPv6 HQSML-1723260                                 _sftp-ssh._tcp       local

   hostname = [HQSML-1723260.local]

   address = [169.254.124.210]

   port = [22]

   txt = []

Host Side Tools on Mac Book:

  • Flame
  • Discovery

References & RPI4 32bit image:

https://github.com/lathiat/avahi

https://www.scivision.dev/raspberry-pi-wifi-avahi/

https://github.com/DieterReuter/avahi-test

avfina-rdkb-generic-broadband-image_rdk-next_20230405222250.rootfs.wic.bz2


Logs:


systemctl status avahi-daemon

* avahi-daemon.service - Avahi mDNS/DNS-SD Stack

     Loaded: loaded (/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: enabled)

     Active: active (running) since Thu 2023-03-23 16:01:39 UTC; 1 weeks 4 days ago

TriggeredBy: * avahi-daemon.socket

   Main PID: 226 (avahi-daemon)

     Status: "avahi-daemon 0.7 starting up."

      Tasks: 2 (limit: 4915)

     Memory: 1.1M

     CGroup: /system.slice/avahi-daemon.service

             |-226 avahi-daemon: running [RaspberryPi-Gateway.local]

             `-228 avahi-daemon: chroot helper


root@RaspberryPi-Gateway:~# journalctl | [   82.566142] sh[5427]: device wlan0 is already a member of a bridge; can't enslave it to bridg.

[   82.606972] sh[5429]: interface wlan1 does not exist!

grep -i avahi

Mar 23 16:01:37 RaspberryPi-Gateway systemd[1]: Listening on Avahi mDNS/DNS-SD Stack Activation Socket.

Mar 23 16:01:37 RaspberryPi-Gateway systemd[1]: Starting Avahi mDNS/DNS-SD Stack...

Mar 23 16:01:37 RaspberryPi-Gateway avahi-daemon[226]: Found user 'avahi' (UID 996) and group 'avahi' (GID 995).

Mar 23 16:01:37 RaspberryPi-Gateway avahi-daemon[226]: Successfully dropped root privileges.

Mar 23 16:01:37 RaspberryPi-Gateway avahi-daemon[226]: avahi-daemon 0.7 starting up.

Mar 23 16:01:37 RaspberryPi-Gateway avahi-daemon[226]: Successfully called chroot().

Mar 23 16:01:37 RaspberryPi-Gateway avahi-daemon[226]: Successfully dropped remaining capabilities.

Mar 23 16:01:37 RaspberryPi-Gateway avahi-daemon[226]: No service file found in /etc/avahi/services.

Mar 23 16:01:37 RaspberryPi-Gateway avahi-daemon[226]: Network interface enumeration completed.

Mar 23 16:01:37 RaspberryPi-Gateway avahi-daemon[226]: Server startup complete. Host name is RaspberryPi-Gateway.local. Local service coo.

Mar 23 16:01:39 RaspberryPi-Gateway systemd[1]: Started Avahi mDNS/DNS-SD Stack.

Mar 23 16:01:43 RaspberryPi-Gateway avahi-daemon[226]: Joining mDNS multicast group on interface erouter0.IPv6 with address fe80::e65f:1f.

Mar 23 16:01:43 RaspberryPi-Gateway avahi-daemon[226]: New relevant interface erouter0.IPv6 for mDNS.

Mar 23 16:01:43 RaspberryPi-Gateway avahi-daemon[226]: Registering new address record for fe80::e65f:1ff:feaf:384d on erouter0.*.

Mar 23 16:01:45 RaspberryPi-Gateway avahi-daemon[226]: Leaving mDNS multicast group on interface erouter0.IPv6 with address fe80::e65f:1f.

Mar 23 16:01:45 RaspberryPi-Gateway avahi-daemon[226]: Joining mDNS multicast group on interface erouter0.IPv6 with address fd9b:db7a:7d0.

Mar 23 16:01:45 RaspberryPi-Gateway avahi-daemon[226]: Registering new address record for fd9b:db7a:7d07:5572:e65f:1ff:feaf:384d on erout.

Mar 23 16:01:45 RaspberryPi-Gateway avahi-daemon[226]: Withdrawing address record for fe80::e65f:1ff:feaf:384d on erouter0.

Mar 23 16:02:07 RaspberryPi-Gateway avahi-daemon[226]: Joining mDNS multicast group on interface erouter0.IPv4 with address 192.168.3.4.

Mar 23 16:02:07 RaspberryPi-Gateway avahi-daemon[226]: New relevant interface erouter0.IPv4 for mDNS.

Mar 23 16:02:07 RaspberryPi-Gateway avahi-daemon[226]: Registering new address record for 192.168.3.4 on erouter0.IPv4.




  • No labels