help with Arduino TCP/IP connect problem

Shinoj VG shinoj-PkbjNfxxIARBDgjK7y7TUQ at public.gmane.org
Mon Jun 25 09:49:58 UTC 2012




Try doing a packet capture using tcpdump on linode and see if you notice any difference between the handshake happening for port80 and custom server when you try to connect from arduino.

Regards,
Shinoj.


> From: icanprogram-sKcZck+fQKg at public.gmane.org
> To: tlug-lxSQFCZeNF4 at public.gmane.org
> Subject: [TLUG]: help with Arduino TCP/IP connect problem
> Date: Thu, 21 Jun 2012 13:04:57 -0400
> 
> 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
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/legacy/attachments/20120625/0cf4b310/attachment.html>


More information about the Legacy mailing list