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: 
Ram007
Channel Surfer

Detect Network change and its SSID using roDeviceInfo - EnableInternetStatusEvent

How can i detect network change and its SSID using roDeviceInfo?

I have a router with 2 SSID configured with the same IP (SSID 1 = "ABC", SSID 2 = "XYZ")

I have created a task in which i have created roDeviceinfo object and set EnableInternetStatusEvent(true)

deviceInfo = CreateObject("roDeviceInfo")
port = CreateObject("roMessagePort")
deviceInfo.SetMessagePort(port)
deviceInfo.EnableInternetStatusEvent(true)

And in a while loop I look for:

type(msg) = "roDeviceInfoEvent" then

deviceInfoMsg = msg.getInfo()
deviceInfoMsg.Lookup("internetStatus")

and if deviceInfoMsg.internetStatus = true, i call the getConnectionInfo() to get the SSID (say "ABC" ) and store it into registry.

Now,  If I switch to the other network "XYZ", i can see the internetStatus been switching from false to true, but the getConnectionInfo() does'nt provide the new SSID ("XYZ") which is been connected, instead shows the old SSID ("ABC").

How can we reliably detect SSID change here?

 

0 Kudos
2 REPLIES 2
roAmanda
Roku Employee
Roku Employee

Re: Detect Network change and its SSID using roDeviceInfo - EnableInternetStatusEvent

Hi there,

There isn't a way to automatically detect a network change in the way you are asking. 

Ram007
Channel Surfer

Re: Detect Network change and its SSID using roDeviceInfo - EnableInternetStatusEvent

@roAmandathank you for the reply.

Here shouldnt the getConnectionInfo() return the network information of the current network?

0 Kudos