help with Arduino TCP/IP connect problem

bob 295 icanprogram-sKcZck+fQKg at public.gmane.org
Wed Jun 27 18:42:31 UTC 2012


Great suggestion.    I've managed to get this done now.   The results are 
posted at:

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

We ran 3 tests all from same network node:

i) Arduino -> Linode:8000
ii) Arduino -> Linode:80 (exactly same code as i) with only port number 
switched)
iii) Linux stub -> Linode:8000

In all cases the packet sequence and timing seems to be virtually identical.

The Linux stub test always succeeds.   The Arduino -> Linode:80 always 
succeeds.    The Arduino->Linode:8000 almost never succeeds and appears to 
timeout in two distinct ways:

a) no TCP/IP packets make their way to the Linode at all
b) correct sequence of TCP/IP packets appears to be exchanged but Arduino 
times out anyway

Any suggestions?

Thanks in advance.

bob



On Monday 25 June 2012 05:49 am, Shinoj VG wrote:
> 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
--
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