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

socket.connect freezes ND

ethernet socket.connect ping

Best Answer SteveS123, 22 April 2014 - 06:03 PM

Here is a thread that has a work-around for this issue.

http://forums.netdui...socket-connect/

Go to the full post


  • Please log in to reply
4 replies to this topic

#1 SteveS123

SteveS123

    Member

  • Members
  • PipPip
  • 21 posts
  • LocationMissouri

Posted 01 April 2014 - 08:22 PM

I have 7 ND+2's talking to each other over ethernet and it works pretty well most of the time but I occasionally get a controller drop out and not even be pingable(using DOS command prompt) for no reason.  The code is at a state where it is just waiting for incoming data so I can rule out the idea of the code causing the issue.  All seven controllers are running the same code for the most part.  I am controlling LED strands on a separate thread using SPI.  

 

My first problem is that the ND will just be unresponsive to a ping at any random time.  I have the socket option set to KeepAlive also.  (If I have all the controllers working before I leave work around 5pm and return at 8am I will usually have around three controllers unpingable, the number will change from day to day)  Is this a common issue with the ND+2?  I tried firmware 4.2 and now I'm using 4.3 and it acts the same.  The devices are all set to static and I have the router holding those addresses for the ND's

 

My second problem is when I try to do a socket.connect(RemoteEndpoint).  If the endpoint is not responsive(i.e. cable unplugged) then the program just sits there waiting and will never throw an exception or move on; I have to reboot the device to get past this error.  I've read some forums that this has been corrected on ver 4.3 but it did the same thing with ver 4.2.

 

Any help would be greatly appreciated,

Steve



#2 engvidal

engvidal

    Member

  • Members
  • PipPip
  • 10 posts
  • LocationGuarulhos - SP - Brazil

Posted 02 April 2014 - 07:10 PM

Hi

 

I am a new user, but I have the same problem using the web server from the book GSIOT.

 

At random times my N+2 stop responding to the http requests, and I need to restart it.

 

I could not find a solution.

 

And no one could help me.

 

 



#3 SteveS123

SteveS123

    Member

  • Members
  • PipPip
  • 21 posts
  • LocationMissouri

Posted 02 April 2014 - 08:13 PM

Hi engvidal,

 

I got some partial help that is a work around from http://forums.netdui...socket-connect/

The only problem I have is being able to set the socket to "Blocking = false"; I only had luck doing that while using a breakpoint.

I've read so many forums that say this issue is fixed in ver 4.3 of the Microframework but as I can see it isn't.  It would be nice if there was a "SetTimeout" on the "Socket.Connect" that way if you don't get any response your program can close the socket and proceed on.

I've also got all of the ND's set to "KeepAlive = true" and that doesn't seem to make any difference.

 

Steve



#4 jcsaez

jcsaez

    New Member

  • Members
  • Pip
  • 3 posts

Posted 10 April 2014 - 07:20 PM

Hi, there.

 

I have the same problem. Socket.Connect(EndPoint) never connects for me. I surround the problem by trying connection into a new thread as explained in the forum (thread: Socket.Connect() blocks the device).

 

Program works perfectly in emulator.

Anyone have a simple connection test program? Just for test if the device is damage.

 

Mine is Netduino Plus 1 with v4.2.0.1 firmware.



#5 SteveS123

SteveS123

    Member

  • Members
  • PipPip
  • 21 posts
  • LocationMissouri

Posted 22 April 2014 - 06:03 PM   Best Answer

Here is a thread that has a work-around for this issue.

http://forums.netdui...socket-connect/






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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.