Changes between Version 44 and Version 45 of node-contiki
- Timestamp:
- Oct 7, 2010, 6:38:08 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
node-contiki
v44 v45 29 29 === Download Contiki-2.4 === 30 30 31 Download Contiki-2.4 release source code (contiki-2.4.zip) from (http://www.sics.se/contiki/download.html) and extract it with a command:31 Download Contiki-2.4 release source code (contiki-2.4.zip) from (http://www.sics.se/contiki/download.html) and extract it. 32 32 33 33 $ unzip contiki-2.4.zip … … 59 59 * $ make uip6-bridge-tap.upload 60 60 61 3. Create a file /etc/radvd.conf and copy the following lines to that file 61 3. Create a file /etc/radvd.conf and copy the following lines to that file. 62 62 63 63 {{{ … … 80 80 }}} 81 81 82 4. Build a bridge 82 4. Build a bridge. 83 83 84 84 * $ cd contiki-2.4/tools/sky/uip-bridge … … 98 98 Note: if you run "tcpdump -i tap0" you will see the IP addresses of your nodes when they ask for routers (Router Solicitation). 99 99 100 5. Enable WLAN 100 5. Enable WLAN. 101 101 102 102 === Setting up the IPv6 GOGO6 Tunnel === … … 121 121 /temp/gw6c-6_0_1$ make all 122 122 123 3. To install the gogoCLIENT in the /usr/local/gw6c directory with the necessary files, run the following command:123 3. Install the gogoCLIENT in the /usr/local/gw6c directory. 124 124 /gw6c-6_0_1$ make installdir=/usr/local/gw6c install 125 125 … … 132 132 5. In order to run the IPv6 tunnel as DNS, setup gw6c.conf file; the setting for the usr/local/gw6c/bin/gw6c.conf 133 133 134 Suppose we create an account with username .134 Suppose we create an account with username "sensei-oulu". Notice that this username is used as a part of URL address later, therefore choose username that describes your network. 135 135 136 136 {{{ … … 150 150 }}} 151 151 152 Other configurations: leave as default 152 Other configurations: leave as default. 153 153 154 154 **Note: Whole gw6c.conf file is at the end of this document.** 155 155 156 6. Run the gw6c client 156 6. Run the gw6c client. 157 157 * /usr/local/gw6c/bin$ sudo ./gw6c 158 Leave IPv6 tunnel running, and open a new terminal to program the node with the sensei-application. 159 160 7. To verify whether the gw6c created another interface with IPv6 address; use the command 161 * $ifconfig -> The output should be similar to this: 158 Leave IPv6 tunnel running, and open a new terminal to program the node with Sensei-application. 159 160 7. Verify that the gw6c created another interface with IPv6 address. 161 * $ifconfig[[BR]] 162 The output should be similar to this: 162 163 {{{ 163 164 tun Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 … … 170 171 }}} 171 172 172 8. Verify that a domain name corresponds to IPv6 address 173 8. Verify that a domain name corresponds to IPv6 address. 173 174 174 175 * $ nslookup 2001:5c0:1400:b::6213 175 176 176 In this case, output should give sensei-oulu.broker.freenet6.net -address 177 In this case, output should give sensei-oulu.broker.freenet6.net -address. 177 178 178 179 … … 195 196 == Program Tmote Sky node with contiki-2.4 and Sensei components == 196 197 197 1. Download and install Contiki-2.4 as instructed in Section 3.1 198 1. Download and install Contiki-2.4 as instructed in Section 3.1. 198 199 199 200 **Note: If you want to program a node with source code, please continue to step 2. If you don't need source code or you don't have access to the Sensei SVN, you can program a node with binary file with less steps. If you choose to program a node with binary file, please move to Section "Program Tmote Sky node with binary file". 200 201 201 2. Copy coap/ and sensei/ folders from svn (node-contiki /apps/) to contiki-2.4/apps/202 2. Copy coap/ and sensei/ folders from svn (node-contiki-coap/apps/) to contiki-2.4/apps/ 202 203 * /Sensei-WP5$ cp -r node-contiki-coap/apps/sensei/ ../contiki-2.4/apps/ 203 204 * /Sensei-WP5$ cp -r node-contiki-coap/apps/coap ../contiki-2.4/apps/ 204 205 205 3. Copy sicslowmac files in order to enable nodes mobility 206 3. Copy sicslowmac files in order to enable nodes mobility. 206 207 207 208 {{{ … … 213 214 }}} 214 215 215 4. Change MAC driver in Contiki 216 4. Change MAC driver in Contiki. 216 217 217 218 contiki-2.4$ gedit platform/sky/contiki-conf.h … … 227 228 * /Sensei-WP5$ cp -r node-contiki/examples/sensei-example ../contiki2.4/examples/ 228 229 229 6. Compile and program a node 230 6. Compile and program a node. 230 231 * contiki-2.4/examples/sensei$ make sensei.upload 231 232 … … 235 236 contiki-2.4/examples$ mkdir sensei 236 237 237 3. Download binary file and Makefile from a website and put them to the sensei folder, which was created in the previous step238 3. Download binary file and Makefile from a website and move them to the sensei folder, which was created in the previous step. 238 239 * www.ee.oulu.fi/~ikram/sensei.sky 239 240 * www.ee.oulu.fi/~ikram/Makefile 240 241 241 4. Program a node 242 4. Program a node. 242 243 * contiki-2.4/examples/sensei$ make sensei.upload 243 244 [[BR]] … … 246 247 * contiki-2.4/examples/sensei$ ../../tools/sky/serialdump-linux -b115200 /dev/ttyUSB0 247 248 [[BR]] 248 249 250 === Link files in Contiki using Makefiles ===251 If you download the code from SVN, then you do not need to follow this subsection. This section simply explain the steps how to link multiple files in Contiki OS using Makefiles.252 253 ==== contiki-2.4/examples/sensei-example/ ====254 255 There are at least two files in /examples/sensei-example/ : sensei.c and Makefile256 257 Makefile should include following lines:258 {{{259 all: sensei260 APPS = coap sensei #folders that you want to include from contiki-2.4/apps/261 DEFAULT_TARGET=sky262 CONTIKI = ../..263 include $(CONTIKI)/Makefile.include264 }}}265 266 ==== /apps/coap ====267 268 If the coap folder already exists, you can skip the following steps:269 270 1. Create a directory in /apps/coap271 2. The coap directory should contains coap.c and coap.h file.272 3. If there is no Makefile.coap in the /coap folder, create a file “Makefile.coap” in the coap folder.273 4. Edit the /apps/coap/Makefile.coap file write your source file as follows:274 275 coap_src = coap.c276 277 **Note that coap.c should have a line: #include "coap.h"278 279 ==== /apps/sensei ====280 281 If the sensei folder already exists, you can skip the following steps:282 1. Create a directory in /apps/sensei283 The sensei directory should contain the following files.284 {{{285 Makefile.sensei286 actuator.c287 actuator.h288 parameter.c289 parameter.h290 rai.c291 rai.h292 rpi.c293 rpi.h294 sensor.c295 sensor.h296 subscription.c297 subscription.h298 }}}299 If there is no Makefile.sensei in the /sensei folder, create a file "Makefile.sensei" in the sensei folder.300 301 2. Then into /apps/sensei/Makefile.sensei file write your source file as follows:302 {{{303 sensei_src = rai.c rpi.c actuator.c sensor.c parameter.c subscription.c304 }}}305 249 306 250