NetworkChange.NetworkAddressChanged - IP changes to 127.0.0.1 instead of 0.0.0.0

FEZ Spider, 2015 SDK R1 Pre-Release 4

I’ve noticed some new behavior in the SDK R1 Pre-Release 4 which I haven’t seen before.

Normally when using the PPPSerialModem after I call the disconnect method I get a NetworkChange.NetworkAddressChanged event and the IP address changes to 0.0.0.0. I think that is the expected behavior.

Starting with Pre-Release 4 I have noticed something different. For a few days everything seems to work as expected with the network interface. I connect the modem, use the network then disconnect. However, after a few days of everything working fine then when I call the disconnect method and the modem disconnects the NetworkChange.NetworkAddressChanged event is raised but IP address changes to 127.0.0.1 instead of 0.0.0.0.

After that happens I am able to reconnect the PPPSerialModem again, and I don’t get any errors, and get a good valid IP address assigned by the cellular network. However, all network usage fails with a “System.Net.WebException: host not available” after that happens.

Is anyone else seeing the change to 127.0.0.1 rather than 0.0.0.0 when disconnecting?

After reconnecting this is the error I start getting:

[quote]
#### Exception System.Net.Sockets.SocketException - CLR_E_FAIL (6) ####
#### Message:
#### Microsoft.SPOT.Net.SocketNative::getaddrinfo [IP: 0000] ####
#### System.Net.Dns::GetHostEntry [IP: 0008] ####
#### System.Net.HttpWebRequest::EstablishConnection [IP: 00e1] ####
#### System.Net.HttpWebRequest::SubmitRequest [IP: 0019] ####
#### System.Net.HttpWebRequest::GetRequestStream [IP: 0008] ####
#### T2.AutoCount.Tasks.PeriodicNetworkTask::Task [IP: 0005] ####
#### T2.AutoCount.Utility.ThreadPool::ActionConsumer [IP: 0057] ####
#### SocketException ErrorCode = 10060
#### Exception System.Net.WebException - 0x00000000 (6) ####
#### Message: host not available
#### System.Net.HttpWebRequest::EstablishConnection [IP: 00f1] ####
#### System.Net.HttpWebRequest::SubmitRequest [IP: 0019] ####
#### System.Net.HttpWebRequest::GetRequestStream [IP: 0008] ####
#### T2.AutoCount.Tasks.PeriodicNetworkTask::Task [IP: 0005] ####
#### T2.AutoCount.Utility.ThreadPool::ActionConsumer [IP: 0057] ####[/quote]

@ PhilH - Has this happened multiple times? Each after a few days?

@ John - Yes, it has happened multiple times. I’ve seen it go for as little as a few hours or in some cases up to 6 days.

@ PhilH - Unfortunately that is going to be a difficult one to track down. The best thing to do at this point is try to create a minimal project that reproduces the error that we can let run for a while.