This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: Re: Networking in a ROM build
- To: <Fano dot Ramparany at rd dot francetelecom dot fr>
- Subject: RE: [ECOS] Re: Networking in a ROM build
- From: "Trenton D. Adams" <tadams at theone dot dnsalias dot com>
- Date: Thu, 23 Aug 2001 11:26:01 -0600
- Cc: "'eCos Disuss'" <ecos-discuss at sourceware dot cygnus dot com>
I noticed you are talking about receive timeout. My problem is a
connect timeout from the windows machine to the embedded system. Is
there something I'm missing that would tell me that the two are related?
-----Original Message-----
From: ecos-discuss-owner@sources.redhat.com
[mailto:ecos-discuss-owner@sources.redhat.com] On Behalf Of Fano
Ramparany
Sent: Thursday, August 23, 2001 10:01 AM
To: Trenton D. Adams
Cc: eCos Disuss
Subject: [ECOS] Re: Networking in a ROM build
Trenton,
This is exactly the problem we are currently facing and trying to solve
(see some recent threads). A socket configuration that might
solve your problem is to increase the socket timeout value:
#include <timer.h>
#define SOCK_TIMEOUT 50
...
int sd,len,rc;
sd = socket(AF_INET, SOCK_STREAM, 0);
struct timeval tv;
...
tv.tv_sec = SOCK_TIMEOUT;
tv.tv_usec = 0;
setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
This partially solved our problem, however, by sniffing the network
traffic (using tcpdump)
We have observed some strange behaviour on the ROM version of our
application, which seems to buffer the first packets and at some stage
sends them alltogether over the network.
I've also added some delay between the ethernet driver initialization
and the ip stack initialization, but this didn't solve the problem.
I'll now try to add some tracing (CYGDBG_USE_ASSERT) to go further.
Fano
> When using a ROM version, the following thing happens:
> The transmit and status signal threads connect to my windows machine
> just fine. After they are connected, my windows machine attempts to
> connect back to the embedded system's CommandThread socket. The
> connection attempt times out.