Commit graph

437 commits

Author SHA1 Message Date
Niclas Finne 154f971b2b collect_send() should return 0 if the packet could not be enqueued to be sent 2011-06-07 19:45:41 +02:00
Adam Dunkels dfaf4afc8e Rime sniffers must be called for all transmissions, even if they failed, to get energy attribution right. This means that rime output sniffers now also must take the MAC transmission status as an argument. 2011-05-02 15:06:34 +02:00
Zhitao He cae8ef206a fixed excessive retransmissions of junk packets after runicast timeout
fixed stuck packet ID for next packet after runicast timeout
2011-04-27 19:12:46 +02:00
Lionel Debroux 5cb49e8b07 Several compiler warning fixes:
* msp430: fix "implicit declaration of function" warnings in clock.c, by including watchdog.h;
     * sky: fix a couple pointer target signedness warnings;
     * core: fix several signed/unsigned comparison warnings;
     * framer-802154: "const static" -> "static const" to fix compiler warnings;
     * core: comment or remove unused variables and function definitions.

Signed-off-by: Lionel Debroux <lionel_debroux@yahoo.fr>
Signed-off-by: Mariano Alvira <mar@devl.org>
2011-02-20 19:28:14 -05:00
adamdunkels 4b4b8fad56 More recent packet entries. Allow 4 queue entries to be dedicated to generated packets. 2011-01-18 16:05:53 +00:00
adamdunkels 81d23a3a36 Minor bugfixes pertaining to queue handling: if a packet was explicitly dropped, the packet would later be acknowledged despite it never being received; added a limit on how many queue entries that can be used for packets that are being forwarded, to allow for originated packets even if the forwarding queue is filled. 2011-01-10 15:10:43 +00:00
adamdunkels 70f9f075a0 Safeguard against NULL arguments 2011-01-10 15:08:52 +00:00
adamdunkels 148bd60fe1 Bugfix: the defensive retransmission timer setting must be made before the packet is transmitted, otherwise the retransmission timer will always be for the defensive retransmit 2011-01-09 23:49:27 +00:00
adamdunkels 50a3e6ea23 Increased the max ETX to allow for longer paths even with the initial conservative ETX estimate; made collect use announcements by default 2011-01-09 23:48:33 +00:00
adamdunkels acf45ec648 Bugfix: memory wasn't freed when a neighbor was dropped from the list. Also increase the max age to 180 minutes to allow for regular beacons to refresh the neighbor before it is dropped. 2011-01-09 21:20:05 +00:00
adamdunkels 90dc0ceebf Replaced default link estimator with an exponential weighted moving average, which reduces memory consumption per neighbor. 2011-01-09 21:14:22 +00:00
adamdunkels 4e91d9303e Added safeguard timer if the MAC layer would fail to call back after transmission. 2011-01-09 21:13:20 +00:00
dak664 322d835fee Fix avr-gcc compiler warnings 2010-12-18 22:12:53 +00:00
adamdunkels 4914739e5d Revived the timesynch module, which has been switched off since the introduction of the new radio API after Contiki 2.4. The new code uses explicit timestamp messages instead of piggybacking timestamps on every transmission. It is also significantly better in terms of exactness. 2010-12-16 22:47:38 +00:00
adamdunkels 10fb99a89d Reduced the value of the max depth, so that a count-to-infinity loop will not count too long before hitting the maximum value. This is important when a network loses its sink, so that packets are not forwarded around the network for ever. 2010-12-16 22:46:34 +00:00
adamdunkels 19e930e6f2 Changed the behaviour of retransmissions to work better with the in-order CSMA code. The retransmission timer is now set when the packet is known to be sent by the MAC layer. 2010-12-16 22:45:15 +00:00
dak664 240d478c1f Allow platform to specify COLLECT_CONF_BROADCAST_ANNOUNCEMENT_MAX_TIME 2010-12-14 22:14:33 +00:00
adamdunkels 8f745a6ea6 Added a function for obtaining the current parent 2010-11-06 14:32:10 +00:00
adamdunkels 677575fc8c Rewrote proactive link estimator to be invoked randomly instead of triggered by an empty queue; this makes network bootups because nodes are not synchronized 2010-10-28 15:36:02 +00:00
adamdunkels 9ecc0437f4 Left-over debug printf removed 2010-10-25 12:25:39 +00:00
adamdunkels 77ecfb0366 Rewrote parts of the retransmission logic so that collect is robust against the situation where the MAC layer will fail to callback after a packet has been transmitted. 2010-10-24 21:08:19 +00:00
adamdunkels 5585d72c86 A simple but substantial change: uIP used the htons()/HTONS() macro
functions for converting between host and network byte order. These
names are the de facto standard names for this functionality because
of the original BSD TCP/IP implementation. But they cause problems for
uIP/Contiki: some platforms define these names themselves (Mac OS,
most notably), causing compilation problems for Contiki on those
platforms.

This commit changes all htons to uip_htons instead. Same goes for
htonl, ntohs, and ntohl. All-caps versions as well.
2010-10-19 18:29:03 +00:00
adamdunkels 34cba78ca8 Bugfix: bump advertisements only when a parent changes, not because of an upstream parent change 2010-10-19 07:34:29 +00:00
oliverschmidt 2f89e69ff7 Fixed build for platforms which use the default value for QUEUEBUF_NUM. 2010-10-12 19:51:28 +00:00
adamdunkels 020da4e8ba Added a function for obtaining beacon intervals 2010-10-11 23:44:24 +00:00
adamdunkels ec716ea62d Do not reduce transmission interval, unless explicitly told so with the bump flag 2010-10-11 23:43:01 +00:00
adamdunkels 37adf130b4 Rewrite of the congestion logic. A node now report it being congested
when half the transmission queue is full. When a neighbor is heard to
be congested, the rtmetric of that node is inflated to avoid sending
more traffic in its direction.

Fixed problems with beacon intervals: intervals are now not reduced
when a path gets significantly worse, only when they get better.
2010-10-11 23:42:01 +00:00
adamdunkels d821ba5e22 Added a lifetime for link estimates: if they are too old, they are
reset so that a new probing period can produce more up-to-date
estimates. Added a congestion mechanism whereby a neighbor can be
marked as being congested for a period of time, during which the ETX
for the neighbor will be artificially inflated.
2010-10-11 23:38:46 +00:00
adamdunkels 5eb4a0fe8d Rewrote the initial link estimate logic: link estimates are now
computed only over the actual samples, not over the entire
buffer. Also, the initial link estimate is much more conservative now
(16 transmissions) to favor links that have been probed, and which
therefore are likely to have better ETXs.
2010-10-11 23:34:02 +00:00
adamdunkels 0cabe483c3 Don't call sink recv function for zero-size packets, since these most likely are link estimate probes or keepalive packets. Explicitly set eseqno to zero when opening a new connection. 2010-10-07 15:52:28 +00:00
adamdunkels ad35c54473 Bugfix: when a node's rtmetric was lower than SIGNIFICANT_RTMETRIC_PARENT_CHANGE, its beacon timers would always be bumped to its lowest value 2010-10-05 20:06:47 +00:00
adamdunkels 52e9a6f1fb Turned the DRAW_TREE debug flag off by default 2010-10-04 22:36:47 +00:00
adamdunkels 65d640ac53 Several bugfixes to the proactive link estimate maintenance code, which is now enabled by default. Simplified DRAW_TREE code for drawing routing graph in Cooja. Added routing metric penalty to parents that are congested or that drop packets. 2010-10-04 20:27:50 +00:00
adamdunkels 40583fe112 Removed the polite announcement code, since it was not used, and enabled the broadcast announcement code by default. Increased the default intervals for broadcast announcements. 2010-10-03 20:10:22 +00:00
adamdunkels 605392522f Bugfixes and improvements: rtmetrics are now 16-bit clean. Added experimental feature that proactively probes neighbors that have not yet been tried out, in order to get an initial ETX for them. 2010-10-03 20:08:44 +00:00
adamdunkels d0579c8a81 Cleaned up the collect neighbor management code 2010-10-03 20:07:10 +00:00
adamdunkels b23a364397 rtmetric values should always be computed as 16-bit values 2010-10-03 20:06:25 +00:00
adamdunkels 32ba90ea4c Bugfix: make sure that neighbor exists before attempting to update tx
count.
2010-09-28 06:53:02 +00:00
adamdunkels eed22a6f3c A number of changes to the collect code:
* Added an optional "keep alive" mechanism whereby an idle network is
periodically probed by dummy packets to maintain a recent quality
metric when there is no traffic.
* Bugfix in when new routing metrics should be advertised
* Rewrote the ACK logic so that a queuebuf is not allocated for each
ack, only for those acks generated by the sink node.
* Updated the wrap-around logic for sequence numbers: when a sequence
number wraps, it won't go back to 0. Instead, it wraps to 128. This
allows us to understand when a node has rebooted: when its seqno is <
128, it has recently rebooted.
2010-09-22 22:08:08 +00:00
adamdunkels 2cae71e89b Added a function for obtaining the link estimate and rtmetric for a neighbor 2010-09-22 22:04:55 +00:00
adamdunkels 46b2451969 Made the initial link estimate explicit 2010-09-22 22:03:21 +00:00
adamdunkels 18e31f33b9 Minor tweaks. Removed debug output from CVS. 2010-09-14 06:48:36 +00:00
adamdunkels 591766e663 Significant improvements to the Collect protocol:
* Loop detection and untangling. Now uses in-band loop detection that
  works.

* Link quality estimation. Now starts with a conservative /
  pessimistic estimate for new links.

* Retransmissions. MAC layer and network layer retransmissions are now
  decoupled.

* Loss handling. Deals better with losses now.

* Concurrent applications. Each connection now maintains its own
  neighbor table with separated cost to sink estimates for each
  connection.
2010-09-13 13:28:14 +00:00
adamdunkels 4e0744954a Rewrite of important parts of the Collect logic: link estimation
calculation and parent selection.  This fixes a severe bug that caused
loops when packets were erroneously retransmitted due to ACK loss.
2010-09-08 19:21:45 +00:00
nifi f05952c926 Changed packet id to use 8 bit instead of 4 bit 2010-08-31 13:14:49 +00:00
dak664 12479c32bc Fix compiler warnings 2010-08-01 21:18:07 +00:00
nifi e965b74cf5 added missing include 2010-06-18 08:28:56 +00:00
nifi 4741b95858 added missing include 2010-06-16 10:10:10 +00:00
adamdunkels 7647cbd8aa Use the list_item_next() API 2010-06-15 19:22:25 +00:00
adamdunkels 3fa8ffda1a Moved the modules packetbuf, queuebuf, and packetqueue from net/rime to net/, since they are not Rime-specific 2010-06-14 19:19:16 +00:00