Commit graph

450 commits

Author SHA1 Message Date
Fredrik Osterlind f8e0da428a bugfix: transfer did not terminate correctly when last packet was full 2012-05-29 13:46:22 +02:00
Niclas Finne 2507ba4e8d Avoid using memcpy on unaligned uint16_t variables, because certain compilers will optimize this code to a direct copy instruction that will result in unaligned memory access. Thanks to Angelo Compagnucci for reporting this problem. 2012-03-31 01:25:27 +02:00
Niclas Finne 7bf4fa4bff Removed obsolete mac pointer 2012-03-28 21:51:19 +02:00
Niclas Finne 99f3d5ada2 Added missing include 2012-03-06 12:33:47 +01:00
David Kopf 745f071c98 Eliminate unused variable warnings. Dummy test of PT_YIELD_FLAG does not change program size. 2012-02-21 11:23:54 -05:00
Nicholas J Humfrey 3fe55673d3 Converted deprecated uIP types in the network stack to standard C99 names (in stdint.h) 2012-02-17 22:45:13 +00:00
Niclas Finne b65972d32d Corrected debug output 2012-01-22 22:27:20 +01:00
Niclas Finne 9d261eec56 Use NETSTACK_RDC_* instead of NETSTACK_CONF_RDC_* 2012-01-09 18:06:30 +01:00
Adam Dunkels f88a1e394b Made collect retransmissions and broadcast announcements timers depend on the rdc wakeup rate 2011-12-09 08:18:22 +01:00
Joakim Eriksson 5281e7c59c made linkable with IAR linker - avoiding multiple defs of rime_sniffer, etc 2011-11-08 11:57:17 +01:00
nvt 942ba1f7bd Removed const qualifier to conform with the rest of the Rime interface. 2011-09-05 22:05:41 +02:00
Niko Pollner 84105f4e47 Improved multihop/mesh route discovery.
Packetbuffer is now saved before route discovery and resent when a
route is found.

This solves the following problems:
- First packet sent to a certain node is corrupted.
- Packet to be forwarded that triggers route discovery is lost.
2011-09-05 21:27:38 +02:00
Nicolas Tsiftes 6749281a87 Rediscover lost routes when forwarding packets. Also refresh route entries when sending packets through them. Patch from Jaroslav Meduna. 2011-06-23 14:45:11 +02:00
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