Commit Graph

1236 Commits

Author SHA1 Message Date
adamdunkels
f95a6cce85 Added function for obtaining packet queue length 2010-02-28 09:20:32 +00:00
adamdunkels
8fe15f7b45 New packet attribute for specifiying MAC layer retransmissions; reorder and commented packet attributes 2010-02-28 09:19:43 +00:00
adamdunkels
970a9eb9c7 Increased neighbor lifetime to allow for longer neighbor announcement intervals 2010-02-28 09:19:04 +00:00
adamdunkels
7165a3866f Significant rework of the Contiki data collection protocol:
* the new version makes use of MAC-layer feedback so that bad paths
  can be identified quicker and then avoided.

* the new code uses transport layer ACKs that contain feedback from
  the collect protocol: when a packet cannot be forwarded due to lack
  of resources, the ACK contains a flag that indicates that the packet
  could not be forwarded. ACKs also contain the routing metric of the
  sender, which improves agility in face of rapid path changes.

* loop detection and management has been improved: with higher path
  metric agility, the system is more prone to short-lived routing
  loops. Instead of dropping looping packets, the new version adjusts
  the routing metric for the routes that exhibit loops so that the
  risk for future loops is reduced.

* make use of packet attributes to inform the MAC layer of how many
  times packets should be retransmitted.
2010-02-28 09:18:01 +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
adamdunkels
fa1a96636e Bugfix: the compile-time check for UIP_LLADDR_LEN previously generated a run-time error, when it should have generated a compile-time error 2010-02-28 08:30:39 +00:00
adamdunkels
ba0e50a7b7 Set the default number of MAC layer retransmissions for IPv6 packets to 2 2010-02-28 08:29:42 +00:00
adamdunkels
b9827d2b36 Bugfix: didn't correctly reset the pending flag when a packet was read from the radio 2010-02-25 16:06:44 +00:00
joxe
0ab2bc9a31 upgraded sicslowpan to hc-06 - no 48 bit multicast compression support yet 2010-02-25 15:50:58 +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
nifi
c20047f657 Changed the network stack to use different structures for the different layers (network_driver, mac_driver, rdc_driver, radio_driver). This helps to avoid incorrect configuration. 2010-02-23 20:09:11 +00:00
adamdunkels
bb62749de7 Made debug printfs optional 2010-02-23 18:49:58 +00:00
adamdunkels
0ab2ba433f Bugfix: the wrong callback pointer was passed to higher layers. 2010-02-23 18:49:45 +00:00
adamdunkels
ed52586e18 Rework of parts of the ContikiMAC code based on input from experimental results. When channel check is triggered because of a false positive, the new version checks the radio several times to make sure that there really is an incoming packet. Otherwise, the radio is switched off. Cleaned up and removed old unused code. Added a few temporary debugging mechanisms and functions. 2010-02-23 18:49:05 +00:00
adamdunkels
50e1452564 Ugly workaround for internal error in mspgcc when applying the >= operator to two 32-bit values 2010-02-23 18:40:08 +00:00
adamdunkels
0c4c88ae66 Improved per-packet power profiling: if a packet is retransmitted, the new energy is added to the old energy so that it is possible to measure the full energy for all transmissions of the packet 2010-02-23 18:39:00 +00:00
adamdunkels
ca0417a923 Added the MAC layer callback functionality so that the Rime network layer gets information from the MAC about the status of sent packets: were they successfully transmitted, or was there a collisions? How many retries were there? 2010-02-23 18:38:05 +00:00
adamdunkels
f10eedab3e Added debug printout 2010-02-23 18:37:15 +00:00
adamdunkels
2d13fecea7 Improved backoff management: timer is now doubled on every transmission, until the using module calls the neighbor_discovery_start() function again. Don't cancel the transmission even if a lower value arrives (this fixes a problem with multi-hop ETX propagaion). 2010-02-23 18:36:50 +00:00
adamdunkels
0eade2886c Better loop handling: when a loop is detected, the neighbor to which the packet was originally sent gets an inflated ETX; made sure that collect without announcments work; increased timeouts, to work nicer in larger networks 2010-02-23 18:35:23 +00:00
adamdunkels
a4d9d6651b Added the option to specify the old value to observers so that they can determine if the announcement should be sent out quicklier than otherwise 2010-02-23 18:32:44 +00:00
adamdunkels
b746b7fc06 Reworked the Rime/Chameleon interface so that packets now always hit Rime before Chameleon. Chameleon is now only called by Rime. This makes packet sniffing easier, and allows for sniffing packets after their header has been processed by Chameleon, thereby making per-packet power profiling much easier to implement 2010-02-23 18:29:53 +00:00
adamdunkels
d8cce42d28 Set the default radio driver to nullradio 2010-02-23 18:28:04 +00:00
adamdunkels
47578806b5 Removed semicolon from #define to allow the semicolon to be placed naturally after the macro is used 2010-02-23 18:27:04 +00:00
adamdunkels
4b04fdd328 Minor style fix 2010-02-23 18:26:26 +00:00
adamdunkels
1ee32c3074 Removed non-functional time synchronization code; added some experimental code for CCA checks (enabled CCA mode 1, a temporary development function for setting the CCA threshold); enable the possibility to switch off radio even if a packet is currently arriving 2010-02-23 18:24:49 +00:00
adamdunkels
5292005962 A null radio driver that does not do anything - useful in the native port and as a template for new radio drivers 2010-02-23 18:18:53 +00:00
adamdunkels
0b2b7bcdba Removed inadvertedly left-over include file 2010-02-18 23:52:34 +00:00
adamdunkels
5cf3b83733 Common initialization code for the netstack 2010-02-18 23:15:26 +00:00
adamdunkels
a2664054c5 Always include netstack.h 2010-02-18 23:09:30 +00:00
adamdunkels
f49ebfe1c4 Temporarily disabled rime route udp because it breaks with newest MAC interfaces 2010-02-18 21:53:08 +00:00
adamdunkels
e34eb54960 A work-in-progress rework of the Contiki MAC and radio layers. The
main ideas are:

* Separates the Contiki low-layer network stack into four layers:
  network (e.g. sicslowpan / rime), Medium Access Control MAC
  (e.g. CSMA), Radio Duty Cycling RDC (e.g. ContikiMAC, X-MAC), and
  radio (e.g. cc2420).
* Introduces a new way to configure the network stack. Four #defines
  that specify what mechanism/protocol/driver to use at the four
  layers: NETSTACK_CONF_NETWORK, NETSTACK_CONF_MAC, NETSTACK_CONF_RDC,
  NETSTACK_CONF_RADIO.
* Adds a callback mechanism to inform the MAC and network layers about
  the fate of a transmitted packet: if the packet was not possible to
  transmit, the cause of the failure is reported, and if the packets
  was successfully transmitted, the number of tries before it was
  finally transmitted is reported.
* NULL-protocols at both the MAC and RDC layers: nullmac and nullrdc,
  which can be used when MAC and RDC functionality is not needed.
* Extends the radio API with three new functions that enable more
  efficient radio duty cycling protocols: channel check, pending
  packet, and receiving packet.
* New initialization mechanism, which takes advantage of the NETSTACK
  #defines.
2010-02-18 21:48:39 +00:00
adamdunkels
f8c804e28b ntikiMAC: a new radio duty cycling mechanism that uses a combination
of link-layer and MAC-layer mechanisms to achieve a very low power
consumption: during idle listening the radio is switched off between
99.2% and 99.6% of the time. One unicast transmission typically adds
between 0.07% and 1.2% additional radio time, depending on packet
size.

ContikiMAC uses the standard IEEE 802.15.4 message format and adds no
additional headers.

ContikiMAC is simple: it uses periodic two-shot channel sampling
during idle listening to keep the radio on-time down. Transmissions
are done with repeated transmissions until a link-layer ACK is
received.
2010-02-18 21:26:15 +00:00
adamdunkels
f5c48751b5 Reworked 802.15.4 header creation and parsing so that it works regardless of the size of the rimeaddr_t typedef 2010-02-18 21:00:28 +00:00
adamdunkels
2fbf21b2b3 Refactored the phase optimization functionality into a separate module 2010-02-18 20:58:59 +00:00
adamdunkels
515a391ee4 Removed left-over debug printfs 2010-02-15 23:31:05 +00:00
dak664
bb9afb4fb1 Remove compiler warning 2010-02-15 20:49:38 +00:00
adamdunkels
4bb0375251 Buffer name definition bugfix 2010-02-15 19:23:54 +00:00
adamdunkels
9bb149ca13 Bugfix by Raimondas Sasnauskas: TCP SYN duplicate receptions in the SYN_RCVD state was not correctly handled 2010-02-15 18:03:07 +00:00
adamdunkels
d67d1f7340 Major bugfix, found by Raimondas Sasnauskas: the TCP periodic timer was not started when a new connection request arrived. If there were no other active TCP connections, this means that the SYNACK would never be retransmitted, potentially leading to a forever stale TCP connection. 2010-02-09 12:58:53 +00:00
adamdunkels
4a522c96dd Added debugging statements for packet drops 2010-02-08 21:59:49 +00:00
adamdunkels
2b6a651233 Added missing include, made debug statement more explicit 2010-02-08 21:59:21 +00:00
adamdunkels
2eba08e8f6 Made queuebuf statistics configurable, and off by default 2010-02-08 21:10:32 +00:00
nvt-se
f4d19560fc Fixed a performance problem by not allowing GC while doing merges of files and micro logs. 2010-02-08 14:08:14 +00:00
oliverschmidt
c284092a53 - Set cursor in ctk_draw_init() to top left corner as it is called for re-initialization on Contiki exit. 2010-02-07 21:43:03 +00:00
oliverschmidt
1d1f3a23af - No need for textcolor() before cclear().
- Set textcolor() in ctk_draw_init() to some reasonable value as it is called for re-initialization on Contiki exit.
2010-02-07 21:38:01 +00:00
adamdunkels
b98f7d891f Bugfix: added missing queuebuf allocation 2010-02-06 20:50:24 +00:00
adamdunkels
671216c558 No need to clear the headers now that we explicitly save a queuebuf when sending fragments 2010-02-06 17:07:43 +00:00
adamdunkels
b6647b5630 Turns out that with cxmac, clearing the header after sending a packet is not enough to make fragmentation work. Instead, we allocate a queuebuf and restore the packet after from the queuebuf after sending it. 2010-02-06 09:42:49 +00:00
adamdunkels
494e692d0b Bugfix: clear the header after sending a packet solves a problem with fragmentation; also prod the watchdog since fragment transmissions can take a long time with some low-power MAC protocol 2010-02-06 07:49:58 +00:00
adamdunkels
a68b4c40c4 Added a function to clear only the header part of the packetbuf 2010-02-06 07:48:52 +00:00
oliverschmidt
e88d209214 Adjusted process name to title case. 2010-02-05 19:13:05 +00:00
nifi
a1199721a6 Changed to use separate Contiki event type for ICMP6 notifications 2010-02-05 12:43:36 +00:00
oliverschmidt
5e66abda50 Initialize lastport in all cases it is defined. 2010-02-04 21:33:51 +00:00
adamdunkels
d8b0625e21 Bugfix: lastport must be defines both when UIP_ACTIVE_OPEN or UIP_UDP are defined (thanks Oliver!) 2010-02-04 21:14:45 +00:00
adamdunkels
7bcb106fa9 Disable the stream mode for TCP packets since it does not seem to work reliably with cxmac 2010-02-04 18:57:33 +00:00
adamdunkels
13f6673d04 Bugfix: drop incoming TCP and UDP packets where port numbers are zero 2010-02-04 11:17:42 +00:00
adamdunkels
d7b7b05d0e Moved the neigbor_init() call to the collect module, since it is the only one that currently uses it 2010-02-03 20:38:33 +00:00
adamdunkels
75e1c0c8c7 Include contiki-conf.h to let the MAC channel check rate be configurable 2010-02-03 16:45:12 +00:00
adamdunkels
06d17c7e1c Remove unused rtimer code 2010-02-03 16:44:43 +00:00
adamdunkels
4bffd277f5 Don't set the stream bit on outgoing TCP packets for now - it doesn't seem to play well with IPv6 and X-MAC 2010-02-03 16:44:19 +00:00
adamdunkels
36db5eb70b Added debug printout 2010-02-03 01:18:24 +00:00
adamdunkels
e419eb3cc5 Retransmit packet if it didn't receive a MAC layer ack 2010-02-03 01:17:54 +00:00
adamdunkels
d68af249ec Added a MAC layer return value that informs the caller that a packet did not receive a MAC layer acknowledgement 2010-02-03 01:17:32 +00:00
adamdunkels
4bc4f033e8 Increase the trickle resend interval for router advertisements 2010-02-03 01:13:17 +00:00
adamdunkels
181213124b Added a configuration option for setting the MAC channel check rate (which must be a power of two). The configuration is independent of the MAC protocol. 2010-02-02 23:28:58 +00:00
adamdunkels
f66cd6d44e Increased the forwarding queue to six packets to improve collection robustness 2010-02-02 21:44:05 +00:00
adamdunkels
e21c1a39d3 Removed unused code; a number of fixed by Anthony Asterisk 2010-02-02 21:13:27 +00:00
adamdunkels
901a128e7f Reconfigured the timeouts to work better on top of a power-cycling radio mechanism 2010-02-02 21:12:29 +00:00
adamdunkels
28052c655f Removed exit() calls that were unadvertedtly left in from testing 2010-02-02 21:10:38 +00:00
adamdunkels
0db31db624 Moved declarations to the start of each function 2010-02-02 21:09:06 +00:00
adamdunkels
fcf60e9260 Removed the csma_init declaration in the mac_driver struct since it isn't needed and it breaks sdcc 2010-02-02 20:45:58 +00:00
adamdunkels
cc2be0f111 Remove compiler warnings 2010-02-02 16:33:07 +00:00
adamdunkels
88c661b0c2 Rewrote the netif time code so that is avoids the use of floating point numbers; some code style fixes 2010-02-02 16:32:03 +00:00
oliverschmidt
3f142f0718 Convert '@' correctly from PETSCII to ASCII - by leaving it alone. 2010-01-31 23:46:19 +00:00
adamdunkels
1a13d25d33 Revised version of the X-MAC implementation that uses a ctimer instead
of an rtimer for the periodic radio duty cycling. The benefit of this
implementation is that it leaves an rtimer free for user tasks. The
drawback is a slightly higher idle power consumption. This new version
is based on the current rtimer-based X-MAC.
2010-01-31 18:44:23 +00:00
adamdunkels
e4168db633 Bugfix: deallocate queuebuf only if there was no collision 2010-01-31 13:55:36 +00:00
oliverschmidt
9e809ef5a4 Provide optional prototypes for all three keyboard input related functions. 2010-01-31 12:48:46 +00:00
adamdunkels
4938df5c05 Update to Contiki version number 2.4 2010-01-29 18:03:55 +00:00
adamdunkels
388c5d4244 Made the sicslowpan MAC layer reachable from outside modules 2010-01-28 13:50:51 +00:00
adamdunkels
2ae7ed827c Increase the default X-MAC channel check rate to 4 Hz instead of 2 Hz 2010-01-28 13:40:47 +00:00
adamdunkels
f94d6df6f0 Bugfix: copy the originator address from the packetbuf into a local variable to avoid it being overwritten 2010-01-27 08:12:56 +00:00
adamdunkels
8430dab039 Typecast to fix nightly build problem 2010-01-27 07:36:31 +00:00
adamdunkels
9e5823f060 Made retransmission timeout configurable 2010-01-26 10:19:26 +00:00
adamdunkels
b728c0927c Made number of duplicate announcements configurable 2010-01-26 10:18:55 +00:00
adamdunkels
cc3f609eaa Bugfix for alignment issue. Added mechanism that allows five duplicate announcements before suppressing one's own. 2010-01-25 13:55:17 +00:00
adamdunkels
71ffde578e Moved route_init() into mesh instead of the generic rime initialiation 2010-01-25 13:54:26 +00:00
adamdunkels
423e37f426 Added parameter to ipolite that specifies how many dups that are acceptable, before suppressing one's own packet 2010-01-25 13:54:06 +00:00
adamdunkels
0b58ca3b22 Bugfix: split full size TCP segments if they match the MSS definition, not only the buffer size definition 2010-01-25 13:53:15 +00:00
adamdunkels
7615a6cf47 Bugfix by Henrik Mäkitaavola: check that ICMP6 process is defined before invoking it 2010-01-25 13:37:05 +00:00
adamdunkels
4f3e8d565c Added a simple CSMA (Carrier Sense Multiple Access) mechanism that
works on top of an underlying duty cycling mechanism. The CSMA layer
retransmits packets that could not be sent because of a collision was
detected.
2010-01-25 11:46:44 +00:00
adamdunkels
7ad93e5d18 Added a field to the struct mac interface:
channel_check_interval(). This function returns the interval by which
the duty cycling mechanism checks the radio channel for activity. It
is used by higher layer mechanisms to determine suitable timeouts for
retransmissions.
2010-01-25 11:43:32 +00:00
fros4943
26e0bab11a bugfix: alignment problem caused by previous bugfix 2010-01-21 11:39:35 +00:00
fros4943
3db4f36c3e removed compiler specific attribute 2010-01-20 09:58:16 +00:00
nvt-se
3c890c48a9 Added some comments to clarify how Coffee works internally 2010-01-19 16:18:34 +00:00
adamdunkels
6f72ff7af1 Remove compiler warnings 2010-01-19 13:08:24 +00:00
adamdunkels
c962f49516 Alignment bugfix 2010-01-18 21:27:21 +00:00
adamdunkels
e455ef3533 Added the battery indicator to the sensors API 2010-01-15 08:51:21 +00:00