Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Brimmstone
Visitor

SSDP Discovery Not Working

I'm having an issue with SSDP discovery on a Roku 2 XS running 5.0 software. It seemed to work correctly with the previous 4.9 software version but it does not respond to M-SEARCH requests as detailed in the external control guide here: http://sdkdocs.roku.com/display/sdkdoc/ ... trol+Guide

It does spit out a NOTIFY message every hour or so (which is consistent with the Max-age of 3600 that it is returning) but the fact that it doesn't respond to M-SEARCH is a problem. Is anybody else having this issue?
0 Kudos
11 REPLIES 11
Brimmstone
Visitor

Re: SSDP Discovery Not Working

Upon further testing, it appears to NOTIFY every 20 minutes, not every hour. Still doesn't respond to M-SEARCH though.
0 Kudos
Brimmstone
Visitor

Re: SSDP Discovery Not Working

It appears this has no been fixed in any of the 5.x releases to date. Again, this worked in 4.9.
0 Kudos
EnTerr
Roku Guru

Re: SSDP Discovery Not Working

"Brimmstone" wrote:
It appears this has no been fixed in any of the 5.x releases to date. Again, this worked in 4.9.

Wat?
Of course it's working, it's too fundamental not to work.
I have an almost 3 year-old app that relies on M-SEARCH and it has been working fine (spare routers that dont support multicast).
Show the UDP datagram, what are you sending exactly and to whom?
0 Kudos
LCubed
Visitor

Re: SSDP Discovery Not Working

I hate to beat a dead horse, but since I'm new to this forum I'm going to kick the pony a bit.
I'm having this problem getting SSDP Discovery to work. I'm monitoring the traffic on UDP port 1900 from my laptop while another machine is performing an M-SEARCH. I also have an AV receiver performing an M-SEARCH on the LAN. Wireshark shows these searches going out, and the AV Receiver gets a response from another PC on my network. The search for the Roku device (4200X) doesn't produce a response from the unit, but I do get the NOTIFY messages from it every 20 minutes.

Wireshark shows I'm sending the following:
M-SEARCH * HTTP/1.1\r\n
Host: 239.255.255.250:1900\r\n
Man: "ssdp:discover"\r\n
ST: roku:ecp\r\n
\r\n

Roku software v6.2 Build:3467

Any idea where I can start troubleshooting?
0 Kudos
RokuKC
Roku Employee
Roku Employee

Re: SSDP Discovery Not Working

Have you tried sending the M-SEARCH query from your laptop, so you're sure that Wireshark will show the UDP traffic between the laptop and the player?

And are the laptop and player on the same subnet? Or are you doing something fancier with multicast routing.

By the way, I'm fairly sure it doesn't matter for Roku, but I believe technically you should include a MX: timeout line in the M-SEARCH query, e.g. MX: 3.
0 Kudos
EnTerr
Roku Guru

Re: SSDP Discovery Not Working

"RokuKC" wrote:
By the way, I'm fairly sure it doesn't matter for Roku, but I believe technically you should include a MX: timeout line in the M-SEARCH query, e.g. MX: 3.

Yup. True on both: UPnP spec requires MX header but Roku player does not care (i just checked behavior is unchanged). Best to be compliant and send "MX: 1" though.

@LCubed - who are you sending the datagram to? Should be to 239.255.255.250. And are you listening for unicast response (i.e. direct reply)?
0 Kudos
LCubed
Visitor

Re: SSDP Discovery Not Working

"EnTerr" wrote:
"RokuKC" wrote:
By the way, I'm fairly sure it doesn't matter for Roku, but I believe technically you should include a MX: timeout line in the M-SEARCH query, e.g. MX: 3.

Yup. True on both: UPnP spec requires MX header but Roku player does not care (i just checked behavior is unchanged). Best to be compliant and send "MX: 1" though.

@LCubed - who are you sending the datagram to? Should be to 239.255.255.250. And are you listening for unicast response (i.e. direct reply)?


Yes, I'm sending the datagram to 239.255.255.250. I'm not really even listening yet. I wanted to check the response with Wireshark first to verify what I should see. I have Wireshark setup to look for traffic on port 1900, and the display filter set to (ip.src == 192.168.10.127) || (ip.src == 192.168.10.242)
.127 is the Roku, and .242 is the AMX control system sending out the multicast datagram.
So additional info:
The Roku is connected via WiFi to a Layer 2 managed switch connected to another Layer 2 managed switch which has the control system AND my laptop connected to it. One thing I could try is connecting my laptop to WiFi (like the Roku) and then seeing if I can still see the multicast datagram going out of the control system via Wireshark on the laptop. I'll try that once I'm back from my business trip (6/19).
0 Kudos
LCubed
Visitor

Re: SSDP Discovery Not Working

So I made some changes, without any good results. I set the TTL in the MulticastSocket to 6. I also changed the datagram packet to:

M-SEARCH * HTTP/1.1
Host: 239.255.255.250:1900
Content-Length: 0
Man: "ssdp:discover"
MX: 6
ST: roku:ecp

A carriage return, line-feed follow each line with an additional set at the end of the string.
I even set the roku to use the wired ethernet connection and connected it to the same switch as the control system sending out the datagram and the laptop running Wireshark.
I still don't see any response from the roku unit. I don't doubt this works, so I must be doing something wrong. I just don't know what.
My thanks go out to those that have responded so far.
0 Kudos
LCubed
Visitor

Re: SSDP Discovery Not Working

OK, so I used the Roku app on my Samsung smartphone, and it couldn't find the Roku 3 either. When I manually put in the IP address, it worked fine. I saw the phone's M-SEARCH datagram go out through Wireshark, but I didn't see any response from the Roku unit.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.