RPI3B volumio, no audio when casting from iphone

I am trying to cast music from my iphone, web radio plays fine but casting does not. Volumio shows the song is playing but nothing is coming from the headphone jack. I am running the latest version of volumio.

I submitted the log file, let me know if you need anything to link me to the log file.

http://logs.volumio.org/volumio/mpaK6kq.html

Thanks!

You need to paste the link to the log file here, in your request for help.

Just public for everyone to see?

Yes, smart people will look at it and see why it’s not working, if you are lucky :slight_smile:

done

Hey @VolumDrew,

Supplied log:

The output path itself is healthy. mpd played three web radio streams through the headphone jack in the same session (France Culture, France Musique, NHPR). So the ALSA chain to the 3.5mm jack is working at the time of the log. shairport-sync (the AirPlay receiver) is running. No community plugins are installed.

One thing in the log I want to flag before going further: the Pi is on 10.10.102.11 with a /26 mask, and the client connections to the Volumio UI (port 3000) and the device gateway (port 7331) are coming from 192.168.3.22, which is on a different subnet. TCP between the two clearly works, but AirPlay also needs mDNS discovery and a UDP audio path, and those are not necessarily routed across subnets even when TCP is.

To narrow this down I need a few things:

  • The exact app or method used to cast from the iPhone. Specifically, is this AirPlay from Control Center or the Music app, or is it an app such as Mconnect, 8player, Spotify, or YouTube?

  • Whether the iPhone and the Pi are normally on the same Wi-Fi SSID. If yes, please confirm the subnet the iPhone is on right now. The connections in the log suggest it is not on the Pi’s subnet.

  • Whether Volumio appears as a target on the iPhone, and in which selection menu it appears.

  • Whether the same iPhone, on the same Wi-Fi, can cast successfully to any other receiver right now. That rules the iPhone in or out as a variable.

  • A fresh log captured immediately after a failed cast attempt. The current dump does not contain any shairport-sync events covering the failure itself.

Kind Regards,

Thanks for the information and here are some answers to your questions.

NewLog

  • I am using the iPhone music app, I play the song, click share and volumio shows up as an option. I click it, and the volumio GUI shows the song playing but no sound comes out.
  • The phone and volumio are not on the same vlan but I have firewall rules allowing them to talk. I can move my phone to the same vlan to see if it works as a test, I will try that later today and get back to you.
  • The new log is attached.

Thanks!

Hey @VolumDrew,

Thanks for the new log. The picture is clearer now.

Confirmed from the log:

  • The Pi is on 10.10.102.11, your iPhone is on 192.168.3.22.
  • shairport-sync is running and listening on port 5000 (legacy AirPlay 1 control).
  • Your iPhone has an established TCP session to the Pi on port 5000. That is why the Volumio UI shows the song as playing. The control channel is up.
  • The Pi is also trying to open a return TCP connection back to your iPhone (10.10.102.11 to 192.168.3.22 on a high port). That connection is sitting in SYN_SENT, meaning the Pi’s SYN was sent but no SYN/ACK has come back.

So inbound from the iPhone to the Pi works. The return path from the Pi back to the iPhone is not completing.

AirPlay needs more than just the inbound control session. It also needs:

  • Pi-initiated TCP back to the iPhone on high ports for event/reverse channels.
  • A negotiated UDP RTP audio stream between the two devices, which is bidirectional in practice.

Your firewall rules allow the iPhone-to-Pi direction, which is enough to discover the device and see playback state in the UI. They do not appear to allow, or do not fully allow, the return paths AirPlay needs to actually deliver audio.

Your planned test of moving the phone onto the same VLAN as the Pi is exactly the right thing to do. It removes the firewall and the inter-VLAN UDP path from the equation. Two outcomes:

  • If audio plays on the same VLAN, this is a firewall/inter-VLAN issue, not a Volumio issue. You will need to allow Pi-initiated TCP from 10.10.102.11 to the iPhone subnet on high ports, and the AirPlay UDP audio range, in both directions. mDNS reflection between the VLANs is also worth checking since AirPlay also relies on Bonjour for ongoing session metadata.

  • If there is still no audio on the same VLAN, the network is ruled out and we move to shairport-sync itself. In that case, please capture a fresh log immediately after the failed attempt, and also include the output of:

    • sudo journalctl -u shairport-sync --no-pager -n 200
    • cat /tmp/shairport-sync.conf

Report back after the same-VLAN test and we will take it from there.

Kind Regards,

1 Like

It worked fine on the same vlan so its a firewall issue for sure.

In regards to specific ports I need to open, is there a list somewhere showing which ones I would need from volumio to my devices? I like to be specific on whats allowed.

Thanks again!

Hey @VolumDrew,

Good, that confirms it cleanly. Same VLAN works, different VLAN does not, so this is purely a firewall and inter-VLAN routing matter on your side, not a Volumio configuration problem.

For classic AirPlay (which is what your shairport-sync is doing - it is listening on port 5000 and not on port 7000), the ports the upstream shairport-sync project documents as needed are:

  • 3689/tcp (DAAP)
  • 5353/udp (mDNS / Bonjour, allowed in both directions between the iPhone subnet and the Volumio subnet)
  • 5000/tcp (AirPlay control)
  • 6000:6009/udp (AirPlay audio, timing and control RTP)

Source for that list: shairport-sync/TROUBLESHOOTING.md at master · mikebrady/shairport-sync · GitHub

A few practical notes on top of the port list.

The traffic is bidirectional. Your iPhone initiates the TCP control session to the Pi on 5000, but the Pi also opens connections back to the iPhone on high ephemeral ports for the return paths, and the RTP audio in the 6000:6009 range flows both ways. Your earlier log showed a SYN_SENT from the Pi back to your iPhone that never got a SYN/ACK, which is exactly the kind of return path that a one-way firewall rule will block. Make sure both directions are permitted.

mDNS / Bonjour on 5353/udp does not natively cross subnets. AirPlay relies on Bonjour for service discovery and for ongoing metadata, so even with all the unicast ports open you will likely also need an mDNS reflector or Avahi-style reflector running on whatever device routes between your two VLANs. If your firewall or router has an “mDNS repeater” or “Bonjour reflector” feature, that is what to enable. Without it, the iPhone may either not see Volumio in the AirPlay menu, or the session may behave erratically once it does connect.

Open the ports above in both directions between your iPhone VLAN and the Pi VLAN, enable mDNS reflection between those two VLANs, and try again. Refer to your router documentation.

Kind Regards,

1 Like

I truly appreciate the help, thank you so much!