|
From: David K. <da...@em...> - 2012-06-22 17:37:00
|
That’s the one
/* Allocate remaining RAM as desired */
/* 30 bytes per TCP connection */
/* 6LoWPAN does not do well with concurrent TCP streams, as new browser GETs
collide with packets coming */
/* from previous GETs, causing decreased throughput, retransmissions, and
timeouts. Increase to study this. */
/* ACKs to other ports become interleaved with computation-intensive GETs,
so ACKs are particularly missed. */
/* Increasing the number of packet receive buffers in RAM helps to keep ACKs
from being lost */
#define UIP_CONF_MAX_CONNECTIONS 4
/* 2 bytes per TCP listening port */
#define UIP_CONF_MAX_LISTENPORTS 4
/core/net/uipopt.h for the other
/**
* How long a connection should stay in the TIME_WAIT state.
*
* This can be reduced for faster entry into power saving modes.
*/
#ifndef UIP_CONF_WAIT_TIMEOUT
#define UIP_TIME_WAIT_TIMEOUT 120
#else
#define UIP_TIME_WAIT_TIMEOUT UIP_CONF_WAIT_TIMEOUT
#endif
There are web pages showing tcpip connections and their status, you can
just dump that out the serial port e.g when you get a SYN.
E.g. /apps/webserver/httpd-cgi.c
static unsigned short
make_tcp_stats(void *arg)
{
struct uip_conn *conn;
struct httpd_state *s = (struct httpd_state *)arg;
conn = &uip_conns[s->u.count];
#if UIP_CONF_IPV6
char buf[48];
httpd_sprint_ip6(conn->ripaddr, buf);
return snprintf((char *)uip_appdata, uip_mss(),
"<tr
align=\"center\"><td>%d</td><td>%s:%u</td><td>%s</td><td>%u</td><td>%u</td><td>%c
%c</td></tr>\r\n",
uip_htons(conn->lport),
buf,
uip_htons(conn->rport),
states[conn->tcpstateflags & UIP_TS_MASK],
conn->nrtx,
conn->timer,
(uip_outstanding(conn))? '*':' ',
(uip_stopped(conn))? '!':' ');
#else
return snprintf((char *)uip_appdata, uip_mss(),
"<tr
align=\"center\"><td>%d</td><td>%u.%u.%u.%u:%u</td><td>%s</td><td>%u</td><td>%u</td><td>%c
%c</td></tr>\r\n",
uip_htons(conn->lport),
conn->ripaddr.u8[0],
conn->ripaddr.u8[1],
conn->ripaddr.u8[2],
conn->ripaddr.u8[3],
uip_htons(conn->rport),
states[conn->tcpstateflags & UIP_TS_MASK],
conn->nrtx,
conn->timer,
(uip_outstanding(conn))? '*':' ',
(uip_stopped(conn))? '!':' ');
#endif /* UIP_CONF_IPV6 */
}
-----Original Message-----
From: Ivo Leitao
Sent: Friday, June 22, 2012 1:13 PM
To: Contiki developer mailing list
Subject: Re: [Contiki-developers] "HTTP request sent, awaiting response...
Read error (Connection reset by peer) in headers" error using wget
Thank you for your reply.
Which parameter are you referring to? This one? #define
UIP_CONF_MAX_CONNECTIONS 4
Where do I change the timeout value? Is it this one defined in
httpd-simple.c in rpl-border router?
timer_set(&s->timer, CLOCK_SECOND * 10);
I think I'm using standard CSMA: #define NETSTACK_CONF_MAC csma_driver
Thank you for the help,
Ivo Leitão
On 22 June 2012 17:30, David Kopf <da...@em...> wrote:
How many active tcpip connections are allowed? Once full the webserver will
send RST to incoming SYNs until one of the connections
times out.
A shorter timeout might help; I think it is 20 seconds by default.
Are you using CSMA burst mode that sets the pending bit on fragmented
packets?
-----Original Message-----
From: Ivo Leitao
Sent: Friday, June 22, 2012 12:09 PM
To: Contiki developer mailing list
Subject: [Contiki-developers] "HTTP request sent, awaiting response... Read
error (Connection reset by peer) in headers" error using
wget
Hello all,
I've been using small modified versions of the RPL-Border Router and
Sky-Websense examples to simulate in Cooja a multi-hop network with
two opposite rows of 3 sky-websense nodes each with a Border router in
the center.
The idea is to evaluate the performance of http requests to get the
sensing data stored in each sky-websense webpage. In order to automate
the simulations I wrote a small bash script which used wget a given
number of times to fetch the pages. One thing I noticed is, when using
wget all the errors I've got were "HTTP request sent, awaiting
response... Read error (Connection reset by peer) in headers", which
were followed by a RST,ACK tcp message that can be seen in wireshark.
What is causing this errors? I noticed that I never had more than 4
tries to fetch a page (3 errors followed by a successful data
transfer).
The parameters changed in both contiki-conf for the sky platform and
project-conf are:
#define QUEUEBUF_CONF_NUM 15
#define UIP_CONF_BUFFER_SIZE 300
#define UIP_CONF_RECEIVE_WINDOW 60
#define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_IPV6
#define UIP_CONF_DS6_NBR_NBU 2 (to force multihop)
#define UIP_CONF_DS6_ROUTE_NBU 10 (enough route entries for this network)
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Contiki-developers mailing list
Con...@li...
https://lists.sourceforge.net/lists/listinfo/contiki-developers
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Contiki-developers mailing list
Con...@li...
https://lists.sourceforge.net/lists/listinfo/contiki-developers
|