Spotify Connect - Troubleshooting

Spotify Connect - Troubleshooting

I am trying to setup Spotify connect. I run the linux client on my desktop and the Android client on my smartphone. The smartphone is connected to the local WLAN. The desktop is connected to the same IP subnet via ethernet. The smartphone does not detect the desktop via Spotify Connect, though.


Everything I can find about network setup is the following useless comment:

The following IP ranges should be open on port 4070:,
That number 21 is the prefix length

This is not even half the information necessary. 😞 I need the following information for every communication spotify requires:

  1. Which device uses the communication (the controlling or the controlled device, in that case the phone or the desktop)
  2. Which protocol is used by the communication (TCP, UDP, ...)
  3. Does the communication use broadcasting or multicasting?
  4. For TCP or SCTP: is the connection outbound (iniated by the device in question 1) or inbound (the device in question 1 listens for such connections from elsewhere)
  5. For inbound connections: the source IP address or address range (the IP address of the device iniating the connection) and the destination port (the port where the device in question 1 listens for incoming connections).

For a reference example:

The desktop device has IP address

The phone has IP address

Both have outbound internet access via gateway


Spotify communications on my machine:

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name

tcp 0 0* LISTEN 22382/spotify
tcp 0 0* LISTEN 22382/spotify
tcp 0 0* LISTEN 22382/spotify
tcp 0 0* LISTEN 22382/spotify
tcp 0 0 VERBUNDEN 22382/spotify
tcp 0 0 VERBUNDEN 22382/spotify


The last line tells me the phone and the desktop are connected to each other. They do exchange data:

pkts bytes target prot opt in out source destination

115 33507 ACCEPT tcp -- net0 any anywhere tcp dpt:57621


Nevertheless, the phone claims there are no devices to connect to, and it does not control the desktop. I'm confused. What might be going wrong?

7 Replies

Hi! Try connecting them on the same WiFi. I think it only works with the same WiFi. Hope this helps 🙂

The desktop has no wi-fi. It's on the same IP subnet as the phone ( without any address magic (like NAT) inbetween (bridged ethernet/wireless).  There IS a firewall, but disabling it doesn't make it work so that's not the root cause.


So if spotify uses only standard IP packets that should be as good as "the same wi-fi". If it does more involved things, I need to know which, thats why I asked about broadcasting and other protocols. In any case, for proper firewall setup later I need to know which holes to punch specifically.


P.S. It seems it is using IP multicasting for mDNS/DNS-SD ("ZeroConf"), network-local HTTP and a third protocol relayed by the spotify servers  [1]  I wonder whether I need avahi installed? Is anyone else using spotify connect on linux?


I don't know the exact details about how devices are detected to be near, but it is probably "zeroconf" and some other local subnet probing.


You should definitely be able to control your ethernet only desktop, especially if you know this much about networking. I am controlling a desktop linux ethernet from my android right now.


The only thing I can think of is that you are using the stable version of Spotify on 32-bit linux, which is only version 0.9.4 which does not have connect support. You need either 0.9.17 which is 64-bit only or the testing version, which is currently 1.0.14 for both 32 and 64-bit.

Thank you a lot, jooon, that was a very useful hint. I checked and as it turns out, I'm already using v0.9.17.

As it seems to work for you, can you watch the network what it is doing? Do you have an idea what might be different between your setup and mine? How do you connect ethernet and wi-fi?

Hello @vgab,

Hope you are doing well.

Lets start with the IP ranges :  - Spotify UK - Spotify Sweeden 

IP range (network - broadcast)        Subnet Mask - -


But this should not be the case.

I would love to see some tcpdump and netstat, but lets start just with netstat :


netstat -antp | grep spotify

edit : It looks like the connection is done over different port every time spotify is restarted, so it is good idea to open all the ports and check if Spotify connect is working normally : )

Hello dreadlord,


I already posted a netstat in the first post. in fact, almost exactly the command you asked for 🙂 I only added -v as well.


P.S. Oops, it is localized. "VERBUNDEN" means connected in that case.

P.P.S. I would love to do some packet capture, but obviously I'd need to know what to look for first.

3PS. For completeness sake: I also mentioned in the OP that I did switch off the firewall completely for initial testing.

@vgab Did you succeed? I am facing similar problems. I have a Denon receiver (AVR-x1200w) to which Android and iOS devices connect. Initially just over my wifi access point then via a switch to the receiver. Did not work. I have open wrt on the access point. Finally removed the wire connection to the receiver. That works too some extend, but not stable. Probably because besides the access point there is also the wifi router (also running open wrt). So once the mobile devices connect to the router they use a different channel than the Denon and then that is when I assume the Denon becomes invisible. So I would also appreciate any hint on which protocol I need to enable on my open wrt devices. I found, which seems to be a presentation (date 09/2011) from a technically savvy Spotify employee: So if were able to resolve the issue and you can provide me with the information I need that would be great. Otherwise I'd contact Gunnar Kreitz next.

Suggested posts