Turn off debug messages
[contiki-2.x.git] / README-EXAMPLES
blobbc28abf80d7db32962400dcc3f833fe63511ae6a
1 The examples/ directory contains a few examples that will help you get
2 started with Contiki.
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.
12 compile-platforms/
14   A test script that compiles Contiki for a number of platforms and
15   reports any errors found during the build.
17 email/
19   An email program supporting SMTP. It can be compiled and run in the
20   'win32' target by typing the following commands:
22     cd examples/email
23     make
24     ./email-client.win32
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.
31 esb/
33   A set of demo applications for the ESB board.
35 ftp/
37   An FTP client supporting download. It can be compiled and run in the
38   'win32' target by typing the following commands:
40     cd examples/ftp
41     make
42     ./ftp-client.win32
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.
49 hello-world/
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
53   directory:
55     cd examples/hello-world
57   Run the 'make' command.
59     make
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:
66     ./hello-world.native
68   This will print out the following text:
70     Contiki initiated, now starting process scheduling
71     Hello, world
73   The program will then appear to hang, and must be stopped by
74   pressing the C key while holding down the Control key.
76 irc/
78   An IRC client. It can be compiled and run in the 'win32' target by
79   typing the following commands:
81     cd examples/irc
82     make
83     ./irc-client.win32
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.
90 multi-threading/
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
95   following commands:
97     cd examples/multi-threading
98     make
99     ./multi-threading.native
101 rime/
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:
107     make TARGET=netsim
109   You will need to have GTK 1.x development libraries installed.
111   Run the different programs:
112   
113     ./test-abc.netsim
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.
123 sky/
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
135                      sink.
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
139 telnet-server/
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
143   commands:
145     cd examples/telnet-server
146     make
147     ./telnet-server.minimal-net
148     
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.
151   
152   Please consult cpu/native/net/README-WPCAP as well if you are running
153   Microsoft Windows.
155 webbrowser/
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
161     make
162     ./webbrowser.win32
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.
169 webserver/
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
176     make
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:
185     make HTTPD-CFS=1
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
191   Microsoft Windows.
193 wget/
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:
199     cd examples/wget
200     make
201     ./wget.minimal-net
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
207   Microsoft Windows.