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?