25

I'm new to inspecting packets with Wireshark so this might be something very stupid on my part. That said, I don't really understand the transaction between my computer and my Roku.

17  1.129097    192.168.1.70    192.168.1.64    HTTP    248 GET /dial/com.spotify.Spotify.TVv2 HTTP/1.1

My computer is 70 and my Roku is 64.

This is the entire HTTP follow:

Client

GET /dial/com.spotify.Spotify.TVv2 HTTP/1.1
Connection: keep-alive
Accept-Encoding: gzip
Keep-Alive: 0
Host: 192.168.1.64:8060
User-Agent: Spotify/109800078 OSX/0 (iMac18,1)

Server

HTTP/1.1 404 Not Found
Server: Roku UPnP/1.0 MiniUPnPd/1.4
Content-Length: 0

I don't have anything related to Roku installed on my computer but I do have Spotify running.

  • 9
    @kasperd HTTP doesn't have to be served on port 80, and I'd actually be rather surprised if Spotify took control of port 80 for its API. I think we can safely say that the Wireshark output just doesn't show us the port numbers. – Lightness Races with Monica Feb 5 at 11:22
  • 2
    @kasperd Roku's control protocol operates via REST on 8060 – user71659 Feb 5 at 19:08
  • 3
    @kasperd, there is a lot more to HTTP than just the port number. Just having the word GET at the start of the message payload, and what look like header/value pairs in the rest of the message would make anyone who cares to hazard an educated guess assume that it's HTTP traffic. (Plus, the protocol version at the end of the message's first line is kind of a dead giveaway, too...) – Ghedipunk Feb 5 at 19:46
  • 2
    @kasperd Wireshark is very clever. Have a read of this! It applies some heuristics when the protocol is not self-evident. Point is none of this reflects on the quality of the question at all. – Lightness Races with Monica Feb 5 at 20:19
  • 2
    @kasperd Invalid test. The heuristics follow the flow and look for things like response being HTTP/1.1, and User-Agent etc. A single line isn't representative. Because it's heuristics, you need to test with the original packet trace and version before you accuse the OP of tampering or omitting information. – user71659 Feb 5 at 22:15
48

It appears to be a feature called Spotify Connect. Spotify allows you to play music from you phone or computer using your Roku or smart TV, as most people will likely have better sound systems for their TVs than for their computer.

Presumably your Spotify desktop app is automatically scanning your LAN and querying compatible devices to be able to offer this feature. In your case it looks like you have a compatible Roku, but the app isn't installed on it, so it returns a 404.

  • Does it actually know before sending the request that it is being sent to a compatible device? And how would it know that? Or will it sent that request to every webserver on the LAN in order to find out which of them run compatible software? – kasperd Feb 5 at 11:02
  • 13
    @kasperd The request you're seeing is the discovery mechanism. Indeed, how else would it work? I'm actually surprised it's not unicast or something like that (though it may have done a port scan first). – Lightness Races with Monica Feb 5 at 11:21
  • 12
    This is a protocol called DIAL (Discovery and Launch). A device (in this case, the pc) sends out a multicast request on the local network. DIAL-enabled devices reply with their service url. Applications can then be queried by a HTTP GET to the relevant endpoint (defined by registering an app on the DIAL website, in this case it's spotify). You can find out more on the DIAL website: dial-multiscreen.org – Alex Meuer Feb 5 at 16:56
  • 6
    For discovering devices, DIAL uses mDNS. Once it's found a device, it queries its capabilities by hitting an HTTP endpoint (in the SRV response to the mDNS query) on the device. – Roger Lipscombe Feb 5 at 17:21
  • @RogerLipscombe afik DIAL uses SSDP for discovery not mDNS. – Rick Feb 6 at 13:34
2

You might not be aware of it (Roku doesn't heavily advertise it) but the Roku can be used for remote streaming across multiple services. I've used mine to stream Youtube from my phone over the Chromecast protocols.

As far as Spotify Connect goes, Spotify likes to identify all the devices streaming and any that could be used for streaming. For instance, if I fire it up on my phone, I can use my PC to control what's playing or vice versa (handy if you want to set a device up to stream and control it remotely). It's also a clever way for Spotify to also make sure you're only streaming on one device at a time per account.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.