osd-contiki/examples/webserver-ipv6-raven
Simon Duquennoy 722b3258d1 Cleanup of the Contiki network layer configuration. Now using CONTIKI_WITH_IPV6, CONTIKI_WITH_IPV4, and CONTIKI_WITH_RIME in makefiles, and UIP_CONF_IPV6, UIP_CONF_IPV4, UIP_CONF_RIME in c code. Now only the stacks that are used are compiled (via makefile MODULES). Make IPv6 the default network stack. 2014-12-01 20:13:09 +01:00
..
Huginn Patch from Landon Fuller adds const to PROGMEM, required for newer avr-gcc 2012-06-10 12:54:11 -04:00
Muninn Patch from Landon Fuller adds const to PROGMEM, required for newer avr-gcc 2012-06-10 12:54:11 -04:00
Makefile Add settings manager with program flash defaults, random routine, periodic prints with ENERGEST, node-id. 2011-08-28 16:22:39 -04:00
Makefile.webserver Cleanup of the Contiki network layer configuration. Now using CONTIKI_WITH_IPV6, CONTIKI_WITH_IPV4, and CONTIKI_WITH_RIME in makefiles, and UIP_CONF_IPV6, UIP_CONF_IPV4, UIP_CONF_RIME in c code. Now only the stacks that are used are compiled (via makefile MODULES). Make IPv6 the default network stack. 2014-12-01 20:13:09 +01:00
README.md Rename to md 2013-03-26 23:15:37 +01:00
webserver6.c Removed all old RCS tags in the Contiki source tree. Those RCS tags are not used any more, as we are now using git to manage the Contiki source tree 2012-10-26 15:54:49 +02:00

README.md

webserver IPv6 raven

This example features a simple webserver running on top of the IPv6 contiki stack. It differs from the generic webserver6 example in that wherever possible data is stored in AVR flash memory instead of RAM. In addition are cgi scripts for displaying temperature and voltage sensors, and sleep and radio statistics, on web pages.

A bare $make will use the avr-raven platform. Alternate compatible platforms can be specified, e.g. $make TARGET=avr-atmega128rfa1. In that case the webserver process and web content located in that platform directory will be used.

The perl script /tools/makefsdata converts web content from (by default) all the files in the /httpd-fs subdirectory into the c source file /httpd-fsdata.c. This file is not deleted in a $make clean so that a rebuild can be done without perl in the toolchain (e.g. from a Windows cmd window). If any web file is changed the dependencies will attempt to update httpd-fsdata.c. If perl is not present, touching httpd-fsdata.c will give it a newer modification date and allow the build to continue.

Two alternate web contents Huginn and Muninn are included in this directory. Use e.g. $make WEBDIR=Huginn to generate a webserver6-huginn.elf file. Different ipv6 address suffix and server names can be specified in the makefsdata.h file of each directory so that mote addresses will not conflict.

webserver6.elf is always generated. It is also copied to another file whose name indicates the platform and web directory. $make clean operates only the specified target and webdir. For example:

make # builds webserver6.elf and webserver6-avr-raven.elf
make WEBDIR=huginn # builds webserver6.elf and webserver6-huginn-avr-raven.elf
make WEBDIR=muninn TARGET=avr-atmega128rfa1 # (builds webserver6.elf and webserver6-muninn-avr-atmega128rfa1.elf)
make clean WEBDIR=huginn TARGET=avr-atmega128rfa1 # deletes the avr-atmega128rfa1 objects and webserver6-huginn-avr-atmega128rfa1.elf
make clean # deletes the avr-raven objects and webserver6-avr-raven.elf


make WEBDIR=xxx

always forces regeneration of web content into httpd-fsdata.c and so requires PERL. A bare $make after that will not regenerate httpd-fsdata.c. Use

make WEBDIR=default

to switch back to the default /http-fs/ content.

See Makefile.webserver for optional switches for RPL or a coffee file system.

make UIP_CONF_RPL=1  # for a RPL node, or if rpl has become the contiki default,
make UIP_CONF_RPL=0 # to override

Much head banging can result if you do not make clean when changing make options, as the normal build dependencies are bypassed and the needed object modules may not be rebuilt.

Connect

make connect

will invoke the /tools/serial-log.pl perl script to connect to your serial debug port. This will log to the console and optional log file, adding useful time stamps. Edit the makefile for your serial port configuration.