2

I have a RPi board Model B Version 1.2 running with Raspbian OS.

I want to communicate with Apple devices. As I studied about it and have found that it uses Bonjour, which is an implementation of Zeroconf protocol. Also, similarly Avahi is a Zeroconf implementation for Linux.

I have downloaded necessary packages related to Avahi.

For audio and video, there are "raop" and "airplay" services respectively. So, I created these services on RPi in the "/etc/avahi/services" directory with name "airplay.service".

Here is the file "airplay.service".

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">

<service-group>
        <name replace-wildcards="yes">service on %h</name>

        <service>
                <type>_airplay._tcp</type>
                <port>47000</port>
                <txt-record>model=AppleTV3,2,1</txt-record>
                <txt-record>deviceid=48:5d:60:7c:ee:22</txt-record>
                <txt-record>features=0x100009FF</txt-record>
                <txt-record>srcvers=160.10</txt-record>
                <txt-record>rmodel=PC1,1</txt-record>
        </service>

        <service>
                <type>_raop._tcp</type>
                <port>5002</port>
                <txt-record>txtvers=1</txt-record>
                <txt-record>ch=2</txt-record>
                <txt-record>cn=0,1,2,3</txt-record>
                <txt-record>et=0,1</txt-record>
                <txt-record>sm=false</txt-record>
                <txt-record>pw=false</txt-record>
                <txt-record>sv=false</txt-record>
                <txt-record>sr=44100</txt-record>
                <txt-record>ss=16</txt-record>
                <txt-record>tp=UPD</txt-record>
                <txt-record>vn=3</txt-record>
                <txt-record>md=0,1,2</txt-record>
                <txt-record>ek=1</txt-record>
                <txt-record>am=AppleTV2,1</txt-record>
        </service>
</service-group>

The "/etc/default/avahi-daemon" file,

AVAHI_DAEMON_DETECT_LOCAL=0

and the "/etc/avahi/avahi-daemon.conf" file

# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# avahi is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with avahi; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.

# See avahi-daemon.conf(5) for more information on this configuration
# file!

[server]
#host-name=foo
#domain-name=local
#browse-domains=0pointer.de, zeroconf.org
use-ipv4=yes
use-ipv6=yes
allow-interfaces=eth0,wlan0
#deny-interfaces=eth1
#check-response-ttl=no
#use-iff-running=no
#enable-dbus=yes
disallow-other-stacks=yes
#allow-point-to-point=no
#cache-entries-max=4096
#clients-max=4096
#objects-per-client-max=1024
#entries-per-entry-group-max=32
ratelimit-interval-usec=1000000
ratelimit-burst=1000

[wide-area]
enable-wide-area=yes

[publish]
#disable-publishing=no
#disable-user-service-publishing=no
#add-service-cookie=no
publish-addresses=yes
publish-hinfo=yes
publish-workstation=no
publish-domain=no
#publish-dns-servers=192.168.50.1, 192.168.50.2
#publish-resolv-conf-dns-servers=yes
#publish-aaaa-on-ipv4=yes
#publish-a-on-ipv6=no

[reflector]
#enable-reflector=no
#reflect-ipv=no

[rlimits]
#rlimit-as=
rlimit-core=0
rlimit-data=4194304
rlimit-fsize=0
rlimit-nofile=768
rlimit-stack=4194304
rlimit-nproc=3

These services can discover by "Avahi Zeroconf Browser" utility on RPi, it shows service on raspberrypi.

But, can't discover by iPad.

Are those txt-record parameters correct and in right place? I tried with different ports e.g. 7000 in '_airplay._tcp' and 5000 in '_raop._tcp'.

What should changes have to made to make it discover on iPad?

If anyone has idea about it then please let me know.

Thanks in advance.

  • 1
    I am not sure what to make of this rant. avahi is enabled by default on latest Raspbian (you don't tell us which version). If you wish to use afp protocol to communicate with Apple devices install netatalk. Search this Forum for netatalk for more background. – Milliways Sep 27 '16 at 11:11
  • you might need a little bit more than just avahi to get airplay to work with your iPad. Search for either 'shairport', 'rplay' or even kodi. – Gotschi Sep 27 '16 at 11:25
  • @Milliways: Its "Linux raspberrypi 4.4.19-v7+". I want to use "raop" and "airplay" services, which are for audio and video. Actually I want to do mirroring of Audio and Video from iPad to my RPi. Will check for mentioned things. Thanks – Jaymin Dabhi Sep 27 '16 at 11:30
  • @Gotschi: Means, Would Avahi services alone not be able to do this tasks? like this. Yes, I tried with 'shairport'. But, there are 2 issues 1. Its ready-made, we can't configure it. and 2. Its only for audio. I need for video too. 'rPlay' I used too. But after upgrading iPad's os to 9.0.3 its not working. And for 'Kodi', I am new for this. Will look for this. But, Is it possible to mirror audio-video from iPad to RPi? Thanks for info. – Jaymin Dabhi Sep 27 '16 at 11:35
  • Apple breaks ^H^H^H^H^H changes the secret Airplay Mirroring protocol on regularly and on purpose. Did i mention that they keep it secret ? – flakeshake Sep 30 '16 at 7:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.