dak664
580efaa412
Fix compiler warning for unused variable
2011-05-18 11:22:25 -04:00
Salvatore Pitrulli
4fb433ac1f
'if' statement replaced by a preprocessor directive.
2011-05-12 21:50:47 +02:00
Adam Dunkels
74f1754d88
Bugfix: energy consumption for retransmissions was miscounted
2011-04-13 14:10:39 +02:00
Adam Dunkels
af4ce9ba9e
Bugfix: idle power consumption was sometimes misestimated for transmissions, when a duty cycle rtimer fired in the middle of a transmission
2011-04-13 14:10:02 +02:00
Mariano Alvira
e826ccd3b9
add NULLRDC_CONF_802154_AUTOACK_HW for radios that only pass-up NOACK
...
status but not the actual ack packet.
2011-02-23 15:19:44 -08:00
Mariano Alvira
a8f9119ace
pass up a RADIO_NOACK to the MAC layer.
2011-02-23 15:19:43 -08:00
Adam Dunkels
733aaa546f
Made the number of MAC sequence numbers to remember configurable; fixed bug with power attribution to the idle state.
2011-02-21 14:11:32 +01:00
Adam Dunkels
24af4888bc
Made the number of MAC sequence numbers to remember configurable
2011-02-21 14:11:17 +01: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
Adam Dunkels
46348d9013
Added the low-power streaming mode where frequent channel checks are performed when streaming is on. Enabling this will (by setting WITH_STREAMING to 1), however, significantly slow down Cooja/MSPsim simulations.
2011-02-08 21:57:46 +01:00
adamdunkels
09c223f549
Updated Contiki X-MAC to use hardware acks, which allows for tighter timing and results in a lower duty cycle. Hardware acks also make X-MAC more robust against packet losses, as there is a direct way for the CSMA layer to detect loss of data packets. Before, Contiki X-MAC only detected loss of strobes.
2011-01-25 14:31:09 +00:00
adamdunkels
d51e99a3dd
Updated streaming mode to use only about 20% radio. Made guard time more conservative due to problem report by Ricklef Wohlers.
2011-01-25 14:29:46 +00:00
adamdunkels
fa524fabd7
Bugfix: q->buf was not tested for NULL, as it should be. Fix by Simon Duquennoy.
2011-01-25 14:24:38 +00:00
adamdunkels
808c21fbfa
Bugfix: default should be 3 MAC-level retransmissions if collissions or loss occurs
2011-01-18 16:03:57 +00:00
adamdunkels
affba785b5
Enabled phase-lock only for channel check rates of 32 Hz or lower
2011-01-18 16:03:19 +00:00
adamdunkels
26e3b6fdc0
Bugfix by Simon Duquennoy: don't transmit packet until previous packet has been sent by the RDC layer.
2011-01-13 19:06:22 +00:00
adamdunkels
a0960154ba
Cleaned up parts of the code; added comments
2011-01-09 21:07:01 +00:00
dak664
322d835fee
Fix avr-gcc compiler warnings
2010-12-18 22:12:53 +00:00
adamdunkels
4a89cc9db3
Rework of the new CSMA in-order code that fixes a number of smalllish bugs in the in-order code.
2010-12-16 22:44:02 +00:00
adamdunkels
79f2c25dae
Rework of the phase-lock optimization mechanism. There were several bugs in the existing code, such as the phase-lock would lose synchronization when a packet was lost.
2010-12-16 22:43:07 +00:00
adamdunkels
952dfc9384
Rework of the CSMA layer: instead of using one timer per packet, the module now uses one central timer and a queue of outgoing packets. This helps to keep packets in order, which is extremely useful for TCP transfers, and reduces the amount of congestion since consecutive packets now are spaced in time if there is a collision. Based on the observations and ideas of Simon Duquennoy.
2010-12-14 07:57:14 +00:00
adamdunkels
af21afa750
Make sure that the cycle timing is exact
2010-12-10 13:36:06 +00:00
adamdunkels
c19a967973
Bugfix: with the recent bugfixes, it was no longer possible to turn duty cycling back on after it had been turned off
2010-12-07 23:12:54 +00:00
adamdunkels
4c9793f428
Let ContikiMAC remember the state that the radio should have when duty cycling is turned off. This fixes a bug in which the radio was turned on after sending, even when NETSTACK_RDC.off(0) was enabled.
2010-12-06 09:08:22 +00:00
dak664
e54d7d6f9c
Fix compiler warnings
2010-12-02 15:55:17 +00:00
adamdunkels
6d556d5c13
Fixed bug with link-layer ACKs. Refactored the ACK reception code.
2010-11-25 08:44:34 +00:00
nifi
3bd78893e5
Renamed nullrdc to nullrdc-noframer and nullrdc-framer to nullrdc.
...
nullrdc (previously nullrdc-framer) is now a RDC implementation that
does not do any radio duty cycling but supports link layer addresses
and frame format via framer (for example 802.15.4). nullrdc can now be
used in the same way as contikimac, xmac, etc.
nullrdc-noframer (previously nullrdc) is a null RDC implementation
that does not do any radio duty cycling, does not add any header of its
own to the packets, and does not support link layer addresses.
2010-11-23 18:11:00 +00:00
nifi
05d78522d3
Added MAC-layer duplicate message suppression when using 802.15.4 auto ack
2010-11-12 12:53:16 +00:00
adamdunkels
b7df18a96a
Turned off streaming by default to save code space; made guard time a little more conservative
2010-11-02 11:00:08 +00:00
adamdunkels
8fa7bf6c31
Always restore the queuebuf to the packetbuf before calling the upper layers. Reduce the waiting time between successive MAC layer retransmissions.
2010-10-24 21:07:00 +00:00
adamdunkels
73f5535754
Made the guard time slightly more conservative - found an occasion where this was needed
2010-10-24 21:06:17 +00:00
adamdunkels
9cb830ed37
Timing bugfix in the waiting period between channel samples to check if the coast is clear before sending a packet.
2010-10-20 22:25:24 +00:00
adamdunkels
3ffcff0656
Added mechanisms for explicit de-synchronization of synchronized neighbors. Added link-layer ACKs. Fixed bugs with MAC-layer interaction. Now seems to work somewhat (didn't work at all before, in some cases), but there are still problems with packet loss.
2010-10-20 15:23:43 +00:00
nifi
e2b4956a7f
Bug fix: release the packet and notify the sender if RDC returned an error
2010-10-14 19:08:39 +00:00
joxe
4f3fc1c404
fixed xmac to use new channel check define name
2010-10-03 22:46:53 +00:00
adamdunkels
ceebd7020a
Bugfix: the return value sometimes was wrong when a collision was detected.
2010-10-03 20:39:24 +00:00
adamdunkels
ae88ed04f1
Moved the definition of the channel check rate used by the radio duty
...
cycling layer. This definition was previously held in net/mac/mac.h,
with the name MAC_CONF_CHANNEL_CHECK_RATE. But since the rate is used
by the radio duty cycling layer, it makes more sense to change its
name to reflect this. Also, the configuration option should be tied to
the netstack configuration instead.
So the new configuration option is called
NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE.
2010-10-03 20:37:32 +00:00
adamdunkels
eb58968459
Added a timer to each phase structure that keeps track of for how long
...
a particular receiver has not ACKed packets. After some time
(currently 16 seconds), the sender will begin sending full strobe
periods again.
2010-09-13 13:39:05 +00:00
dak664
12479c32bc
Fix compiler warnings
2010-08-01 21:18:07 +00:00
nifi
21828ad782
Changed the retransmission time to be based on the configured MAC channel check rate when the RDC has no channel check interval.
2010-06-16 10:08:30 +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
adamdunkels
951fd78f6c
ctimer moved from net/rime to sys/
2010-06-14 18:58:45 +00:00
adamdunkels
8f8393aadc
Moved ctimer.[ch] from their old and illogical location in core/net/rime to a more appropriate place in core/sys
2010-06-14 07:34:36 +00:00
adamdunkels
8d1680fed5
Filter duplicate packets
2010-06-14 06:52:41 +00:00
nifi
ac9b862cd0
Added configurable support for 802.15.4 autoack
2010-05-26 14:12:33 +00:00
nvt-se
b8a3a4109e
Adjusted the code so as to remove compilation warnings.
2010-04-30 22:18:12 +00:00
adamdunkels
0859d4b95f
Avoid turning off the radio in the middle of a packet reception
2010-04-30 07:32:39 +00:00
adamdunkels
e606c674c2
Rewrote LPP so that it uses 802.15.4 headers. A number of bugfixes with respect to alignment. Avoid turning off the radio in the middle of packet reception.
2010-04-30 07:31:44 +00:00
adamdunkels
3c735fcea4
Added a packetbuf flag that indicates if the link layer acks should be used or not
2010-04-30 07:25:51 +00:00
fros4943
12b6f35ce7
PRINTF()ed debugging output
2010-04-27 12:56:35 +00:00
nifi
85d6f6c514
removed unused variable
2010-04-26 22:41:50 +00:00
nifi
b26f45a35b
code cleanup
2010-04-26 17:55:11 +00:00
nifi
d761b6e89a
Added MAC header to handle padding
2010-04-26 17:46:21 +00:00
nifi
14b1bb9f57
Fixed to only use leds when DEBUG is set
2010-04-20 11:41:16 +00:00
adamdunkels
3670fac618
Bugfix: timing fixed
2010-04-08 18:23:24 +00:00
adamdunkels
91ff8574ad
Improved handling of duplicate packets
2010-04-08 09:32:56 +00:00
nvt-se
ac4ba199bc
Turn off DEBUG mode by default.
2010-04-06 21:37:54 +00:00
adamdunkels
497111bcc9
Added an optional rate limit for broadcast transmissions
2010-04-06 11:57:43 +00:00
adamdunkels
e06a30fdb0
Added MAC-layer duplicate message suppression, which is very helpful when running with duty cycling turned off
2010-04-05 19:28:07 +00:00
adamdunkels
c68ee6e577
Bugfix: memory from the wrong memb was freed.
2010-04-04 21:02:09 +00:00
adamdunkels
a4c328785a
Small timing tweaks
2010-04-04 21:01:24 +00:00
adamdunkels
62039a530d
Removed non-existant cooja-debug.h include
2010-04-04 12:31:47 +00:00
adamdunkels
7d6ff0289e
Fiddled more with the timing: the phase seems stable now at least. Still bugs left though...
2010-04-04 12:28:29 +00:00
adamdunkels
be117afe04
After a lot of tweaking and twiddling with the timing of the ContikiMAC code and the mechanisms in the CC2420 driver, things seem to work somewhat stable now - knock on wood!
2010-04-04 07:49:30 +00:00
adamdunkels
121ca946e1
Improved phase lock behaviour when neighbor is not duty cycling: senders notify receivers via the 802.15.4 pending bit that they are not duty cycling. Neighbors then will start sending packets immediately and not wait for neighbors' phase. Tweaking of ContikiMAC timers to make it more reliable.
2010-04-03 13:28:30 +00:00
joxe
6ae86d001d
made number of phase neighbors configurable
2010-04-01 17:17:36 +00:00
adamdunkels
add426de4b
Bugfixed stream mode: node listens 100% for 0.5 seconds in stream mode. Naming change: is_listening changed is_snooping.
2010-04-01 10:02:04 +00:00
adamdunkels
b43f7830b3
Fine-tuned the timing and phase lock optimization
2010-03-31 20:27:15 +00:00
adamdunkels
877eb2fbe9
Fiddled with the timing
2010-03-31 11:54:38 +00:00
adamdunkels
bcfa80102d
Had previously not included the waiting time that the CC2420 introduces when sending a packet. Also increased the smallest packet size, just to be on the safe side.
2010-03-30 23:01:32 +00:00
adamdunkels
226abb8ec3
Removed non-existant include file
2010-03-29 22:10:03 +00:00
adamdunkels
9c58768b59
Extend packet size after creating 802.15.4 header; prepare radio chip with packet before waiting for neighbor phase to make phase wait time deterministic
2010-03-29 21:51:36 +00:00
adamdunkels
b4b7e942b6
Back off a guard time for every non-ack packet
2010-03-29 21:50:01 +00:00
nifi
9508d2c4d7
* Added configurable default number of transmissions for CSMA to use when not specified using packetbuf attributes (CSMA_CONF_MAX_MAC_TRANSMISSIONS).
...
* Renamed packetbuf attribute PACKETBUF_ATTR_MAX_MAC_REXMIT to PACKETBUF_ATTR_MAX_MAC_TRANSMISSIONS where value 0 (attribute not set) means that default number of transmissions should be used.
2010-03-26 12:29:29 +00:00
adamdunkels
49009e9cbd
Extend the length of announcement packets if they are too short
2010-03-19 13:24:58 +00:00
adamdunkels
115b3a7c5c
Minor timing bugfix: the time between channel checks should not include the time required for the channel check itself
2010-03-17 18:24:06 +00:00
adamdunkels
efeb9944fa
Increase the required non-activity periods before turning off the radio; remove the strict phase requirement (which messes up things with low-power streaming)
2010-03-17 16:35:52 +00:00
adamdunkels
9be1a65211
Don't set the RELIABLE flag on incoming packets with the ack requested flag set, since it is set on most packets even if they aren't reliable
2010-03-16 18:11:58 +00:00
adamdunkels
b1feac5a00
Bugfixes in low-power streaming mode, and re-added support for announcements. These now use the low-power streaming mode so that active listening for announcments have a radio duty cycle of 16% rather than 100%
2010-03-16 18:11:13 +00:00
adamdunkels
7bab9316da
Two major changes:
...
* Low-power streaming. Experimental support for a low-power mode which
allows rapid exchange of packets with a 16% duty cycle. Does not
seem to function correctly yet though.
* Phase locking. When the phase of a neighbor has been detected, the
sender assumes that the neighbor will keeps it phase and does not
send more strobes than necessary to hit the receiver's channel
check - even if the receiver does not acknowledge the reception of
the strobes when it should have been awake. Instead, the sender
stops strobing and tries again at a later time.
2010-03-14 22:59:23 +00:00
oliverschmidt
def540e6c0
Avoid newlines in macro expansions as cc65 doesn't support them between the macro name and the open parenthesis of the arguments.
...
There were btw other even longer lines with expansions of the same macro already present.
2010-03-14 12:13:54 +00:00
nifi
2cf0fb9cce
Changed to use short address mode with short rime addresses
2010-03-12 14:49:21 +00:00
adamdunkels
4b60301727
Don't set the ack flag for broadcast packets
2010-03-09 20:40:11 +00:00
adamdunkels
17f6b3a324
Simplified the structure of the code
2010-03-09 20:38:55 +00:00
adamdunkels
d0e6436a20
Don't call up the netstack if the transmission was deferred
2010-03-09 20:37:02 +00:00
adamdunkels
edda6dd86c
Minor bugfix: don't subtract collisions and deferrals from the number of transmissions
2010-03-09 13:23:58 +00:00
adamdunkels
2c3d3e3d73
Bugfix: handle deferred transmissions correctly (don't count them)
2010-03-09 13:20:08 +00:00
adamdunkels
79722b4247
Rework of the timing conditions of ContikiMAC: the old timing did not work well on real hardware, the new one seems to work better
2010-03-09 13:19:05 +00:00
nvt-se
96eb20d235
forward arguments even if REXMIT is not set
2010-03-04 14:17:43 +00:00
nifi
5e43a6998b
Replaced old framer (framer_get/framer_set) with new NETSTACK style configuration. Added nullrdc-framer that is a nullrdc with framer support.
2010-03-01 13:30:21 +00:00
nifi
0c084b8c68
added random init of sequence number
2010-03-01 13:17:01 +00:00
adamdunkels
410d860a93
Improved handling of neighbor phase estimation: instead of busy-waiting while waiting for neighbor's phase, the new code schedules a timer just before neighbor wakes up
2010-02-28 20:19:47 +00:00
adamdunkels
e6fceb7200
Added MAC-layer return value to indicate that a packet transmission was deferred
2010-02-28 20:18:30 +00:00
adamdunkels
e06acc4525
Prod the watchdog if waiting for along time
2010-02-28 14:15:16 +00:00
adamdunkels
74da90a06b
Don't count collisions as transmissions
2010-02-28 10:07:17 +00:00
adamdunkels
b6b4941871
Made the number of MAC-layer retransmissions configurable on a per-packet basis, via a packet attribute
2010-02-28 08:35:16 +00:00
adamdunkels
ed88f487c8
Improved detection of link-layer ACKs; increased the time ContikiMAC waits when it has detected a link-layer ACK; increased the number of silence periods required to detect a CCA false positive
2010-02-28 08:33:21 +00:00
nifi
b50d47fb80
added missing function in sicslowmac_driver
2010-02-23 22:45:11 +00:00
nifi
1cfcc8a73a
Removed the combined name of CSMA and NETSTACK_RDC. The name of NETSTACK_RDC can be accessed separately if needed.
2010-02-23 20:42:45 +00:00