help with Arduino TCP/IP connect problem

bob 295 icanprogram-sKcZck+fQKg at public.gmane.org
Thu Jun 21 17:04:57 UTC 2012


We are having a lot of problems debugging a TCP/IP connect problem between my 
associate's Arduino and my Linode server app.    The gist of the problem is 
described here:

http://www.icanprogram.com/opndrs/arduino

It would appear that the chip used to handle the TCP/IP stack on the Arduino 
thinks that the socket connection it establishes (as a client) has not 
succeeded and it times out.    However, on the Linode side we observe that 
the socket connection has succeeded (ie. been accepted) because we get our 
child process spawned.   Furthermore if we use the Linux C client we never 
observe a client socket timeout from my associates node.

The server code is listed in the link above, and uses a traditional accept 
connection -> fork child handler approach.   The child process immediately 
closes the duplicated parent listener socket.   The parent process 
immediately closes the duplicated accepted socket file descriptor.

From my travels in Google land it appears that there is a 3 way hand shake 
involving SYN and ACK TCP/IP packets which are exchanged to consumate a 
socket connection.    I'm guessing these are the messages that the Arduino 
Wiznet w5100 chip is missing.   I certainly don't know how to control this 
level from my high level C library.

Interestingly if the Arduino is instructed to connect to the port 80 on my 
Linode it succeeds in that connect almost 100% of the time whereas the 
connections to my custom server fails more than 90% of the time. 

I'd love to hear some thoughts on how we might go about debugging this 
problem.    If you know of any Arduino developers out there,  we'd love to 
have more eyeballs on this problem.

Thanks in advance for your help.

bob
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list