The Netduino forums have been replaced by new forums at community.wildernesslabs.co.
This site has been preserved for archival purposes only
and the ability to make new accounts or posts has been turned off.
With the Netduino Plus V2 is one problem solved, more memory. One to go the serial invert Rx.Tx.
We want to beat the Arduino in every way. We are looking forward when the Netduino V2 is available in the Netherlands.
Hello Chris may I have your attention. We have notice that the Netduino Plus hangs when the socket.Connect is called when the internet connection is down after the N+ starts up. The only option was a reset.
I have placed a full working example here: http://forums.netdui...es/page__st__20
You can run the code and on the same time stop the internet connection in your router. Then you see the error.
My question, can you confirm this "bug" and do you have a workaround for it because writing to the Internet is het core of my program. Sometimes the internet connection is down here for a few minutes. I did a attempt with 4.3 beta but deploying to the N+ was without any succes.
Now Baxter, I can exactly tell you what is wrong.!
The Netduino will hang when you have a internet connection but after a while the IP provider stops the connection for a reason.
Do While True
Debug.Print("begin " & DateTime.Now.ToString)
Dim IPEndPoint As New IPEndPoint(Dns.GetHostEntry("api.pachube.com").AddressList(0), 80)
Using Host As Socket = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
Host.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.NoDelay, True)
Host.SendTimeout = 3000
Host.ReceiveTimeout = 1000
'WITH internet connection it wil run perfect, but now without internet (after you had a connection)'
' and still on the local network then..........'
Debug.Print("WHEN INTERNET connection fails after a time, than the NETDUINO HANG!!!!")
Host.Connect(IPEndPoint) 'It will hang here.!'
Debug.Print("Oké, stil connection")
Catch ex As Exception
Debug.Print("error " & ex.Message) 'no error will show here'