Networking connection error

I am no expert on networking, trying to get the rtc in the portal synced to internet time. Using the code sample provided by GHI on github. When the IP address changes, the code under NetworkController_NetworkAddressChanged runs, and it reports a ‘new’ IP address of 169.254.1.0 The code then goes out to fetch the data (GetNetworkTime) , but I get an CLR_E_INVALID_OPERATION exception when this call is made:
var addresses = System.Net.Dns.GetHostEntry(ntpServer).AddressList;
So is the IP address ok? Was kind of thinking it should look like 192.168.0.x …

“169.254. x.x: This is what’s called an Automatic Private IP address. An IP in this range means that the computer cannot see the network . … Unfortunately, if there’s no network connectivity, the computer is unable to talk to the server.”

Right thanks - I will look to see why the wifi isn’t connecting, thanks.

Perhaps this can be helpful:

1 Like