TCP/IP Communications Using Netduino Plus 2
#1
Posted 13 November 2013 - 09:20 AM
- VictorSON likes this
#3
Posted 15 November 2013 - 03:09 PM
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]Deputy of the code to treat socket exception error.[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]Sub Main()[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]Try[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]Socket.Connect()[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]flagException = False[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]Debug.Print("Connected Socket")[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]'following code[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]' ERROR CONECTION TCP-IP ==> System.Net.Sockets.SocketException[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]Catch errorSocket As SocketException[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]'Socket.Close()[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]'Debug.Print("ethernet connection")[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]flagException = True[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]Finally[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]End Try[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]Thread.Sleep(Timeout.Infinite)[/color]
[color=rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;font-size:12px;]End Sub[/color]
When the network cable is disconnected then is when occurs the error and is closed the emulator. This occurs is with OS W7 but in Windows XP the code works well and is established the Socket exception error. I think the problem is in the installation of the Micro Framework on W7 because libraries are not containing the. NET.If por example, I want testing that the network cable is connected in each time, it not is posible. I have tested in multiple computers on W7 and it not works.
Also tagged with one or more of these keywords: netduino, TCP-IP, netduinoplus2, communications netduino plus2, microframework, visual studio 2010, .NET Micro Framework SDK v4.2
General →
General Discussion →
Netduino for my first productStarted by vishnusmoke, 12 Nov 2015 netduino, production, product |
|
|||
Hardware →
Netduino 3 →
ND3 hangs calling File.Delete()Started by ukkiwisurfer, 06 Nov 2015 SD, Wifi, Netduino |
|
|||
Hardware →
Netduino Mini →
Flashing Netduino Mini with Netduino 3Started by tridy, 13 Oct 2015 flashing, mini, netduino |
|
|||
Hardware →
Netduino Plus 2 (and Netduino Plus 1) →
Why do I have to reboot my device to change the IP address?Started by cSharper, 31 Jul 2015 webserver, ip, netduino, change and 1 more... |
|
|||
Hardware →
Netduino Plus 2 (and Netduino Plus 1) →
N+2 & Adafruit 7-segment LED Display with HT16K33 BackpackStarted by LennySh, 25 Jul 2015 Adafruit, seven, segment, LED and 5 more... |
|
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users