jbrave
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2011
12:47 PM
roku ip address
Question, with roDeviceInfo, is ethernet always eth0 and wifi always eth1? Is there only one ever active, or can both wifi and ethernet be active on a box?
It appears to be either or, but on *nix systems, I've seen device names change on reboot...
- Joel
It appears to be either or, but on *nix systems, I've seen device names change on reboot...
- Joel
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
4 REPLIES 4

gonzotek
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2011
12:50 PM
Re: roku ip address
"jbrave" wrote:I can't answer as to which is which(or if it's possible for them to change), but can say definitely that only one is active at a time.
Question, with roDeviceInfo, is ethernet always eth0 and wifi always eth1? Is there only one ever active, or can both wifi and ethernet be active on a box?
It appears to be either or, but on *nix systems, I've seen device names change on reboot...
- Joel
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
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
jbrave
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2011
02:27 PM
Re: roku ip address
if anyone is interested, here is a little code for grabbing an ipaddress from roDeviceInfo.
function getrokulocalip() as string
di=createobject("rodeviceinfo")
while true
temp=di.getipaddrs()
temp.reset()
aakey=temp.next()
if not temp=invalid then
return temp[aakey]
end if
end while
end function
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2011
03:59 PM
Re: roku ip address
"jbrave" wrote:
if anyone is interested, here is a little code for grabbing an ipaddress from roDeviceInfo.function getrokulocalip() as string
di=createobject("rodeviceinfo")
while true
temp=di.getipaddrs()
temp.reset()
aakey=temp.next()
if not temp=invalid then
return temp[aakey]
end if
end while
end function
Hrmm.. that doesn't look quite right. You're resetting temp on every loop through that while, so the .Next() is never actually going to get you anywhere. That aside, with an associative array, you can do a "For Each" through the keys in the aa instead of the "While" loop...
Function GetRokuLocalIP() As String
deviceInfo = CreateObject("roDeviceInfo")
ipAddresses = deviceInfo .GetIPAddrs()
For Each key In ipAddresses
ipAddress = ipAddresses[key]
If ipAddress <> invalid And ipAddress.Len() > 0 Then
Return ipAddress
End If
Next
Return ""
End Function
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
jbrave
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2011
04:47 PM
Re: roku ip address
You are right - both the createobject and reset should happen before the start of the loop. It still works, but, it isn't "right" and would fail under other circumstances.
I didn't know you could do a for-each on an AA. That is huge.
- Joel
I didn't know you could do a for-each on an AA. That is huge.
- Joel
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!