Netduino home hardware projects downloads community

Jump to content


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.

Marjoc's Content

There have been 2 items by Marjoc (Search limited from 25-April 23)


By content type

See this member's

Sort by                Order  

#54103 TCP/IP Communications Using Netduino Plus 2

Posted by Marjoc on 15 November 2013 - 03:09 PM in Visual Basic Support

[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.




#54059 TCP/IP Communications Using Netduino Plus 2

Posted by Marjoc on 13 November 2013 - 09:20 AM in Visual Basic Support

I work with OS Win7 and Microsoft Visual Studio 2010 and I have downloaded the programs for to work with Netduino plus 2. I am doing test of exception error on the code and when I run the code line of the socket the program stops and exits the compiler. Obviously I want to treat socket error when network cable is disconnected but I get the error  mentioned above.
 
I have run the program on OS XP and I don't have problem with it. I check the program that I am doing and it works well and the installation of the programs I did in the order listed.
 
Can anyone help me for to solve this error? Thanks.




home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.