Added Breadbox64 to the Atari Makefile (now that I ported BB64 to that target). This...
[contiki-2.x.git] / doc / sicslowmac-doc.txt
blob4d788f82eb5493ba234f9bd963c485f8445688ab
1 /**
2 \addtogroup rf230mac
3 @{
4 */
6 /**
7  * \defgroup macdoc SICSLoWMAC Implementation
8  * @{
10     \section macintro 1. Introduction
12 The phase1 MAC implemented to support the IPv6/6LoWPAN stack within the Contiki
13 project is a light weight yet adequate beginning. This phase supports point to
14 point data connectivity between a router device and an end device. The router is
15 the RZ USB stick from the ATAVRRZRAVEN kit. The end node is the AVR
16 Raven from the ATAVRRZRAVEN kit. The picture below shows the complete ATAVRRZRAVEN kit.
18     \image html raven.png
20 The next phases will implement a commissioning concept including scan, and
21 beacon generation. These kinds of primitives will allow dynamic network
22 formation. Additionally, routing and low power/sleep will be implemented in
23 following phases.
25     \section macprereqs 2. Prerequisites
27 See the \ref tutorialraven for required systems setup configuration.
29     \section macoverview 3. MAC Overview
31 This MAC follows the recommendations of RFC4944 with respect to data frames and
32 acknowledgements (i.e. all data frames are acknowledged). At the time of this
33 writing (phase 1) beacons (frames) and association events are not implemented.
34 Additionally, data frames always carry both source and destination addresses.
35 PANID compression (intra-pan) is not used so both source and destination PANID's
36 are present in the frame.
38 The SICSLoWMAC supports the IEEE 802.15.4 Data Request primitive and the Data
39 Request Indication primitive. The data request primitive constructs a <b>proper</b>
40 802.15.4 frame for transmission over the air while the data indication parses a
41 received frame for processing in higher layers (6LoWPAN). The source code for
42 the mac can be found in the sicslowmac.[c,h] files.
44 To assemble a frame a MAC header is constructed with certain presumptions:
45 -#  Long source and destination addresses are used.
46 -#  A hard coded PANID is used.
47 -#  A hard coded channel is used.
48 -#  Acknowledgements are used.
49 -#  Up to 3 auto retry attempts are used.
51 These and other variables are defined in mac.h.
53 Given this data and the output of the 6LoWPAN function, the MAC can construct
54 the data frame and the Frame Control Field for transmission.
56 An IEEE 802.15.4 MAC data frame consists of the fields shown below:
58     \image html dataframe.png
60 The Frame Control Field (FCF) consist of the fields shown below:
62     \image html fcf.jpg
64     \note The MAC address of each node is expected to be stored in EEPROM and
65 retrieved during the initialization process immediately after power on.
67     \section macrelationship 4. 6LoWPAN, MAC and Radio Relationship
69 The output function of the 6LoWPAN layer (sicslowpan.c) is the input function
70 to the MAC (sicslowmac.c). The output function of the MAC is the input function
71 of the radio (radio.c). When the radio receives a frame over the air it processes
72 it in its TRX_END event function. If the frame passes address and CRC filtering
73 it is queued in the MAC event queue. Subsequently, when the MAC task is processed,
74 the received frame is parsed and handed off to the 6LoWPAN layer via its input
75 function. These relationships are depicted below:
77     \image html layers.png
79     \section maccode 5. Source Code Location
81 The source code for the MAC, Radio and support functions is located in the path:
82 - \\cpu\\avr\\radio
83     - \\rf230
84     - \\mac
85     - \\ieee-manager
87 -#  The \\rf230 folder contains the low level HAL drivers to access and control
88 the radio as well as the low level frame formatting and parsing functions.
89 -#  The \\mac folder contains the MAC layer code, the generic MAC initialization
90 functions and the defines mentioned in section 3.
91 -#  The \\ieee-manager folder contains the access functions for various PIB
92 variables and radio functions such as channel setting.
94 The source code for the Raven platforms is located in the path:
95 - \\platform
96     - \\avr-raven
97     - \\avr-ravenlcd
98     - \\avr-ravenusb
99 -#  The \\avr-raven folder contains the source code to initialize and start the
100 raven board.
101 -#  The \\avr-ravenlcd folder contains the complete source code to initialize
102 and start the ATmega3209P on raven board in a user interface capacity. See the
103 Doxygen generated documentation for more information.
104 -#  The \\avr-ravenusb folder contains the source code to initialize and start
105 the raven USB stick as a network interface on either Linux or Windows platforms.
106 Note that appropriate drivers are located in the path:
107     - \\cpu\\avr\\dev\\usb\\INF
109     \section macavrstudio 6. AVR Studio Project Location
111 There are two projects that utilize the Logo Certified IPv6 and 6LoWPAN layers
112 contributed to the Contiki project by Cisco. These are ping-ipv6and webserver-ipv6
113 applications. They are located in the following paths:
114 - \\examples\\webserver-ipv6
116 - \\examples\\ping-ipv6
118 The ping-ipv6 application will allow the USB stick to ping the Raven board while
119 the webserver-ipv6 application will allow the raven board to serve a web page.
120 When the ravenlcd-3290 application is programmed into the ATmega3290P on the
121 Raven board, the Raven board can ping the USB stick and it can periodically update
122 the temperature in the appropriate web page when served.
126 /** @} */
127 /** @} */