Commit graph

41 commits

Author SHA1 Message Date
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
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 0b2b7bcdba Removed inadvertedly left-over include file 2010-02-18 23:52:34 +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 fab672c7ba Reverted the FIFOP->FIFO change; it didn't work :( 2010-01-14 23:32:05 +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
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
adamdunkels 8745235a79 Minor codestyle fix 2009-09-09 21:07:42 +00:00
nifi c81dbb6c89 Fixed problem with the radio driver changing transmission power to max when not specified at transmission. Also fixed bug where the lock was released when setting the transmission power.
Thanks to Djamel Djenouri and Marcus Lundén for identifying the problem.
2009-08-19 15:05:05 +00:00
fros4943 18a98bb573 bug fix: we need to explicitly turn off the cc2420 listen mode after a packet transmission 2009-08-19 12:00:04 +00:00
joxe 0c8b200987 added autoack configuration for CC2420 and reversed long ieee address for address recognition 2009-07-28 22:24:53 +00:00
adamdunkels 92862ad2a5 Increased the number of iterations for ugly-hack-loop that checks if a transmission has started, to accommodate a faster CPU speed on the MSP430 2009-04-29 11:38:50 +00:00
adamdunkels 65eb5fd4e8 Renamed the rimebuf module to packetbuf to signal that the module is used outside of a pure Rime context (e.g., the sicslowpan code uses it). 2009-03-12 21:58:20 +00:00
adamdunkels f634ccfb3d Set transmission power based on packet attribute 2009-03-11 20:38:53 +00:00
adamdunkels 57b9cab27e Set RSSI, correlation, and timestamp as packet attributes for incoming packets 2009-03-02 21:59:01 +00:00
nifi dee785ae88 added configuration of checksum and timesynch 2009-02-25 21:21:06 +00:00
adamdunkels 6a460fecdd There is problem with the CC2420 driver: under high traffic load the packets often get mangled in the receive FIFO. Not sure why this happens or how to best prevent it. As a temporary workaround, I've added an additional CRC16 check to the incoming packets. This eats two bytes from each packet, but at least protects against the erroneous packets we've seen quite a few of lately. The reception code was also cleaned up, which resulted in a smaller code size. 2008-08-26 21:44:03 +00:00
adamdunkels 66876625d4 Changed name of the simple-cc2420 module to cc2420: changed all function names and variable names from simple_cc2420_* to cc2420_*. 2008-07-02 09:05:40 +00:00
adamdunkels 1586d8f36f Changed filename of the CC2420 driver from simple-cc2420 to cc2420. 2008-07-01 21:02:51 +00:00
adamdunkels 39abed8672 Moved old CC2420 driver to the backyard 2008-02-24 22:29:08 +00:00
bg- 70ddc0f27e * If we detect a RXFIFO overflow schedule a poll of the device driver. 2007-07-30 14:54:49 +00:00
bg- 8f0d9aab89 * Change max life of neigbour entries from 60 to 30 seconds by
changing the time unit (quanta) from 4 to 2 seconds.
2007-06-28 15:08:53 +00:00
bg- 08d547780c * Some extra delay when broadcasting to break potential symmetries. 2007-06-01 14:37:02 +00:00
bg- 81b684414d * Changed implementation for dealing with retransmissions to be
strictly event driven. The old implementation was rather process
  like and the new one is still implemented as a process.
2007-05-31 10:15:57 +00:00
bg- 1009c3fabf * Literal constants REMOTE_*. 2007-05-21 14:24:51 +00:00
bg- 34b1d02607 * Need to track if this was the incoming interface. 2007-05-08 08:27:34 +00:00
bg- 536703d0a2 * Check in with debug off! 2007-05-07 12:02:14 +00:00
bg- d34db6ee92 * Change retransmission scheme both for unicasts and for
broadcasts. Only count retransmissions that actually caused
  transmission (according to the hardware).
2007-05-07 12:01:32 +00:00
bg- 83f2b1da00 * Use uip_fw return codes.
* Use unicast retransmission scheme also for broadcasts.
2007-05-02 14:51:20 +00:00
bg- e7d7e31bc9 * Better management of "DATA ACK"s. 2007-04-30 09:41:42 +00:00
bg- 478953dcf4 * Randomised backoff when broadcasting.
* Only warn about rxfifo overflows when sending.

* More intricate tests to verify if transmission really started.
2007-04-04 11:46:10 +00:00
bg- 95164eb39f * Perform RXFIFO overflow check as late as possible when sending. 2007-02-01 14:00:27 +00:00
bg- 2a879202a2 * Initial AVR port.
* Check for RXFIFO overflow before sending.

* Fix in loop that waits for SFD start.
2007-01-24 16:26:55 +00:00
bg- 29572668ac * Typo in comment. 2006-12-20 13:42:55 +00:00
bg- 5d970109c8 * If broadcast transmission never starts, retry with (nearly)
exponential backoff.

* Fine-tune check for transmission start.
2006-12-01 15:04:04 +00:00
bg- f3a6cee55b * Oops, some machine dependent changes was accidentally committed. 2006-11-17 13:03:51 +00:00
bg- 27e531baad * Set CC2420_RXCTRL1.RXBPF_LOCUR=1 as recommended in data sheet.
* Use PRINTF to disable debug printfs.
2006-11-17 12:27:23 +00:00
bg- 5dacf0be11 Move misc. routines to new file. 2006-08-09 17:39:39 +00:00
bg- fb94d50410 Change typedef of uip_ipaddr_t from a vector type to a union.
typedef union uip_ip4addr_t {
  u16_t u16[2];
  u8_t  u8[4];
} uip_ip4addr_t;

typedef uip_ip4addr_t uip_ipaddr_t;

This implies that one must consistently pass pointers to
uip_ipaddr_t:s and not mix and match pointers with
uip_ipaddr_t:s as was done earlier.
2006-08-09 16:13:39 +00:00
bg- 4eee7b8bf4 Slightly outdated versions were imported to sf. 2006-08-02 14:33:36 +00:00
adamdunkels c9e808d638 Import of the contiki-2.x development code from the SICS internal CVS server 2006-06-17 22:41:10 +00:00