Commit graph

1176 commits

Author SHA1 Message Date
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
adamdunkels
fab672c7ba Reverted the FIFOP->FIFO change; it didn't work :( 2010-01-14 23:32:05 +00:00
nvt-se
d2655eac7a make watchdog management slightly more abstract to simplify porting 2010-01-14 21:16:58 +00:00
adamdunkels
53edff7655 Added sensor API for the SHT11 driver 2010-01-14 20:16:33 +00:00
adamdunkels
743e93e650 Do not remove encounters - there is no need to, as they are only an optimization 2010-01-14 20:14:03 +00:00
adamdunkels
f6715890de Made SENSORS_ACTIVATE() and SENSORS_DEACTIVATE() use non-pointers, for concistency 2010-01-14 20:13:34 +00:00
nifi
079db2af55 fixed sensors_find API 2010-01-14 20:04:38 +00:00
joxe
dd6922906c replace void pointer types with int 2010-01-14 15:33:27 +00:00
nifi
480f72c95c changed argument for SENSORS_ACTIVATE/DEACTIVATE to be a pointer to the sensor structure 2010-01-14 14:17:08 +00:00
nifi
1d592b5680 removed obsolete structure 2010-01-14 13:55:21 +00:00
joxe
84d969ce85 simplified the sensors API - will break some platforms... 2010-01-14 13:29:56 +00:00
nvt-se
a03e899c27 Signal the result of transmissions attempts made in the mesh module. Patch from Moritz Struebe 2009-12-18 14:57:15 +00:00
nifi
7b2b93e6e6 clear transmission flag if send failed 2009-12-18 14:49:42 +00:00
zhitao
93c748cc74 Bug fix for mysterious packet loss : check FIFO pin instead of FIFOP pin for any unread RX FIFO data;
Added protection of packet timestamp across interrupts. Note that race condition can still occur as interrupts and self-scheduled reads of the RX FIFO interleave in certain unusual patterns. More investigation is needed.
2009-12-11 18:32:54 +00:00
adamdunkels
f4e6758b22 Use RTIMER_NOW() instead of rtimer_arch_now() 2009-12-09 18:08:26 +00:00
adamdunkels
eff2203310 There were many bugs in the rtimer code, particularly one that made only one rtimer at a time work. We have a new rtimer system that we're testing, but in the meantime, I rewrote the rtimer code to explicitly support only one rtimer. Makes the code significantly simpler (and fixes a bug that was very hard to track down). 2009-12-08 23:55:17 +00:00
adamdunkels
2f105e933a Variable xmac_is_on was used both in interrupt and non-interrupt contexts and needs to be volatile 2009-12-06 23:29:38 +00:00
adamdunkels
53457eb1f0 Fixed compilation warning 2009-12-06 17:10:54 +00:00
adamdunkels
8bcc838d8a Bugfix: don't set the 'we are sending' flag until we are actually sending 2009-12-06 17:05:45 +00:00
adamdunkels
6897270289 Bugfix to the Contiki LPP encounter timing code: encounters are now
properly timed.
2009-12-06 13:18:32 +00:00
adamdunkels
822149f943 Significant improvements to the Contiki X-MAC:
* the code is simplified, particularly the duty cycling logic
* old unused code has been removed
* Contiki X-MAC now listens before sending a strobe to avoid MAC-level
  collisions
* broadcasts are sent directly, without strobes, reducing the power
  consumption of receivers
* turn off radio for 1 ms between sending a strobe and expecting the
  strobe ack
2009-12-06 13:16:59 +00:00
adamdunkels
cef2e65c9b Added an error type for signalling a MAC-layer collision 2009-12-05 21:49:51 +00:00
adamdunkels
4a1a823a49 Code style fix 2009-12-05 13:29:41 +00:00
adamdunkels
6815e2a53f Code style fix 2009-12-05 11:26:20 +00:00
fros4943
a1b4597b95 fixed announcement compilation error 2009-11-27 14:27:50 +00:00
adamdunkels
aeefa75304 Fixed alignment problems in announcement packet creation 2009-11-27 12:49:27 +00:00
nvt-se
116771adbc made the route cache timeout configurable 2009-11-20 14:35:58 +00:00
nifi
1f2c226d8e * Added ctimer_restart(). Patch by Moritz Struebe.
* Added ctimer_expired().
2009-11-19 18:32:05 +00:00
nifi
bb0ffe0478 moved rime initialization into rime router so it is easier to switch IPv6 routing module 2009-11-18 13:51:55 +00:00
fros4943
0034fd7bca generic return values for sent packet 2009-11-13 10:09:02 +00:00
fros4943
9cc57c4324 generic radio return values
+ minor bug fix: SFD may go high without transmission starting (very seldom)
2009-11-13 10:07:53 +00:00
fros4943
9b20f11cd8 chameleon returns 1 only on successful rime_output() 2009-11-13 09:14:52 +00:00
fros4943
583dd11c55 rime_output() now returns RIME_OK or RIME_ERR depending on the MAC return value.
this patch may affect Rime sniffers running on top of MAC protocols that do not yet return generic MAC return values
2009-11-13 09:10:24 +00:00
fros4943
26bb5ecd21 added radio and MAC generic return values to allow applications finding out whether the packet was transmitted 2009-11-13 08:59:22 +00:00
joxe
5b0b36c39e accept messages to all routers if UIP_CONF_ROUTER is set. 2009-11-12 14:05:42 +00:00
adamdunkels
60a3fc0cae Fixed alignment issue 2009-11-09 08:22:40 +00:00
adamdunkels
56218aba3b Made rimeaddr_t pointers const where they should be. 2009-11-08 19:40:16 +00:00
adamdunkels
70fc23ac7e Enable stream mode by default, remove LED debug mode 2009-11-04 16:02:45 +00:00
fros4943
5f71e9914e configurable line buffer size + simplified interrupt handler + overflow check on line buffer 2009-11-02 12:47:06 +00:00
adamdunkels
5aab2eb77d A simple addition with significant performance implications:
sicslowpan tags TCP packets with the PACKETBUF_ATTR_PACKET_TYPE_STREAM
flag, which makes the underlying power-saving MAC layer keep the radio
on for some time after transmitting the packet. This allows reply
packets to be processed directly, significantly increasing TCP latency
and throughput.
2009-11-02 11:58:56 +00:00
adamdunkels
c7a91ad4a2 Bugfix: UIP_TCP_BUF -> BUF 2009-10-27 23:09:58 +00:00
adamdunkels
631af06c7c Bugfix: Active TCP connections in uIP are made by first setting up the
TCP connection state, then poll uIP to send out the first SYN. Until
now, however, the SYN was not sent as part of the poll, but at the
first retransmission. This is now fixed.
2009-10-27 22:34:08 +00:00
fros4943
6f4a537aa0 serial line ringbuf implementation + increased default buffer size to 128 bytes 2009-10-27 16:20:31 +00:00
zhitao
1913e1a936 prevent neighbor ETX from wrap-over 2009-10-22 13:11:20 +00:00
nifi
df32fde58c Made max number of neighbors configurable 2009-10-21 21:25:10 +00:00
adamdunkels
a25a3a45b5 Bugfix: attribute energy expenditure to a device only if the device was actually switched on 2009-10-20 20:19:27 +00:00
adamdunkels
91579fbaab Removed debug strings to save ROM 2009-10-20 08:06:43 +00:00
nifi
223fa1c8e5 added missing include 2009-10-20 07:42:03 +00:00
adamdunkels
a5ea7ef966 Increased default number of queue buffers 2009-10-19 21:28:59 +00:00
adamdunkels
4d9b05c2ce Increased default header size in packetbuf to accomodate 802.15.4 headers 2009-10-19 21:28:11 +00:00
adamdunkels
7cdfbca973 Alignment problems with announcements fixed 2009-10-19 21:27:02 +00:00
adamdunkels
9ec57d61ad Added MAC layer framing support to X-MAC so that packets now are standard 802.15.4 frames 2009-10-19 20:53:56 +00:00
adamdunkels
4de1816e36 Added a new module called "framer" that creates MAC level frames to
the packetbuf from packet attributes. Two framer modules are included,
one that creates 802.15.4 frame headers, and one that creates a
minimal "nullmac"-style header that only contains the link-local
addresses.
2009-10-19 18:30:03 +00:00
nifi
ae226c5917 * Set sender and receiver packet attributes on incoming packets
* Added link layer destination check
2009-10-19 11:25:54 +00:00
adamdunkels
10c873018d Ensure that DEFAULT_PERIOD is != 0, to avoid a modulo with 0 2009-10-19 06:39:29 +00:00
adamdunkels
f25856a387 Hack to be able to receive UDPv4 multicast packets 2009-10-18 22:03:44 +00:00
adamdunkels
fb037e0afb Added function for sending an UDP packet to a specified IP address and port number over an existing UDP connection 2009-10-18 22:02:01 +00:00
adamdunkels
9d26bd663e A new optimization to X-MAC: senders now keep track of when neighbors
last were known to be awake. When sending a packet, a sender does not
start to send strobes until the neighbor is expected to be awake. This
reduces power consumption for senders and decreases the contention in
the network as there are less packets in the air. Additionally, the
ACK optimization was improved so that data/ack exchanges now are
more efficient.
2009-10-18 13:19:25 +00:00
nvt-se
31f41d842e * decline route discovery requests if we have one in the air
* and, by popular demand, switched PRINTF to printf in the debug macro. :-)
2009-10-08 16:30:26 +00:00
nvt-se
f143227205 made the route discovery packet timeout configurable. 2009-09-29 16:02:28 +00:00
nifi
0ad51b8dcc Moved the link layer destination check to sicslowmac 2009-09-18 16:37:17 +00:00