1 The examples/ directory contains a few examples that will help you get
4 To run the example programs, you need either to be running Linux or
5 FreeBSD (or any other *nix-type system), or install Cygwin if you are
6 running Microsoft Windows (http://www.cygwin.com/). As a minimum you
7 will need to have the gcc C compiler installed. To run the examples in
8 the 'netsim' target, you need to have GTK 1.x development libraries
9 installed. These are usually called 'gtk-devel', 'libgtk1-devel' or
10 similar in your Linux software installation programs.
14 A test script that compiles Contiki for a number of platforms and
15 reports any errors found during the build.
19 An email program supporting SMTP. It can be compiled and run in the
20 'win32' target by typing the following commands:
26 Most likely you'll have to adjust the TCP/IP values set in main() in
27 platform/win32/contiki-main.c to match your needs.
29 Please consult cpu/native/net/README-WPCAP as well.
33 A set of demo applications for the ESB board.
37 An FTP client supporting download. It can be compiled and run in the
38 'win32' target by typing the following commands:
44 Most likely you'll have to adjust the TCP/IP values set in main() in
45 platform/win32/contiki-main.c to match your needs.
47 Please consult cpu/native/net/README-WPCAP as well.
51 A really simple Contiki program that shows how to write Contiki
52 programs. To compile and test the program, go into the hello-world
55 cd examples/hello-world
57 Run the 'make' command.
61 This will compile the hello-world program in the 'native' target.
62 This causes the entire Contiki operating system and the hello-world
63 application to be compiled into a single program that can be run by
64 typing the following command:
68 This will print out the following text:
70 Contiki initiated, now starting process scheduling
73 The program will then appear to hang, and must be stopped by
74 pressing the C key while holding down the Control key.
78 An IRC client. It can be compiled and run in the 'win32' target by
79 typing the following commands:
85 Most likely you'll have to adjust the TCP/IP values set in main() in
86 platform/win32/contiki-main.c to match your needs.
88 Please consult cpu/native/net/README-WPCAP as well.
92 A quite simple demonstration of the Contiki multi-threading library
93 employing two worker threads each running a recursive function. It
94 can be compiled and run in the 'native' target by typing the
97 cd examples/multi-threading
99 ./multi-threading.native
103 Contains a set of examples on how to use the Rime communications
104 stack. To run those examples in the 'netsim' target (a very simple
105 Contiki network simulator), compile the programs with:
109 You will need to have GTK 1.x development libraries installed.
111 Run the different programs:
114 ./test-meshroute.netsim
115 ./test-rudolph0.netsim
116 ./test-rudolph1.netsim
117 ./test-treeroute.netsim
118 ./test-trickle.netsim
120 Most of the examples requires you to click with the middle mouse
121 button on one of the simulated nodes for something to happen.
125 Examples inteded for running on the Tmote Sky board. To compile
126 those, you need to have msp430-gcc (the gcc C compiler for the
127 MSP430 microcontroller) installed.
129 The follwing programs are included:
131 blink.c A simple program that blinks the on-board LEDs
132 sky-collect.c Collects sensor data and energy profile values
133 to a sink. Press the "user" button on the Tmote
134 Sky that is connected to the PC to make the node a
136 test-button.c Toggles the LEDs when the button is pressed.
137 test-cfs.c Tests the 1 mb flash memory of the Tmote Sky
141 A simple TCP telnet server with a simple command shell. It can be
142 compiled and run in the 'minimal-net' target by typing the following
145 cd examples/telnet-server
147 ./telnet-server.minimal-net
149 Most likely you'll have to adjust the TCP/IP values set in main() in
150 platform/minimal-net/contiki-main.c to match your needs.
152 Please consult cpu/native/net/README-WPCAP as well if you are running
157 A text mode web browser supporting links and forms. It can be compiled
158 and run in the 'win32' target by typing the following commands:
160 cd examples/webbrowser
164 Most likely you'll have to adjust the TCP/IP values set in main() in
165 platform/win32/contiki-main.c to match your needs.
167 Please consult cpu/native/net/README-WPCAP as well.
171 A web server supporting dynamic content creation using "scripts" which
172 are actually compiled-in C-functions. It can be compiled and run in the
173 'minimal-net' target by typing the following commands:
175 cd examples/webserver
177 ./webserver-example.minimal-net
179 As an alternative to the static and dynamic compiled-in content the web
180 server can instead support "external" static-only content loaded from
181 any storage supported by the 'Contiki File System' (CFS) interface. To
182 compile it in the 'minimal-net' target and have it load files from disk
183 use the following command:
187 Most likely you'll have to adjust the TCP/IP values set in main() in
188 platform/minimal-net/contiki-main.c to match your needs.
190 Please consult cpu/native/net/README-WPCAP as well if you are running
195 A command line program that retrieves files from web servers and saves
196 them using the 'Contiki File System' (CFS). It can be compiled and run
197 in the 'minimal-net' target by typing the following commands:
203 Most likely you'll have to adjust the TCP/IP values set in main() in
204 platform/minimal-net/contiki-main.c to match your needs.
206 Please consult cpu/native/net/README-WPCAP as well if you are running