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: 
ajb2011
Visitor

ECP: SSDP gives me wrong IP after a while

I am playing with ECP and my Roku. When I use SSDP to discover my box, it gives me back the correct IP, but after a while the IP seems to have changed for the box and the SSDP call still gives me back the old IP address. Here is one of the responses:

HTTP/1.1 200 OK
Cache-Control: max-age=300
ST: upnp:rootdevice
USN: uuid:7F248787-B5DF-4C7B-8C9A-00DDEE3B9242::upnp:rootdevice
Ext:
Server: Roku UPnP/1.0 MiniUPnPd/1.4
Location: http://192.168.1.101:8060/

The last part of the IP seems to change from 101 to 100 pretty regularly, which might be my network and DHCP. Regardless, I would have expected the SSDP discovery to still work and always give me back the current IP address of my Roku.

If I soft reset my Roku, the SSDP starts to give me the correct IP again. Is this a known bug?
I have a Roku LT.

Thanks in advance
0 Kudos
19 REPLIES 19
destruk
Binge Watcher

Re: ECP: SSDP gives me wrong IP after a while

I fyou use mac address dhcp reservation, your roku will always be assigned the same IP.
0 Kudos
gonzotek
Visitor

Re: ECP: SSDP gives me wrong IP after a while

"destruk" wrote:
I fyou use mac address dhcp reservation, your roku will always be assigned the same IP.
Which is a great solution for a single user, but for a remote developer hoping to support many users...? I'm planning on adding documentation to Remoku about how to add a dhcp res., since javascript can't make use of the ssdp discovery anyway. But for remotes written in more permissive operating environments, we'd hope that the ssdp response would return the correct value..

OP, I've seen other people report the same issue (after dhcp re-assignment, ssdp discovery reports old address). I don't know if Roku is tracking it yet.
Remoku.tv - A free web app for Roku Remote Control!
Want to control your Roku from nearly any phone, computer or tablet? Get started at http://help.remoku.tv
by Apps4TV - Applications for television and beyond: http://www.apps4tv.com
0 Kudos
destruk
Binge Watcher

Re: ECP: SSDP gives me wrong IP after a while

For a remote developer with multiple users, how do you get past their firewall from outside the network? I don't think you cdan have a solution for a standard IP address using DHCP, because when they turn off a device and turn others on, there isn't a way to have that kind of control without using a dhcp reservation or disabling dhcp entirely. You'd probably really want a Roku with a built in modem and router into the same unit, which increases cost and complexity.
0 Kudos
gonzotek
Visitor

Re: ECP: SSDP gives me wrong IP after a while

"destruk" wrote:
For a remote developer with multiple users, how do you get past their firewall from outside the network? I don't think you cdan have a solution for a standard IP address using DHCP, because when they turn off a device and turn others on, there isn't a way to have that kind of control without using a dhcp reservation or disabling dhcp entirely. You'd probably really want a Roku with a built in modem and router into the same unit, which increases cost and complexity.
What? I'm not following.

The problem (for the OP) is that the ssdp response from a Roku can be wrong (for instance: the Roku has a dhcp-provided address of 192.168.1.100, but tells you it's at .101 when you send the ssdp request). It's a Roku bug. It can be worked around (as you suggested) by setting dhcp reservation, so that the Roku never gets confused, but part of the reason Roku added the discovery protocol is so that network remotes can always find the Rokus on the local network, without needing static/reserved ip addresses.
Remoku.tv - A free web app for Roku Remote Control!
Want to control your Roku from nearly any phone, computer or tablet? Get started at http://help.remoku.tv
by Apps4TV - Applications for television and beyond: http://www.apps4tv.com
0 Kudos
destruk
Binge Watcher

Re: ECP: SSDP gives me wrong IP after a while

If it's not working, how else would you fix it without requiring Roku to release an update? Would it even be possible to scan the network for the known MAC address of the roku devices on the network and then match them up to what the IP address should be, or is that not possible?
0 Kudos
RokuJoel
Binge Watcher

Re: ECP: SSDP gives me wrong IP after a while

A bug report was filed today. In the meantime, if the connection fails, you *could* try the ugly but-usually-workable brute-force method: attempt to connect in succession to every ip address on the subnet on port 8060.

- Joel
0 Kudos
ajb2011
Visitor

Re: ECP: SSDP gives me wrong IP after a while

Wow! I am thrilled that a bug was filed. Hopefully it will be fixed. Would that come out as an automatic firmware update?

Because discovery is unreliable for this reason right now, I am debating whether to just type in the IP address. If I fail to connect I can go back to the settings screen and look up the correct one, re-enter and try again.

Paper-Clip reset always works, but it is just a workaround. Having a discovery feature discover the wrrong thing is worse that having no discovery mechanism in my opinion. If this gets fixed, would it be a fix for all Roku models? I'd love to test my little remote on more rokus and in different network configurations, but I don't have that luxury.
0 Kudos
destruk
Binge Watcher

Re: ECP: SSDP gives me wrong IP after a while

Thanks Joel
0 Kudos
RokuJoel
Binge Watcher

Re: ECP: SSDP gives me wrong IP after a while

"ajb2011" wrote:
Having a discovery feature discover the wrrong thing is worse that having no discovery mechanism in my opinion


if you make an http request (with a timeout of course so your process doesn't get hung up waiting) to the port, you should be able to detect if it is a Roku pretty easily, by the resulting XML data, specifically the FriendlyName tag. I think some of the iPhone Roku remote apps might use this method, or something similar, as an alternative to SSDP.

- Joel
0 Kudos