Fixed mbxxx platform

This commit is contained in:
stefano pascali 2013-07-11 17:50:15 +02:00 committed by ismb-pert
parent 10f64c0ce8
commit fcb09d5d30
107 changed files with 2018 additions and 2760 deletions

View file

@ -0,0 +1,6 @@
CONTIKI_PROJECT = acc-example
all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
include $(CONTIKI)/Makefile.include

View file

@ -0,0 +1 @@
TARGET = mbxxx

View file

@ -0,0 +1,81 @@
/*
* Copyright (c) 2010, STMicroelectronics.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* This file is part of the Contiki operating system.
*
*/
/**
* \file
* Example showing use of the accelerometer.
* \author
* Salvatore Pitrulli <salvopitru@users.sourceforge.net>
*
*/
#include "contiki.h"
#include "dev/acc-sensor.h"
#include "board.h"
#include <stdio.h> /* For printf() */
/*---------------------------------------------------------------------------*/
PROCESS(acc_process, "Accelerometer process");
AUTOSTART_PROCESSES(&acc_process);
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(acc_process, ev, data)
{
static struct etimer etimer;
PROCESS_BEGIN();
printf("Starting measuring acceleration\r\n");
boardPrintStringDescription();
SENSORS_ACTIVATE(acc_sensor);
// Enable High Range.
//acc_sensor.configure(ACC_RANGE, ACC_HIGH_RANGE);
// Enable High Pass Filter.
//acc_sensor.configure(ACC_HPF, ACC_1HZ);
while(1) {
etimer_set(&etimer, CLOCK_SECOND/2);
PROCESS_WAIT_UNTIL(etimer_expired(&etimer));
printf("(X,Y,Z): (%d,%d,%d) mg \r",acc_sensor.value(ACC_X_AXIS),acc_sensor.value(ACC_Y_AXIS),acc_sensor.value(ACC_Z_AXIS));
}
PROCESS_END();
}
/*---------------------------------------------------------------------------*/

View file

@ -0,0 +1,6 @@
CONTIKI_PROJECT = test-button
all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
include $(CONTIKI)/Makefile.include

View file

@ -0,0 +1 @@
TARGET = mbxxx

View file

@ -0,0 +1,68 @@
/*
* Copyright (c) 2010, STMicroelectronics.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* This file is part of the Contiki operating system.
*
*/
/**
* \file
* Example showing use of the button on board.
* \author
* Salvatore Pitrulli <salvopitru@users.sourceforge.net>
*
*/
#include "contiki.h"
#include "dev/button-sensor.h"
#include "dev/leds.h"
#include <stdio.h>
#include "board.h"
/*---------------------------------------------------------------------------*/
PROCESS(test_button_process, "Test button");
AUTOSTART_PROCESSES(&test_button_process);
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(test_button_process, ev, data)
{
PROCESS_BEGIN();
SENSORS_ACTIVATE(button_sensor);
boardPrintStringDescription();
printf("Press the button to toggle the leds.");
while(1) {
PROCESS_WAIT_EVENT_UNTIL(ev == sensors_event &&
data == &button_sensor);
leds_toggle(LEDS_ALL);
}
PROCESS_END();
}
/*---------------------------------------------------------------------------*/

View file

@ -0,0 +1,7 @@
CONTIKI_PROJECT = coffee-test
all: $(CONTIKI_PROJECT)
COFFEE=1
CONTIKI = ../../..
include $(CONTIKI)/Makefile.include

View file

@ -0,0 +1 @@
TARGET = mbxxx

View file

@ -0,0 +1,67 @@
/*
* Copyright (c) 2010, STMicroelectronics.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* This file is part of the Contiki operating system.
*
*/
/**
* \file
* An application for coffee testing.
* \author
* Salvatore Pitrulli <salvopitru@users.sourceforge.net>
*/
#include "contiki.h"
#include "cfs-coffee-arch.h"
#include "cfs-coffee.h"
#include "board.h"
#include <stdio.h>
/*---------------------------------------------------------------------------*/
PROCESS(coffee_test_process, "Coffee test process");
AUTOSTART_PROCESSES(&coffee_test_process);
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(coffee_test_process, ev, data)
{
PROCESS_BEGIN();
boardPrintStringDescription();
printf("Testing coffee...\n");
cfs_coffee_format();
int ret = coffee_file_test();
printf("Test returned %d.\n",ret);
PROCESS_END();
}
/*---------------------------------------------------------------------------*/

View file

@ -0,0 +1,12 @@
CONTIKI_PROJECT = mbxxx-shell
PROJECTDIRS = $(CONTIKI)/platform/mbxxx/apps
APPS = serial-shell
PROJECT_SOURCEFILES = shell-sensors.c
all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
include $(CONTIKI)/Makefile.include

View file

@ -0,0 +1 @@
TARGET = mbxxx

View file

@ -0,0 +1,69 @@
/*
* Copyright (c) 2010, STMicroelectronics.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* This file is part of the Contiki operating system.
*
*/
/**
* \file
* mbxxx-specific Contiki shell
* \author
* Salvatore Pitrulli <salvopitru@users.sourceforge.net>
*
*/
#include "contiki.h"
#include "serial-shell.h"
#include "shell-sensors.h"
/*---------------------------------------------------------------------------*/
PROCESS(mbxxx_shell_process, "MBXXX Contiki shell");
AUTOSTART_PROCESSES(&mbxxx_shell_process);
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(mbxxx_shell_process, ev, data)
{
PROCESS_BEGIN();
serial_shell_init();
shell_blink_init();
shell_ps_init();
shell_reboot_init();
shell_text_init();
shell_time_init();
shell_sensors_init();
#if COFFEE
shell_coffee_init();
shell_file_init();
#endif
PROCESS_END();
}
/*---------------------------------------------------------------------------*/

View file

@ -0,0 +1,24 @@
all: mbxxx-websense
CONTIKI=../../..
WITH_UIP6=1
UIP_CONF_IPV6=1
APPS += webserver webbrowser
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
PROJECTDIRS += ../../ipv6/rpl-border-router
PROJECT_SOURCEFILES += httpd-simple.c
include $(CONTIKI)/Makefile.include
$(CONTIKI)/tools/tunslip6: $(CONTIKI)/tools/tunslip6.c
(cd $(CONTIKI)/tools && $(MAKE) tunslip6)
connect-router: $(CONTIKI)/tools/tunslip6
sudo $(CONTIKI)/tools/tunslip6 aaaa::1/64
connect-router-cooja: $(CONTIKI)/tools/tunslip6
sudo $(CONTIKI)/tools/tunslip6 -a 127.0.0.1 aaaa::1/64

View file

@ -0,0 +1 @@
TARGET = mbxxx

View file

@ -0,0 +1,4 @@
webserver IPv6
==============
See sky-websense example for more info.

View file

@ -0,0 +1,208 @@
/*
* Copyright (c) 2010, Swedish Institute of Computer Science.
* Copyright (c) 2011, STMicroelectronics.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*/
/**
* \file
* Light and temperature sensor web demo
*/
#include "contiki.h"
#include "httpd-simple.h"
#include "webserver-nogui.h"
#include "dev/temperature-sensor.h"
#include "dev/acc-sensor.h"
#include "dev/leds.h"
#include <stdio.h>
PROCESS(web_sense_process, "Sense Web Demo");
AUTOSTART_PROCESSES(&web_sense_process);
#define HISTORY 11
#define INTERV 5
static int temperature[HISTORY];
static int acc_x[HISTORY], acc_y[HISTORY], acc_z[HISTORY];
static int sensors_pos;
/*---------------------------------------------------------------------------*/
static const char *TOP = "<html><head><title>Contiki Web Sense</title></head><body>\n";
static const char *BOTTOM_HOME = "<br><br><a href=\"0\">Turn off leds</a><br><a href=\"1\">Turn on leds</a></body></html>\n";
static const char *BOTTOM = "<br><br><a href=\"index\">Home</a></body></html>\n";
/*---------------------------------------------------------------------------*/
/* Only one single request at time */
static char buf[256];
static int blen;
#define ADD(...) do { \
blen += snprintf(&buf[blen], sizeof(buf) - blen, __VA_ARGS__); \
} while(0)
static void
generate_chart(const char *title, const char *unit, int min, int max, int *values)
{
int i;
blen = 0;
ADD("<h1>%s</h1>\n"
"<img src=\"http://chart.apis.google.com/chart?"
"cht=lc&chs=400x300&chxt=x,x,y,y&chxp=1,50|3,50&"
"chxr=2,%d,%d|0,0,%u&chds=%d,%d&chxl=1:|Time|3:|%s&chd=t:",
title, min, max, (HISTORY-1)*INTERV, min, max, unit);
for(i = 0; i < HISTORY; i++) {
ADD("%s%d", i > 0 ? "," : "", values[(sensors_pos + i) % HISTORY]);
}
ADD("\">");
}
static void
start_acc_chart(const char *title, const char *unit, int min, int max)
{
blen = 0;
ADD("<h1>%s</h1>\n"
"<img src=\"http://chart.apis.google.com/chart?"
"cht=lc&chs=400x300&chxt=x,x,y,y&chxp=1,50|3,50&"
"chco=FF0000,008000,224499&"
"chdl=X|Y|Z&"
"chxr=2,%d,%d|0,0,%u&chds=%d,%d&chxl=1:|Time|3:|%s&chd=t:",
title, min, max,(HISTORY-1)*INTERV, min, max, unit);
}
static void
add_chart_values(int *values)
{
int i;
for(i = 0; i < HISTORY; i++) {
ADD("%s%d", i > 0 ? "," : "", values[(sensors_pos + i) % HISTORY]);
}
}
static void
end_acc_chart()
{
ADD("\">");
}
static
PT_THREAD(send_values(struct httpd_state *s))
{
PSOCK_BEGIN(&s->sout);
SEND_STRING(&s->sout, TOP);
if(strncmp(s->filename, "/index", 6) == 0 ||
s->filename[1] == '\0') {
/* Default page: show latest sensor values as text (does not
require Internet connection to Google for charts). */
blen = 0;
ADD("<h1>Current readings</h1>\n"
"<a href=\"a\">Acceleration</a>: (%d, %d, %d) mg<br>"
"<a href=\"t\">Temperature</a>: %u&deg; C",
acc_sensor.value(ACC_X_AXIS),
acc_sensor.value(ACC_Y_AXIS),
acc_sensor.value(ACC_Z_AXIS),
temperature_sensor.value(0)/10);
SEND_STRING(&s->sout, buf);
SEND_STRING(&s->sout, BOTTOM_HOME);
} else if(s->filename[1] == '0') {
/* Turn off leds */
leds_off(LEDS_ALL);
SEND_STRING(&s->sout, "Turned off leds!");
SEND_STRING(&s->sout, BOTTOM);
} else if(s->filename[1] == '1') {
/* Turn on leds */
leds_on(LEDS_ALL);
SEND_STRING(&s->sout, "Turned on leds!");
SEND_STRING(&s->sout, BOTTOM);
} else {
if(s->filename[1] != 't') {
start_acc_chart("Acceleration", "mg", -1100, 1100);
SEND_STRING(&s->sout, buf);
blen=0;
add_chart_values(acc_x);
ADD("|");
SEND_STRING(&s->sout, buf);
blen=0;
add_chart_values(acc_y);
ADD("|");
SEND_STRING(&s->sout, buf);
blen=0;
add_chart_values(acc_z);
end_acc_chart();
SEND_STRING(&s->sout, buf);
}
if(s->filename[1] != 'a') {
generate_chart("Temperature", "Celsius", 10, 50, temperature);
SEND_STRING(&s->sout, buf);
}
SEND_STRING(&s->sout, BOTTOM);
}
PSOCK_END(&s->sout);
}
/*---------------------------------------------------------------------------*/
httpd_simple_script_t
httpd_simple_get_script(const char *name)
{
return send_values;
}
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(web_sense_process, ev, data)
{
static struct etimer timer;
PROCESS_BEGIN();
sensors_pos = 0;
process_start(&webserver_nogui_process, NULL);
etimer_set(&timer, CLOCK_SECOND * INTERV);
SENSORS_ACTIVATE(acc_sensor);
while(1) {
PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&timer));
etimer_reset(&timer);
acc_x[sensors_pos] = acc_sensor.value(ACC_X_AXIS);
acc_y[sensors_pos] = acc_sensor.value(ACC_Y_AXIS);
acc_z[sensors_pos] = acc_sensor.value(ACC_Z_AXIS);
temperature[sensors_pos] = temperature_sensor.value(0)/10;
sensors_pos = (sensors_pos + 1) % HISTORY;
}
PROCESS_END();
}
/*---------------------------------------------------------------------------*/

View file

@ -0,0 +1,49 @@
/*
* Copyright (c) 2010, Swedish Institute of Computer Science.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*/
#ifndef __PROJECT_RPL_WEB_CONF_H__
#define __PROJECT_RPL_WEB_CONF_H__
#undef QUEUEBUF_CONF_NUM
#define QUEUEBUF_CONF_NUM 2
#undef UIP_CONF_BUFFER_SIZE
#define UIP_CONF_BUFFER_SIZE 128
#undef UIP_CONF_RECEIVE_WINDOW
#define UIP_CONF_RECEIVE_WINDOW 60
#undef WEBSERVER_CONF_CFS_CONNS
#define WEBSERVER_CONF_CFS_CONNS 2
#undef WITH_SERIAL_LINE_INPUT
#define WITH_SERIAL_LINE_INPUT 0
#endif /* __PROJECT_RPL_WEB_CONF_H__ */

View file

@ -0,0 +1,27 @@
CONTIKI_PROJECT = shell-exec-test
all: $(CONTIKI_PROJECT)
TARGET=mbxxx
COFFEE=1
ELF_LOADER=1
DEFINES=ELFLOADER_DATAMEMORY_SIZE=0x100,ELFLOADER_TEXTMEMORY_SIZE=0x100
APPS = serial-shell
PROJECT_SOURCEFILES = shell-exec.c
CONTIKI = ../../..
include $(CONTIKI)/Makefile.include
%.shell-upload: %.ce
(echo; sleep 4; echo "~K"; sleep 4; \
echo "dec64 | write $*.ce | null"; sleep 4; \
../../../tools/base64-encode < $<; sleep 4; \
echo ""; echo "~K"; echo "read $*.ce | size"; sleep 4) | make login
.PHONY: compile-executable upload-executable
compile-executable: hello-world.ce
echo Compiled Contiki executable: $<
upload-executable: hello-world.shell-upload
echo Uploaded Contiki executable: $<

View file

@ -0,0 +1,47 @@
ELFloader and shell command 'exec' example for mbxxx (STM32W) platform
======================================================================
Compiles the Contiki hello-world application as a Contiki executable (.ce).
The Contiki executable is then uploaded to the mbxxx platform via serial, and
is stored in the filesystem.
Finally, the executable is loaded via the shell command 'exec'.
NOTE:
You may have to reduce the ELF loader memory usage (/platform/sky/contiki-conf.h).
Since hello-world uses very little memory:
#define ELFLOADER_CONF_DATAMEMORY_SIZE 0x100
#define ELFLOADER_CONF_TEXTMEMORY_SIZE 0x100
1. Upload Sky shell with 'exec' command and symbols (requires several recompilations to generate correct symbols):
> make
> make CORE=shell-exec-test.mbxxx
> make shell-exec-test.flash CORE=shell-exec-test.mbxxx PORT=AUTO
2. Verify access to the shell and the filesystem:
> make login DEV=/dev/comX
SHELL> echo hello shell
SHELL> echo test | write mytest.txt
SHELL> ls
SHELL> read mytest.txt
[CTRL-C] to exit the shell
3. Upload Contiki executable hello-world.ce:
> make upload-executable DEV=/dev/comX
[CTRL-C] to exit the shell when the entire file has been uploaded (after ~30 sec)
4. Verify that hello-world.ce exists in CFS:
> make login DEV=/dev/comX
SHELL> ls
SHELL> read hello-world.ce | size
The last command output should equal the size of hello-world.ce in this directory!
5. Load and start hello world:
SHELL> exec hello-world.ce
The program should now start: the output 'Hello, World' appears.

View file

@ -0,0 +1,55 @@
/*
* Copyright (c) 2006, Swedish Institute of Computer Science.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* This file is part of the Contiki operating system.
*
*/
/**
* \file
* A very simple Contiki application showing how Contiki programs look
* \author
* Adam Dunkels <adam@sics.se>
*/
#include "contiki.h"
#include <stdio.h> /* For printf() */
/*---------------------------------------------------------------------------*/
PROCESS(hello_world_process, "Hello world process");
AUTOSTART_PROCESSES(&hello_world_process);
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(hello_world_process, ev, data)
{
PROCESS_BEGIN();
printf("Hello, world\n");
PROCESS_END();
}
/*---------------------------------------------------------------------------*/

View file

@ -0,0 +1,57 @@
/*
* Copyright (c) 2009, Swedish Institute of Computer Science.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* This file is part of the Contiki operating system.
*
*/
#include "contiki.h"
#include "shell.h"
#include "serial-shell.h"
#include "dev/watchdog.h"
/*---------------------------------------------------------------------------*/
PROCESS(shell_test_process, "Contiki shell");
AUTOSTART_PROCESSES(&shell_test_process);
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(shell_test_process, ev, data)
{
PROCESS_BEGIN();
serial_shell_init();
shell_file_init();
shell_coffee_init();
shell_text_init();
shell_exec_init();
shell_base64_init();
PROCESS_END();
}
/*---------------------------------------------------------------------------*/

View file

@ -0,0 +1,14 @@
CONTIKI_PROJECT = telnet-server
UIP_CONF_IPV6=1
APPS = telnetd
PROJECTDIRS = $(CONTIKI)/platform/mbxxx/apps
PROJECT_SOURCEFILES = shell-sensors.c
all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
include $(CONTIKI)/Makefile.include

View file

@ -0,0 +1 @@
TARGET = mbxxx

View file

@ -0,0 +1,66 @@
/*
* Copyright (c) 2006, Swedish Institute of Computer Science.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* This file is part of the Contiki operating system.
*
*/
/**
* \file
* Example showing how to use the Telnet server
* \author
* Adam Dunkels <adam@sics.se>
*/
#include "contiki-net.h"
#include "telnetd.h"
#include "shell.h"
#include "shell-sensors.h"
/*---------------------------------------------------------------------------*/
PROCESS(shell_init_process, "Shell init process");
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(shell_init_process, ev, data)
{
PROCESS_BEGIN();
shell_blink_init();
shell_ps_init();
shell_reboot_init();
//shell_text_init();
//shell_time_init();
shell_sensors_init();
PROCESS_END();
}
/*---------------------------------------------------------------------------*/
AUTOSTART_PROCESSES(&telnetd_process, &shell_init_process);
/*---------------------------------------------------------------------------*/

View file

@ -0,0 +1,6 @@
CONTIKI_PROJECT = temp-sensor
all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
include $(CONTIKI)/Makefile.include

View file

@ -0,0 +1 @@
TARGET = mbxxx

View file

@ -0,0 +1,74 @@
/*
* Copyright (c) 2010, STMicroelectronics.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* This file is part of the Contiki operating system.
*
*/
/**
* \file
* A very simple Contiki application showing how to use the temperature
* sensor.
* \author
* Salvatore Pitrulli <salvopitru@users.sourceforge.net>
*
*/
#include "contiki.h"
#include "dev/temperature-sensor.h"
#include "board.h"
#include <stdio.h> /* For printf() */
/*---------------------------------------------------------------------------*/
PROCESS(temp_process, "Temperature process");
AUTOSTART_PROCESSES(&temp_process);
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(temp_process, ev, data)
{
static struct etimer etimer;
PROCESS_BEGIN();
boardPrintStringDescription();
printf("Starting measuring temperature\r\n");
while(1) {
etimer_set(&etimer, CLOCK_SECOND);
PROCESS_WAIT_UNTIL(etimer_expired(&etimer));
unsigned int temp = temperature_sensor.value(0);
printf("Temp: %d.%d °C \r",temp/10,temp-(temp/10)*10);
}
PROCESS_END();
}
/*---------------------------------------------------------------------------*/

View file

@ -0,0 +1,8 @@
all: udp-server udp-client
UIP_CONF_IPV6=1
DEFINES=UIP_CONF_ND6_REACHABLE_TIME=0xffffffff
CONTIKI = ../../..
include $(CONTIKI)/Makefile.include

View file

@ -0,0 +1 @@
TARGET = mbxxx

View file

@ -0,0 +1,10 @@
UDP-IPv6 Client and Server
=========================
This is an example based on the udp-ipv6 example. A client periodically sends
UDP packets to a fixed server. The client will also go in a deep sleep state
during wich all system peripherals are turned off to save as more energy as
possible.
To avoid blocking the entire OS for too long time, the system periocally
wakes up to let the OS poll processes and dispatch events.

View file

@ -0,0 +1,189 @@
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* This file is part of the Contiki operating system.
*
*/
#include "contiki.h"
#include "contiki-lib.h"
#include "contiki-net.h"
#include "sleep.h"
#include "board-sensors.h"
#include "board.h"
#include <string.h>
#define DEBUG DEBUG_PRINT
#include "net/uip-debug.h"
#define SEND_INTERVAL 25 * CLOCK_SECOND
/* Seconds during which the system must be in deep sleep.
* During deep sleep all the OS is frozen. */
#define SLEEP_INTERVAL_SECONDS 6
/* System does not go to sleep until AWAKE_INTERVAL is passed.
* This is done to let IP stack receive Neigbhor Advertisements
* and eventual response packets from the server. */
#define AWAKE_INTERVAL 3 * CLOCK_SECOND
#define MAX_PAYLOAD_LEN 40
static struct uip_udp_conn *client_conn;
/*---------------------------------------------------------------------------*/
PROCESS(udp_client_process, "UDP client process");
AUTOSTART_PROCESSES(&udp_client_process);
/*---------------------------------------------------------------------------*/
static void
tcpip_handler(void)
{
char *str;
if(uip_newdata()) {
str = uip_appdata;
str[uip_datalen()] = '\0';
printf("Response from the server: '%s'\n", str);
}
}
/*---------------------------------------------------------------------------*/
static void
timeout_handler(void)
{
static int seq_id;
char buf[MAX_PAYLOAD_LEN];
printf("Client sending to: ");
PRINT6ADDR(&client_conn->ripaddr);
sprintf(buf, "Hello %d from the client", ++seq_id);
printf(" (msg: %s)\n", buf);
#if SEND_TOO_LARGE_PACKET_TO_TEST_FRAGMENTATION
uip_udp_packet_send(client_conn, buf, UIP_APPDATA_SIZE);
#else /* SEND_TOO_LARGE_PACKET_TO_TEST_FRAGMENTATION */
uip_udp_packet_send(client_conn, buf, strlen(buf));
#endif /* SEND_TOO_LARGE_PACKET_TO_TEST_FRAGMENTATION */
}
/*---------------------------------------------------------------------------*/
static void
print_local_addresses(void)
{
int i;
uint8_t state;
PRINTF("Client IPv6 addresses: ");
for(i = 0; i < UIP_DS6_ADDR_NB; i++) {
state = uip_ds6_if.addr_list[i].state;
if(uip_ds6_if.addr_list[i].isused &&
(state == ADDR_TENTATIVE || state == ADDR_PREFERRED)) {
PRINT6ADDR(&uip_ds6_if.addr_list[i].ipaddr);
PRINTF("\n");
}
}
}
/*---------------------------------------------------------------------------*/
#if UIP_CONF_ROUTER
static void
set_global_address(void)
{
uip_ipaddr_t ipaddr;
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
}
#endif /* UIP_CONF_ROUTER */
/*---------------------------------------------------------------------------*/
static void
set_connection_address(uip_ipaddr_t *ipaddr)
{
#define _QUOTEME(x) #x
#define QUOTEME(x) _QUOTEME(x)
#ifdef UDP_CONNECTION_ADDR
if(uiplib_ipaddrconv(QUOTEME(UDP_CONNECTION_ADDR), ipaddr) == 0) {
PRINTF("UDP client failed to parse address '%s'\n", QUOTEME(UDP_CONNECTION_ADDR));
}
#elif UIP_CONF_ROUTER
uip_ip6addr(ipaddr,0xaaaa,0,0,0,0x0280,0xe102,0x0000,0x008a);
#else
uip_ip6addr(ipaddr,0xfe80,0,0,0,0x0280,0xe102,0x0000,0x008a);
#endif /* UDP_CONNECTION_ADDR */
}
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(udp_client_process, ev, data)
{
static struct etimer et, wake_timer, periodic_timer;
uip_ipaddr_t ipaddr;
PROCESS_BEGIN();
PRINTF("UDP client process started\n");
#if UIP_CONF_ROUTER
set_global_address();
#endif
print_local_addresses();
set_connection_address(&ipaddr);
/* new connection with remote host */
client_conn = udp_new(&ipaddr, UIP_HTONS(3000), NULL);
udp_bind(client_conn, UIP_HTONS(3001));
PRINTF("Created a connection with the server ");
PRINT6ADDR(&client_conn->ripaddr);
PRINTF(" local/remote port %u/%u\n",
UIP_HTONS(client_conn->lport), UIP_HTONS(client_conn->rport));
etimer_set(&et, CLOCK_SECOND*10);
PROCESS_WAIT_UNTIL(etimer_expired(&et)); // Wait for DAD and Router Discovery procedure to end.
etimer_set(&et, SEND_INTERVAL);
etimer_set(&wake_timer, AWAKE_INTERVAL);
etimer_set(&periodic_timer, 1);
while(1) {
PROCESS_YIELD();
if(etimer_expired(&wake_timer)){ // if timer hasn't expired do not go in deep sleep, in order to receive a response.
printf("Sleeping...\r\n");
halBoardPowerDown();//sensorsPowerDown();
sleep_seconds(SLEEP_INTERVAL_SECONDS); // Put system in deep sleep mode for a while.
halBoardPowerUp();//sensorsPowerUp();
printf("Awake\r\n");
}
if(etimer_expired(&et)) {
timeout_handler();
etimer_restart(&et);
etimer_restart(&wake_timer);
} else if(ev == tcpip_event) {
tcpip_handler();
}
/* Make the process be called almost immediately,
* so that it can force the system to go into deep sleep. */
etimer_restart(&periodic_timer);
}
PROCESS_END();
}
/*---------------------------------------------------------------------------*/

View file

@ -0,0 +1,117 @@
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* This file is part of the Contiki operating system.
*
*/
#include "contiki.h"
#include "contiki-lib.h"
#include "contiki-net.h"
#include <string.h>
#define DEBUG DEBUG_PRINT
#include "net/uip-debug.h"
#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
#define MAX_PAYLOAD_LEN 120
static struct uip_udp_conn *server_conn;
PROCESS(udp_server_process, "UDP server process");
AUTOSTART_PROCESSES(&udp_server_process);
/*---------------------------------------------------------------------------*/
static void
tcpip_handler(void)
{
static int seq_id;
char buf[MAX_PAYLOAD_LEN];
if(uip_newdata()) {
((char *)uip_appdata)[uip_datalen()] = 0;
PRINTF("Server received: '%s' from ", (char *)uip_appdata);
PRINT6ADDR(&UIP_IP_BUF->srcipaddr);
PRINTF("\n");
uip_ipaddr_copy(&server_conn->ripaddr, &UIP_IP_BUF->srcipaddr);
PRINTF("Responding with message: ");
sprintf(buf, "Hello from the server! (%d)", ++seq_id);
PRINTF("%s\n", buf);
uip_udp_packet_send(server_conn, buf, strlen(buf));
/* Restore server connection to allow data from any node */
memset(&server_conn->ripaddr, 0, sizeof(server_conn->ripaddr));
}
}
/*---------------------------------------------------------------------------*/
static void
print_local_addresses(void)
{
int i;
uint8_t state;
PRINTF("Server IPv6 addresses: ");
for(i = 0; i < UIP_DS6_ADDR_NB; i++) {
state = uip_ds6_if.addr_list[i].state;
if(uip_ds6_if.addr_list[i].isused &&
(state == ADDR_TENTATIVE || state == ADDR_PREFERRED)) {
PRINT6ADDR(&uip_ds6_if.addr_list[i].ipaddr);
PRINTF("\n");
}
}
}
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(udp_server_process, ev, data)
{
#if UIP_CONF_ROUTER
uip_ipaddr_t ipaddr;
#endif /* UIP_CONF_ROUTER */
PROCESS_BEGIN();
PRINTF("UDP server started\n");
#if UIP_CONF_ROUTER
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
#endif /* UIP_CONF_ROUTER */
print_local_addresses();
server_conn = udp_new(NULL, UIP_HTONS(3001), NULL);
udp_bind(server_conn, UIP_HTONS(3000));
while(1) {
PROCESS_YIELD();
if(ev == tcpip_event) {
tcpip_handler();
}
}
PROCESS_END();
}
/*---------------------------------------------------------------------------*/

View file

@ -0,0 +1,17 @@
CONTIKI_PROJECT = mbxxx-webserver
all: $(CONTIKI_PROJECT)
DEFINES=PROJECT_CONF_H=\"webserver-ajax-conf.h\"
UIP_CONF_IPV6=1
#APPS = webserver
PROJECTDIRS = . $(CONTIKI)/apps/webserver
PROJECT_SOURCEFILES = ajax-cgi.c httpd-fs.c http-strings.c \
httpd.c webserver-dsc.c webserver-nogui.c
CONTIKI = ../../..
include $(CONTIKI)/Makefile.include

View file

@ -0,0 +1 @@
TARGET = mbxxx

View file

@ -0,0 +1,12 @@
webserver ajax
==============
Compile with WITH_RIME 1 for neighbor discovery and with ENERGEST_CONF_ON
for energy estimation.
Estimated consumption with batteries (2.4 V):
Curr Power
ENERGEST_TYPE_CPU: 7.5 mA 18 mW
ENERGEST_TYPE_LPM: 3 mA 7.2 mW
ENERGEST_TYPE_TRANSMIT: 21 mA 50.4 mW
ENERGEST_TYPE_LISTEN: 19 mA 45.6 mW

View file

@ -0,0 +1,287 @@
/*
* Copyright (c) 2001, Adam Dunkels.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This file is part of the uIP TCP/IP stack.
*
*
*/
/*
* This file includes functions that are called by the web server
* scripts. The functions takes no argument, and the return value is
* interpreted as follows. A zero means that the function did not
* complete and should be invoked for the next packet as well. A
* non-zero value indicates that the function has completed and that
* the web server should move along to the next script line.
*
*/
#include <stdio.h>
#include <string.h>
#include "contiki-net.h"
#include "net/rime/collect-neighbor.h"
#include "httpd.h"
#include "httpd-cgi.h"
#include "httpd-fs.h"
#include "lib/petsciiconv.h"
#include "dev/temperature-sensor.h"
#include "dev/acc-sensor.h"
static struct httpd_cgi_call *calls = NULL;
/*---------------------------------------------------------------------------*/
static
PT_THREAD(nullfunction(struct httpd_state *s, char *ptr))
{
PSOCK_BEGIN(&s->sout);
PSOCK_END(&s->sout);
}
/*---------------------------------------------------------------------------*/
httpd_cgifunction
httpd_cgi(char *name)
{
struct httpd_cgi_call *f;
/* Find the matching name in the table, return the function. */
for(f = calls; f != NULL; f = f->next) {
if(strncmp(f->name, name, strlen(f->name)) == 0) {
return f->function;
}
}
return nullfunction;
}
/*---------------------------------------------------------------------------*/
static
PT_THREAD(nodeidcall(struct httpd_state *s, char *ptr))
{
static char buf[24];
PSOCK_BEGIN(&s->sout);
snprintf(buf, sizeof(buf), "%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X",
rimeaddr_node_addr.u8[0],
rimeaddr_node_addr.u8[1],
rimeaddr_node_addr.u8[2],
rimeaddr_node_addr.u8[3],
rimeaddr_node_addr.u8[4],
rimeaddr_node_addr.u8[5],
rimeaddr_node_addr.u8[6],
rimeaddr_node_addr.u8[7]);
PSOCK_SEND_STR(&s->sout, buf);
PSOCK_END(&s->sout);
}
/*---------------------------------------------------------------------------*/
void
httpd_cgi_add(struct httpd_cgi_call *c)
{
struct httpd_cgi_call *l;
c->next = NULL;
if(calls == NULL) {
calls = c;
} else {
for(l = calls; l->next != NULL; l = l->next);
l->next = c;
}
}
/*---------------------------------------------------------------------------*/
static
PT_THREAD(sensorscall(struct httpd_state *s, char *ptr))
{
static struct timer t;
static int i;
static char buf[100];
static unsigned long last_cpu, last_lpm, last_listen, last_transmit;
PSOCK_BEGIN(&s->sout);
timer_set(&t, CLOCK_SECOND);
SENSORS_ACTIVATE(acc_sensor);
snprintf(buf, sizeof(buf),
"t(%d);ax(%d);ay(%d);az(%d);",
temperature_sensor.value(0),
acc_sensor.value(ACC_X_AXIS),
acc_sensor.value(ACC_Y_AXIS),
acc_sensor.value(ACC_Z_AXIS));
SENSORS_DEACTIVATE(acc_sensor);
PSOCK_SEND_STR(&s->sout, buf);
snprintf(buf, sizeof(buf),
"p(%lu,%lu,%lu,%lu);v(%d);",
energest_type_time(ENERGEST_TYPE_CPU) - last_cpu,
energest_type_time(ENERGEST_TYPE_LPM) - last_lpm,
energest_type_time(ENERGEST_TYPE_TRANSMIT) - last_transmit,
energest_type_time(ENERGEST_TYPE_LISTEN) - last_listen,
i++);
last_cpu = energest_type_time(ENERGEST_TYPE_CPU);
last_lpm = energest_type_time(ENERGEST_TYPE_LPM);
last_transmit = energest_type_time(ENERGEST_TYPE_TRANSMIT);
last_listen = energest_type_time(ENERGEST_TYPE_LISTEN);
PSOCK_SEND_STR(&s->sout, buf);
PSOCK_END(&s->sout);
}
/*---------------------------------------------------------------------------*/
#if 0
static unsigned short
make_neighbor(void *arg)
{
struct httpd_state *s = (struct httpd_state *)arg;
struct collect_neighbor *n = collect_neighbor_get(s->u.count);
if(n == NULL) {
return 0;
}
#if !UIP_CONF_IPV6
return snprintf((char *)uip_appdata, uip_mss(),
"<li><a href=\"http://172.16.%d.%d/\">%d.%d</a>\r\n",
n->addr.u8[0], n->addr.u8[1],
n->addr.u8[0], n->addr.u8[1]);
#else
#if 0
uip_ipaddr_t ipaddr;
char ipaddr_str[41];
uip_ip6addr(&ipaddr, NET_ADDR_A, NET_ADDR_B, NET_ADDR_C, NET_ADDR_D,
(uint16_t)(((uint16_t)(n->addr.u8[0]^0x02))<<8 | (uint16_t)n->addr.u8[1]),
((uint16_t)(n->addr.u8[2]))<<8 | (uint16_t)n->addr.u8[3],
(uint16_t)(n->addr.u8[4])<<8 | n->addr.u8[5],
(uint16_t)(n->addr.u8[6])<<8 | n->addr.u8[7]);
httpd_sprint_ip6(ipaddr, ipaddr_str);
return snprintf((char *)uip_appdata, uip_mss(),
"<li><a href=\"http://%s/\">%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X</a>\r\n",
ipaddr_str,
n->addr.u8[0],
n->addr.u8[1],
n->addr.u8[2],
n->addr.u8[3],
n->addr.u8[4],
n->addr.u8[5],
n->addr.u8[6],
n->addr.u8[7]);
#endif
/* Automatic generation of node address. Javascript funcion required.
* Client-side generation is simpler than server-side, as parsing http header
* would be requied.
*/
return snprintf((char *)uip_appdata, uip_mss(),
"<li><a id=node name='%x:%x:%x:%x'>%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X</a>\r\n",
(uint16_t)(((uint16_t)(n->addr.u8[0]^0x02))<<8 | (uint16_t)n->addr.u8[1]),
((uint16_t)(n->addr.u8[2]))<<8 | (uint16_t)n->addr.u8[3],
(uint16_t)(n->addr.u8[4])<<8 | n->addr.u8[5],
(uint16_t)(n->addr.u8[6])<<8 | n->addr.u8[7],
n->addr.u8[0],
n->addr.u8[1],
n->addr.u8[2],
n->addr.u8[3],
n->addr.u8[4],
n->addr.u8[5],
n->addr.u8[6],
n->addr.u8[7]);
#endif /* UIP_CONF_IPV6 */
}
/*---------------------------------------------------------------------------*/
static
PT_THREAD(neighborscall(struct httpd_state *s, char *ptr))
{
PSOCK_BEGIN(&s->sout);
announcement_listen(1);
/* printf("neighbor_num %d\n", neighbor_num());*/
for(s->u.count = 0; s->u.count < collect_neighbor_num(); s->u.count++) {
/* printf("count %d\n", s->u.count);*/
if(collect_neighbor_get(s->u.count) != NULL) {
/* printf("!= NULL\n");*/
PSOCK_GENERATOR_SEND(&s->sout, make_neighbor, s);
}
}
PSOCK_END(&s->sout);
}
/*---------------------------------------------------------------------------*/
static void
received_announcement(struct announcement *a, const rimeaddr_t *from,
uint16_t id, uint16_t value)
{
struct collect_neighbor *n;
/* printf("adv_received %d.%d\n", from->u8[0], from->u8[1]);*/
n = collect_neighbor_find(from);
if(n == NULL) {
collect_neighbor_add(from, value, 1);
} else {
collect_neighbor_update(n, value);
}
}
#endif
/*static const struct neighbor_discovery_callbacks neighbor_discovery_callbacks =
{ adv_received, NULL};*/
HTTPD_CGI_CALL(sensors, "sensors", sensorscall);
HTTPD_CGI_CALL(nodeid, "nodeid", nodeidcall);
//HTTPD_CGI_CALL(neighbors, "neighbors", neighborscall);
/*static struct neighbor_discovery_conn conn;*/
//static struct announcement announcement;
void
httpd_cgi_init(void)
{
httpd_cgi_add(&sensors);
httpd_cgi_add(&nodeid);
/* httpd_cgi_add(&neighbors);
announcement_register(&announcement, 31,
received_announcement);
announcement_listen(2);*/
/* neighbor_discovery_open(&conn, 31,
CLOCK_SECOND * 4,
CLOCK_SECOND * 20,
CLOCK_SECOND * 60,
&neighbor_discovery_callbacks);
neighbor_discovery_start(&conn, 0);*/
}
/*---------------------------------------------------------------------------*/

View file

@ -0,0 +1,127 @@
/*
* Copyright (c) 2001, Swedish Institute of Computer Science.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* This file is part of the lwIP TCP/IP stack.
*
* Author: Adam Dunkels <adam@sics.se>
*
*/
#include "contiki-net.h"
#include "httpd.h"
#include "httpd-fs.h"
#include "httpd-fsdata.h"
#include "httpd-fsdata.c"
#if HTTPD_FS_STATISTICS
static uint16_t count[HTTPD_FS_NUMFILES];
#endif /* HTTPD_FS_STATISTICS */
/*-----------------------------------------------------------------------------------*/
static uint8_t
httpd_fs_strcmp(const char *str1, const char *str2)
{
uint8_t i;
i = 0;
loop:
if(str2[i] == 0 ||
str1[i] == '\r' ||
str1[i] == '\n') {
return 0;
}
if(str1[i] != str2[i]) {
return 1;
}
++i;
goto loop;
}
/*-----------------------------------------------------------------------------------*/
int
httpd_fs_open(const char *name, struct httpd_fs_file *file)
{
#if HTTPD_FS_STATISTICS
uint16_t i = 0;
#endif /* HTTPD_FS_STATISTICS */
struct httpd_fsdata_file_noconst *f;
for(f = (struct httpd_fsdata_file_noconst *)HTTPD_FS_ROOT;
f != NULL;
f = (struct httpd_fsdata_file_noconst *)f->next) {
if(httpd_fs_strcmp(name, f->name) == 0) {
file->data = f->data;
file->len = f->len - 1;
#if HTTPD_FS_STATISTICS
++count[i];
#endif /* HTTPD_FS_STATISTICS */
return 1;
}
#if HTTPD_FS_STATISTICS
++i;
#endif /* HTTPD_FS_STATISTICS */
}
return 0;
}
/*-----------------------------------------------------------------------------------*/
void
httpd_fs_init(void)
{
#if HTTPD_FS_STATISTICS
uint16_t i;
for(i = 0; i < HTTPD_FS_NUMFILES; i++) {
count[i] = 0;
}
#endif /* HTTPD_FS_STATISTICS */
}
/*-----------------------------------------------------------------------------------*/
#if HTTPD_FS_STATISTICS
uint16_t
httpd_fs_count(char *name)
{
struct httpd_fsdata_file_noconst *f;
uint16_t i;
i = 0;
for(f = (struct httpd_fsdata_file_noconst *)HTTPD_FS_ROOT;
f != NULL;
f = (struct httpd_fsdata_file_noconst *)f->next) {
if(httpd_fs_strcmp(name, f->name) == 0) {
return count[i];
}
++i;
}
return 0;
}
#endif /* HTTPD_FS_STATISTICS */
/*-----------------------------------------------------------------------------------*/

View file

@ -0,0 +1,8 @@
<html>
<body bgcolor="white">
<center>
<h1>404 - file not found</h1>
<h3>Go <a href="/">here</a> instead.</h3>
</center>
</body>
</html>

View file

@ -0,0 +1,3 @@
</table>
</body>
</html>

View file

@ -0,0 +1,12 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Contiki</title>
</head>
<body bgcolor="white" onload="load()">
<table border=0 cellpadding=4 cellspacing=4><tr><td valign="top" align="right">
<h1>Contiki&nbsp;</h1>
<a href="/">Front page</a><br>
<a href="neighbors.shtml">Neighbors</a><br>
<a href="sensors.shtml">Sensors</a><br>
</td><td valign="top" align="left">

View file

@ -0,0 +1,15 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Contiki</title>
</head>
<body bgcolor="white">
<table border=0 cellpadding=4 cellspacing=4><tr><td valign="top" align="right">
<h1>Contiki&nbsp;</h1>
<a href="/">Front page</a><br>
<a href="neighbors.shtml">Neighbors</a><br>
<a href="sensors.shtml">Sensors</a><br>
</td><td valign="top" align="left">
</table>
</body>
</html>

View file

@ -0,0 +1,49 @@
%!: /header.html
<script type="text/javascript">
function load() {
a=document.anchors;
for(i=0; i<a.length;i++){
if(a[i].id=='node')
a[i].href="http://"+addrgen(a[i].name)+"/"
}
}
function addrgen(iid)
{
haddr=document.location.host;
addr=haddr;
ie7ll=0;sep=':';esc='%25';
if(addr.search(/ipv6-literal.net/)!=-1){
ie7ll=1;sep='-';esc='s';iid=iid.replace(/:/g,'-');
}
ncol=addr.replace(/ipv6-literal.net/,'').match(/[:-]/g).length;
n=0;indtot=0;
addr=haddr;
while(n<4 && (ind=addr.indexOf(sep))!=-1){
n++;
if(addr.charAt(ind+1)==sep)
n+=7-ncol;
addr=addr.slice(ind+1);
indtot+=ind+1;
}
if(ind==-1) return;
newaddr = haddr.slice(0,indtot)+iid;
oldiid = haddr.slice(indtot);
end=oldiid.search(/[^0-9a-f:-]/i);
if(end!=-1)
newaddr = newaddr+oldiid.slice(end);
if(!ie7ll&&newaddr.charAt(0)!='[')
newaddr='['+newaddr+']';
if(navigator.userAgent.search(/Firefox/i)==-1)
newaddr=newaddr.replace('%',esc);
return newaddr;
}
</script>
<h1>Node
%! nodeid
</h1>
<h2>Neighbors</h2>
<ul>
%! neighbors
</ul>
%!: /footer.html

View file

@ -0,0 +1 @@
%! sensors

View file

@ -0,0 +1,121 @@
%!: /header.html
<script type="text/javascript">
var start;
i = new Image(50,60)
i.src = "spin.gif"
function load() {
var img = document.getElementById("spin");
img.innerHTML = '&nbsp;';
loadSensordata();
}
function loadSensordata() {
var r;
try { r = new XMLHttpRequest(); }
catch(e) {
try { r = new ActiveXObject("Msxml2.XMLHTTP"); }
catch(e) {
try { r = new ActiveXObject("Microsoft.XMLHTTP"); }
catch(e) {
alert("Your browser does not support AJAX!");
return false;
}
}
}
start = new Date();
r.open("GET", "/sensordata.shtml", true);
r.setRequestHeader("If-Modified-Since","Sat, 1 Jan 2000 00:00:00 GMT");
r.onreadystatechange = function() {
if(r.readyState==1) {
var img = document.getElementById("spin");
img.innerHTML = '<img src="spin.gif">';
}
if(r.readyState==4) {
var img = document.getElementById("spin");
img.innerHTML = 'took ' +
((new Date()).getTime()-start.getTime())/1000+
' seconds';
eval(r.responseText);
}
}
r.send(null);
}
function e(el) {
d = document;
if(d.getElementById) {
return d.getElementById(el);
} else if (d.all) {
return d.all[el];
}
}
function s(el,n,max,text) {
e(el).innerHTML = '<table width=504 border=0 cellpadding=1 cellspacing=0>'+
'<tr><td width=200>' +
text + '</td>' +
'<td width=' + (300*n/max) + ' bgcolor="gray">&nbsp;</td>' +
'<td width=' + (300-300*n/max) + ' bgcolor="lightgray">&nbsp;</td>' +
'</table>';
}
function dc(n,d) {
return n.toFixed(d);
}
function t(m) {
n = dc(m/10, 1);
s('temp',n,40,'Temperature '+n+' &deg;C');
}
function ax(m) {
n = m;
s('accx',n+2000,4000,'Acceleration (X-axis) '+n+'mg');
}
function ay(m) {
n = m;
s('accy',n+2000,4000,'Acceleration (Y-axis) '+n+'mg');
}
function az(m) {
n = m;
s('accz',n+2000,4000,'Acceleration (Z-axis) '+n+'mg');
}
function rs(m) {
n = m + 45;
s('rs',n,100,'RSSI '+n);
}
function p(c,l,t,r) {
tm=c+l;
cp=c*18/tm;
lp=l*7.2/tm;
lt=t*50.4/tm;
lr=r*45.6/tm;
n=cp+lp+lt+lr;
s('p',n,100,'Power consumption '+dc(n,2)+' mW');
s('pc',cp,100,'CPU power '+dc(cp,2)+' mW');
s('pl',lp,100,'LPM power '+dc(lp,2)+' mW');
s('pr',lr,100,'Radio RX power '+dc(lr,2)+' mW');
s('pt',lt,100,'Radio TX power '+dc(lt,2)+' mW');
}
function v(n) {
e('v').innerHTML = n;
}
</script>
<h1>Node
%! nodeid
</h1>
<a href="javascript:loadSensordata();">Reload</a>
<span id="spin"> </span>
<h2>Environment</h2>
<div id="temp"></div>
<div id="accx"></div>
<div id="accy"></div>
<div id="accz"></div>
<h2>Power</h2>
<div id="p"></div>
<div id="pc"></div>
<div id="pl"></div>
<div id="pr"></div>
<div id="pt"></div>
<br></br>
<div id="v"></div>
%!: /footer.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 B

View file

@ -0,0 +1,539 @@
static const char data_sensordata_shtml[] = {
/* /sensordata.shtml */
0x2f, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0,
0x25, 0x21, 0x20, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73,
0xa, 0};
static const char data_sensors_shtml[] = {
/* /sensors.shtml */
0x2f, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0,
0x25, 0x21, 0x3A, 0x20, 0x2F, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2E,
0x68, 0x74, 0x6D, 0x6C, 0x0A, 0x3C, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
0x20, 0x74, 0x79, 0x70, 0x65, 0x3D, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2F,
0x6A, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x3E,
0x0A, 0x76, 0x61, 0x72, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x3B, 0x0A,
0x0A, 0x69, 0x20, 0x3D, 0x20, 0x6E, 0x65, 0x77, 0x20, 0x49, 0x6D, 0x61,
0x67, 0x65, 0x28, 0x35, 0x30, 0x2C, 0x36, 0x30, 0x29, 0x0A, 0x69, 0x2E,
0x73, 0x72, 0x63, 0x20, 0x3D, 0x20, 0x22, 0x73, 0x70, 0x69, 0x6E, 0x2E,
0x67, 0x69, 0x66, 0x22, 0x0A, 0x0A, 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69,
0x6F, 0x6E, 0x20, 0x6C, 0x6F, 0x61, 0x64, 0x28, 0x29, 0x20, 0x7B, 0x0A,
0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x69, 0x6D, 0x67, 0x20, 0x3D, 0x20,
0x64, 0x6F, 0x63, 0x75, 0x6D, 0x65, 0x6E, 0x74, 0x2E, 0x67, 0x65, 0x74,
0x45, 0x6C, 0x65, 0x6D, 0x65, 0x6E, 0x74, 0x42, 0x79, 0x49, 0x64, 0x28,
0x22, 0x73, 0x70, 0x69, 0x6E, 0x22, 0x29, 0x3B, 0x0A, 0x20, 0x20, 0x69,
0x6D, 0x67, 0x2E, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x48, 0x54, 0x4D, 0x4C,
0x20, 0x3D, 0x20, 0x27, 0x26, 0x6E, 0x62, 0x73, 0x70, 0x3B, 0x27, 0x3B,
0x0A, 0x20, 0x20, 0x6C, 0x6F, 0x61, 0x64, 0x53, 0x65, 0x6E, 0x73, 0x6F,
0x72, 0x64, 0x61, 0x74, 0x61, 0x28, 0x29, 0x3B, 0x0A, 0x7D, 0x0A, 0x0A,
0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x6C, 0x6F, 0x61,
0x64, 0x53, 0x65, 0x6E, 0x73, 0x6F, 0x72, 0x64, 0x61, 0x74, 0x61, 0x28,
0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x72, 0x3B,
0x0A, 0x20, 0x20, 0x74, 0x72, 0x79, 0x20, 0x7B, 0x20, 0x72, 0x20, 0x3D,
0x20, 0x6E, 0x65, 0x77, 0x20, 0x58, 0x4D, 0x4C, 0x48, 0x74, 0x74, 0x70,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x28, 0x29, 0x3B, 0x20, 0x7D,
0x0A, 0x20, 0x20, 0x63, 0x61, 0x74, 0x63, 0x68, 0x28, 0x65, 0x29, 0x20,
0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x74, 0x72, 0x79, 0x20, 0x7B, 0x20,
0x72, 0x20, 0x3D, 0x20, 0x6E, 0x65, 0x77, 0x20, 0x41, 0x63, 0x74, 0x69,
0x76, 0x65, 0x58, 0x4F, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x28, 0x22, 0x4D,
0x73, 0x78, 0x6D, 0x6C, 0x32, 0x2E, 0x58, 0x4D, 0x4C, 0x48, 0x54, 0x54,
0x50, 0x22, 0x29, 0x3B, 0x20, 0x7D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x63,
0x61, 0x74, 0x63, 0x68, 0x28, 0x65, 0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x74, 0x72, 0x79, 0x20, 0x7B, 0x20, 0x72, 0x20,
0x3D, 0x20, 0x6E, 0x65, 0x77, 0x20, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65,
0x58, 0x4F, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x28, 0x22, 0x4D, 0x69, 0x63,
0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x2E, 0x58, 0x4D, 0x4C, 0x48, 0x54,
0x54, 0x50, 0x22, 0x29, 0x3B, 0x20, 0x7D, 0x0A, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x63, 0x61, 0x74, 0x63, 0x68, 0x28, 0x65, 0x29, 0x20, 0x7B,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x6C, 0x65,
0x72, 0x74, 0x28, 0x22, 0x59, 0x6F, 0x75, 0x72, 0x20, 0x62, 0x72, 0x6F,
0x77, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6F, 0x65, 0x73, 0x20, 0x6E, 0x6F,
0x74, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6F, 0x72, 0x74, 0x20, 0x41, 0x4A,
0x41, 0x58, 0x21, 0x22, 0x29, 0x3B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6E, 0x20, 0x66, 0x61,
0x6C, 0x73, 0x65, 0x3B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x0A, 0x20, 0x20, 0x7D, 0x0A, 0x20,
0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x3D, 0x20, 0x6E, 0x65, 0x77,
0x20, 0x44, 0x61, 0x74, 0x65, 0x28, 0x29, 0x3B, 0x0A, 0x20, 0x20, 0x72,
0x2E, 0x6F, 0x70, 0x65, 0x6E, 0x28, 0x22, 0x47, 0x45, 0x54, 0x22, 0x2C,
0x20, 0x22, 0x2F, 0x73, 0x65, 0x6E, 0x73, 0x6F, 0x72, 0x64, 0x61, 0x74,
0x61, 0x2E, 0x73, 0x68, 0x74, 0x6D, 0x6C, 0x22, 0x2C, 0x20, 0x74, 0x72,
0x75, 0x65, 0x29, 0x3B, 0x0A, 0x20, 0x20, 0x72, 0x2E, 0x73, 0x65, 0x74,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65,
0x72, 0x28, 0x22, 0x49, 0x66, 0x2D, 0x4D, 0x6F, 0x64, 0x69, 0x66, 0x69,
0x65, 0x64, 0x2D, 0x53, 0x69, 0x6E, 0x63, 0x65, 0x22, 0x2C, 0x22, 0x53,
0x61, 0x74, 0x2C, 0x20, 0x31, 0x20, 0x4A, 0x61, 0x6E, 0x20, 0x32, 0x30,
0x30, 0x30, 0x20, 0x30, 0x30, 0x3A, 0x30, 0x30, 0x3A, 0x30, 0x30, 0x20,
0x47, 0x4D, 0x54, 0x22, 0x29, 0x3B, 0x0A, 0x20, 0x20, 0x72, 0x2E, 0x6F,
0x6E, 0x72, 0x65, 0x61, 0x64, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x63,
0x68, 0x61, 0x6E, 0x67, 0x65, 0x20, 0x3D, 0x20, 0x66, 0x75, 0x6E, 0x63,
0x74, 0x69, 0x6F, 0x6E, 0x28, 0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20,
0x20, 0x69, 0x66, 0x28, 0x72, 0x2E, 0x72, 0x65, 0x61, 0x64, 0x79, 0x53,
0x74, 0x61, 0x74, 0x65, 0x3D, 0x3D, 0x31, 0x29, 0x20, 0x7B, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x69, 0x6D, 0x67,
0x20, 0x3D, 0x20, 0x64, 0x6F, 0x63, 0x75, 0x6D, 0x65, 0x6E, 0x74, 0x2E,
0x67, 0x65, 0x74, 0x45, 0x6C, 0x65, 0x6D, 0x65, 0x6E, 0x74, 0x42, 0x79,
0x49, 0x64, 0x28, 0x22, 0x73, 0x70, 0x69, 0x6E, 0x22, 0x29, 0x3B, 0x0A,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6D, 0x67, 0x2E, 0x69, 0x6E,
0x6E, 0x65, 0x72, 0x48, 0x54, 0x4D, 0x4C, 0x20, 0x3D, 0x20, 0x27, 0x3C,
0x69, 0x6D, 0x67, 0x20, 0x73, 0x72, 0x63, 0x3D, 0x22, 0x73, 0x70, 0x69,
0x6E, 0x2E, 0x67, 0x69, 0x66, 0x22, 0x3E, 0x27, 0x3B, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x7D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x28, 0x72,
0x2E, 0x72, 0x65, 0x61, 0x64, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x3D,
0x3D, 0x34, 0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x76, 0x61, 0x72, 0x20, 0x69, 0x6D, 0x67, 0x20, 0x3D, 0x20, 0x64, 0x6F,
0x63, 0x75, 0x6D, 0x65, 0x6E, 0x74, 0x2E, 0x67, 0x65, 0x74, 0x45, 0x6C,
0x65, 0x6D, 0x65, 0x6E, 0x74, 0x42, 0x79, 0x49, 0x64, 0x28, 0x22, 0x73,
0x70, 0x69, 0x6E, 0x22, 0x29, 0x3B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x69, 0x6D, 0x67, 0x2E, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x48, 0x54,
0x4D, 0x4C, 0x20, 0x3D, 0x20, 0x27, 0x74, 0x6F, 0x6F, 0x6B, 0x20, 0x27,
0x20, 0x20, 0x2B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x28, 0x28, 0x6E, 0x65, 0x77, 0x20, 0x44, 0x61, 0x74, 0x65,
0x28, 0x29, 0x29, 0x2E, 0x67, 0x65, 0x74, 0x54, 0x69, 0x6D, 0x65, 0x28,
0x29, 0x2D, 0x73, 0x74, 0x61, 0x72, 0x74, 0x2E, 0x67, 0x65, 0x74, 0x54,
0x69, 0x6D, 0x65, 0x28, 0x29, 0x29, 0x2F, 0x31, 0x30, 0x30, 0x30, 0x2B,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x27,
0x20, 0x73, 0x65, 0x63, 0x6F, 0x6E, 0x64, 0x73, 0x27, 0x3B, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x76, 0x61, 0x6C, 0x28, 0x72, 0x2E,
0x72, 0x65, 0x73, 0x70, 0x6F, 0x6E, 0x73, 0x65, 0x54, 0x65, 0x78, 0x74,
0x29, 0x3B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x0A, 0x20, 0x20, 0x7D,
0x0A, 0x20, 0x20, 0x72, 0x2E, 0x73, 0x65, 0x6E, 0x64, 0x28, 0x6E, 0x75,
0x6C, 0x6C, 0x29, 0x3B, 0x0A, 0x7D, 0x0A, 0x0A, 0x66, 0x75, 0x6E, 0x63,
0x74, 0x69, 0x6F, 0x6E, 0x20, 0x65, 0x28, 0x65, 0x6C, 0x29, 0x20, 0x7B,
0x0A, 0x20, 0x20, 0x64, 0x20, 0x3D, 0x20, 0x64, 0x6F, 0x63, 0x75, 0x6D,
0x65, 0x6E, 0x74, 0x3B, 0x0A, 0x20, 0x20, 0x69, 0x66, 0x28, 0x64, 0x2E,
0x67, 0x65, 0x74, 0x45, 0x6C, 0x65, 0x6D, 0x65, 0x6E, 0x74, 0x42, 0x79,
0x49, 0x64, 0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65,
0x74, 0x75, 0x72, 0x6E, 0x20, 0x64, 0x2E, 0x67, 0x65, 0x74, 0x45, 0x6C,
0x65, 0x6D, 0x65, 0x6E, 0x74, 0x42, 0x79, 0x49, 0x64, 0x28, 0x65, 0x6C,
0x29, 0x3B, 0x0A, 0x20, 0x20, 0x7D, 0x20, 0x65, 0x6C, 0x73, 0x65, 0x20,
0x69, 0x66, 0x20, 0x28, 0x64, 0x2E, 0x61, 0x6C, 0x6C, 0x29, 0x20, 0x7B,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6E, 0x20,
0x64, 0x2E, 0x61, 0x6C, 0x6C, 0x5B, 0x65, 0x6C, 0x5D, 0x3B, 0x0A, 0x20,
0x20, 0x7D, 0x0A, 0x7D, 0x0A, 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F,
0x6E, 0x20, 0x73, 0x28, 0x65, 0x6C, 0x2C, 0x6E, 0x2C, 0x6D, 0x61, 0x78,
0x2C, 0x74, 0x65, 0x78, 0x74, 0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x65,
0x28, 0x65, 0x6C, 0x29, 0x2E, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x48, 0x54,
0x4D, 0x4C, 0x20, 0x3D, 0x20, 0x27, 0x3C, 0x74, 0x61, 0x62, 0x6C, 0x65,
0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3D, 0x35, 0x30, 0x34, 0x20, 0x62,
0x6F, 0x72, 0x64, 0x65, 0x72, 0x3D, 0x30, 0x20, 0x63, 0x65, 0x6C, 0x6C,
0x70, 0x61, 0x64, 0x64, 0x69, 0x6E, 0x67, 0x3D, 0x31, 0x20, 0x63, 0x65,
0x6C, 0x6C, 0x73, 0x70, 0x61, 0x63, 0x69, 0x6E, 0x67, 0x3D, 0x30, 0x3E,
0x27, 0x2B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x27,
0x3C, 0x74, 0x72, 0x3E, 0x3C, 0x74, 0x64, 0x20, 0x77, 0x69, 0x64, 0x74,
0x68, 0x3D, 0x32, 0x30, 0x30, 0x3E, 0x27, 0x20, 0x2B, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x65, 0x78, 0x74, 0x20, 0x2B,
0x20, 0x27, 0x3C, 0x2F, 0x74, 0x64, 0x3E, 0x27, 0x20, 0x2B, 0x0A, 0x09,
0x09, 0x20, 0x20, 0x20, 0x20, 0x27, 0x3C, 0x74, 0x64, 0x20, 0x77, 0x69,
0x64, 0x74, 0x68, 0x3D, 0x27, 0x20, 0x2B, 0x20, 0x28, 0x33, 0x30, 0x30,
0x2A, 0x6E, 0x2F, 0x6D, 0x61, 0x78, 0x29, 0x20, 0x2B, 0x20, 0x27, 0x20,
0x62, 0x67, 0x63, 0x6F, 0x6C, 0x6F, 0x72, 0x3D, 0x22, 0x67, 0x72, 0x61,
0x79, 0x22, 0x3E, 0x26, 0x6E, 0x62, 0x73, 0x70, 0x3B, 0x3C, 0x2F, 0x74,
0x64, 0x3E, 0x27, 0x20, 0x2B, 0x0A, 0x09, 0x09, 0x20, 0x20, 0x20, 0x20,
0x27, 0x3C, 0x74, 0x64, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3D, 0x27,
0x20, 0x2B, 0x20, 0x28, 0x33, 0x30, 0x30, 0x2D, 0x33, 0x30, 0x30, 0x2A,
0x6E, 0x2F, 0x6D, 0x61, 0x78, 0x29, 0x20, 0x2B, 0x20, 0x27, 0x20, 0x62,
0x67, 0x63, 0x6F, 0x6C, 0x6F, 0x72, 0x3D, 0x22, 0x6C, 0x69, 0x67, 0x68,
0x74, 0x67, 0x72, 0x61, 0x79, 0x22, 0x3E, 0x26, 0x6E, 0x62, 0x73, 0x70,
0x3B, 0x3C, 0x2F, 0x74, 0x64, 0x3E, 0x27, 0x20, 0x2B, 0x0A, 0x09, 0x09,
0x20, 0x20, 0x20, 0x20, 0x27, 0x3C, 0x2F, 0x74, 0x61, 0x62, 0x6C, 0x65,
0x3E, 0x27, 0x3B, 0x0A, 0x7D, 0x0A, 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69,
0x6F, 0x6E, 0x20, 0x64, 0x63, 0x28, 0x6E, 0x2C, 0x64, 0x29, 0x20, 0x7B,
0x0A, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6E, 0x20, 0x6E, 0x2E,
0x74, 0x6F, 0x46, 0x69, 0x78, 0x65, 0x64, 0x28, 0x64, 0x29, 0x3B, 0x0A,
0x7D, 0x0A, 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x74,
0x28, 0x6D, 0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x6E, 0x20, 0x3D, 0x20,
0x64, 0x63, 0x28, 0x6D, 0x2F, 0x31, 0x30, 0x2C, 0x20, 0x31, 0x29, 0x3B,
0x0A, 0x20, 0x20, 0x73, 0x28, 0x27, 0x74, 0x65, 0x6D, 0x70, 0x27, 0x2C,
0x6E, 0x2C, 0x34, 0x30, 0x2C, 0x27, 0x54, 0x65, 0x6D, 0x70, 0x65, 0x72,
0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x27, 0x2B, 0x6E, 0x2B, 0x27, 0x20,
0x26, 0x64, 0x65, 0x67, 0x3B, 0x43, 0x27, 0x29, 0x3B, 0x0A, 0x7D, 0x0A,
0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x61, 0x78, 0x28,
0x6D, 0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x6E, 0x20, 0x3D, 0x20, 0x6D,
0x3B, 0x0A, 0x20, 0x20, 0x73, 0x28, 0x27, 0x61, 0x63, 0x63, 0x78, 0x27,
0x2C, 0x6E, 0x2B, 0x32, 0x30, 0x30, 0x30, 0x2C, 0x34, 0x30, 0x30, 0x30,
0x2C, 0x27, 0x41, 0x63, 0x63, 0x65, 0x6C, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6F, 0x6E, 0x20, 0x28, 0x58, 0x2D, 0x61, 0x78, 0x69, 0x73, 0x29, 0x20,
0x27, 0x2B, 0x6E, 0x2B, 0x27, 0x6D, 0x67, 0x27, 0x29, 0x3B, 0x0A, 0x7D,
0x0A, 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x61, 0x79,
0x28, 0x6D, 0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x6E, 0x20, 0x3D, 0x20,
0x6D, 0x3B, 0x0A, 0x20, 0x20, 0x73, 0x28, 0x27, 0x61, 0x63, 0x63, 0x79,
0x27, 0x2C, 0x6E, 0x2B, 0x32, 0x30, 0x30, 0x30, 0x2C, 0x34, 0x30, 0x30,
0x30, 0x2C, 0x27, 0x41, 0x63, 0x63, 0x65, 0x6C, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6F, 0x6E, 0x20, 0x28, 0x59, 0x2D, 0x61, 0x78, 0x69, 0x73, 0x29,
0x20, 0x27, 0x2B, 0x6E, 0x2B, 0x27, 0x6D, 0x67, 0x27, 0x29, 0x3B, 0x0A,
0x7D, 0x0A, 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x61,
0x7A, 0x28, 0x6D, 0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x6E, 0x20, 0x3D,
0x20, 0x6D, 0x3B, 0x0A, 0x20, 0x20, 0x73, 0x28, 0x27, 0x61, 0x63, 0x63,
0x7A, 0x27, 0x2C, 0x6E, 0x2B, 0x32, 0x30, 0x30, 0x30, 0x2C, 0x34, 0x30,
0x30, 0x30, 0x2C, 0x27, 0x41, 0x63, 0x63, 0x65, 0x6C, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6F, 0x6E, 0x20, 0x28, 0x5A, 0x2D, 0x61, 0x78, 0x69, 0x73,
0x29, 0x20, 0x27, 0x2B, 0x6E, 0x2B, 0x27, 0x6D, 0x67, 0x27, 0x29, 0x3B,
0x0A, 0x7D, 0x0A, 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20,
0x72, 0x73, 0x28, 0x6D, 0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x6E, 0x20,
0x3D, 0x20, 0x6D, 0x20, 0x2B, 0x20, 0x34, 0x35, 0x3B, 0x0A, 0x20, 0x20,
0x73, 0x28, 0x27, 0x72, 0x73, 0x27, 0x2C, 0x6E, 0x2C, 0x31, 0x30, 0x30,
0x2C, 0x27, 0x52, 0x53, 0x53, 0x49, 0x20, 0x27, 0x2B, 0x6E, 0x29, 0x3B,
0x0A, 0x7D, 0x0A, 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20,
0x70, 0x28, 0x63, 0x2C, 0x6C, 0x2C, 0x74, 0x2C, 0x72, 0x29, 0x20, 0x7B,
0x0A, 0x20, 0x20, 0x74, 0x6D, 0x3D, 0x63, 0x2B, 0x6C, 0x3B, 0x0A, 0x20,
0x20, 0x63, 0x70, 0x3D, 0x63, 0x2A, 0x31, 0x38, 0x2F, 0x74, 0x6D, 0x3B,
0x0A, 0x20, 0x20, 0x6C, 0x70, 0x3D, 0x6C, 0x2A, 0x37, 0x2E, 0x32, 0x2F,
0x74, 0x6D, 0x3B, 0x0A, 0x20, 0x20, 0x6C, 0x74, 0x3D, 0x74, 0x2A, 0x35,
0x30, 0x2E, 0x34, 0x2F, 0x74, 0x6D, 0x3B, 0x0A, 0x20, 0x20, 0x6C, 0x72,
0x3D, 0x72, 0x2A, 0x34, 0x35, 0x2E, 0x36, 0x2F, 0x74, 0x6D, 0x3B, 0x0A,
0x20, 0x20, 0x6E, 0x3D, 0x63, 0x70, 0x2B, 0x6C, 0x70, 0x2B, 0x6C, 0x74,
0x2B, 0x6C, 0x72, 0x3B, 0x0A, 0x20, 0x20, 0x73, 0x28, 0x27, 0x70, 0x27,
0x2C, 0x6E, 0x2C, 0x31, 0x30, 0x30, 0x2C, 0x27, 0x50, 0x6F, 0x77, 0x65,
0x72, 0x20, 0x63, 0x6F, 0x6E, 0x73, 0x75, 0x6D, 0x70, 0x74, 0x69, 0x6F,
0x6E, 0x20, 0x27, 0x2B, 0x64, 0x63, 0x28, 0x6E, 0x2C, 0x32, 0x29, 0x2B,
0x27, 0x20, 0x6D, 0x57, 0x27, 0x29, 0x3B, 0x0A, 0x20, 0x20, 0x73, 0x28,
0x27, 0x70, 0x63, 0x27, 0x2C, 0x63, 0x70, 0x2C, 0x31, 0x30, 0x30, 0x2C,
0x27, 0x43, 0x50, 0x55, 0x20, 0x70, 0x6F, 0x77, 0x65, 0x72, 0x20, 0x27,
0x2B, 0x64, 0x63, 0x28, 0x63, 0x70, 0x2C, 0x32, 0x29, 0x2B, 0x27, 0x20,
0x6D, 0x57, 0x27, 0x29, 0x3B, 0x0A, 0x20, 0x20, 0x73, 0x28, 0x27, 0x70,
0x6C, 0x27, 0x2C, 0x6C, 0x70, 0x2C, 0x31, 0x30, 0x30, 0x2C, 0x27, 0x4C,
0x50, 0x4D, 0x20, 0x70, 0x6F, 0x77, 0x65, 0x72, 0x20, 0x27, 0x2B, 0x64,
0x63, 0x28, 0x6C, 0x70, 0x2C, 0x32, 0x29, 0x2B, 0x27, 0x20, 0x6D, 0x57,
0x27, 0x29, 0x3B, 0x0A, 0x20, 0x20, 0x73, 0x28, 0x27, 0x70, 0x72, 0x27,
0x2C, 0x6C, 0x72, 0x2C, 0x31, 0x30, 0x30, 0x2C, 0x27, 0x52, 0x61, 0x64,
0x69, 0x6F, 0x20, 0x52, 0x58, 0x20, 0x70, 0x6F, 0x77, 0x65, 0x72, 0x20,
0x27, 0x2B, 0x64, 0x63, 0x28, 0x6C, 0x72, 0x2C, 0x32, 0x29, 0x2B, 0x27,
0x20, 0x6D, 0x57, 0x27, 0x29, 0x3B, 0x0A, 0x20, 0x20, 0x73, 0x28, 0x27,
0x70, 0x74, 0x27, 0x2C, 0x6C, 0x74, 0x2C, 0x31, 0x30, 0x30, 0x2C, 0x27,
0x52, 0x61, 0x64, 0x69, 0x6F, 0x20, 0x54, 0x58, 0x20, 0x70, 0x6F, 0x77,
0x65, 0x72, 0x20, 0x27, 0x2B, 0x64, 0x63, 0x28, 0x6C, 0x74, 0x2C, 0x32,
0x29, 0x2B, 0x27, 0x20, 0x6D, 0x57, 0x27, 0x29, 0x3B, 0x0A, 0x7D, 0x0A,
0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x76, 0x28, 0x6E,
0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x65, 0x28, 0x27, 0x76, 0x27, 0x29,
0x2E, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x48, 0x54, 0x4D, 0x4C, 0x20, 0x3D,
0x20, 0x6E, 0x3B, 0x0A, 0x7D, 0x0A, 0x3C, 0x2F, 0x73, 0x63, 0x72, 0x69,
0x70, 0x74, 0x3E, 0x0A, 0x3C, 0x68, 0x31, 0x3E, 0x4E, 0x6F, 0x64, 0x65,
0x0A, 0x25, 0x21, 0x20, 0x6E, 0x6F, 0x64, 0x65, 0x69, 0x64, 0x0A, 0x3C,
0x2F, 0x68, 0x31, 0x3E, 0x0A, 0x3C, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66,
0x3D, 0x22, 0x6A, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
0x3A, 0x6C, 0x6F, 0x61, 0x64, 0x53, 0x65, 0x6E, 0x73, 0x6F, 0x72, 0x64,
0x61, 0x74, 0x61, 0x28, 0x29, 0x3B, 0x22, 0x3E, 0x52, 0x65, 0x6C, 0x6F,
0x61, 0x64, 0x3C, 0x2F, 0x61, 0x3E, 0x0A, 0x0A, 0x3C, 0x73, 0x70, 0x61,
0x6E, 0x20, 0x69, 0x64, 0x3D, 0x22, 0x73, 0x70, 0x69, 0x6E, 0x22, 0x3E,
0x20, 0x3C, 0x2F, 0x73, 0x70, 0x61, 0x6E, 0x3E, 0x0A, 0x3C, 0x68, 0x32,
0x3E, 0x45, 0x6E, 0x76, 0x69, 0x72, 0x6F, 0x6E, 0x6D, 0x65, 0x6E, 0x74,
0x3C, 0x2F, 0x68, 0x32, 0x3E, 0x0A, 0x3C, 0x64, 0x69, 0x76, 0x20, 0x69,
0x64, 0x3D, 0x22, 0x74, 0x65, 0x6D, 0x70, 0x22, 0x3E, 0x3C, 0x2F, 0x64,
0x69, 0x76, 0x3E, 0x0A, 0x3C, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3D,
0x22, 0x61, 0x63, 0x63, 0x78, 0x22, 0x3E, 0x3C, 0x2F, 0x64, 0x69, 0x76,
0x3E, 0x0A, 0x3C, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3D, 0x22, 0x61,
0x63, 0x63, 0x79, 0x22, 0x3E, 0x3C, 0x2F, 0x64, 0x69, 0x76, 0x3E, 0x0A,
0x3C, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3D, 0x22, 0x61, 0x63, 0x63,
0x7A, 0x22, 0x3E, 0x3C, 0x2F, 0x64, 0x69, 0x76, 0x3E, 0x0A, 0x3C, 0x68,
0x32, 0x3E, 0x50, 0x6F, 0x77, 0x65, 0x72, 0x3C, 0x2F, 0x68, 0x32, 0x3E,
0x0A, 0x3C, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3D, 0x22, 0x70, 0x22,
0x3E, 0x3C, 0x2F, 0x64, 0x69, 0x76, 0x3E, 0x0A, 0x3C, 0x64, 0x69, 0x76,
0x20, 0x69, 0x64, 0x3D, 0x22, 0x70, 0x63, 0x22, 0x3E, 0x3C, 0x2F, 0x64,
0x69, 0x76, 0x3E, 0x0A, 0x3C, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3D,
0x22, 0x70, 0x6C, 0x22, 0x3E, 0x3C, 0x2F, 0x64, 0x69, 0x76, 0x3E, 0x0A,
0x3C, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3D, 0x22, 0x70, 0x72, 0x22,
0x3E, 0x3C, 0x2F, 0x64, 0x69, 0x76, 0x3E, 0x0A, 0x3C, 0x64, 0x69, 0x76,
0x20, 0x69, 0x64, 0x3D, 0x22, 0x70, 0x74, 0x22, 0x3E, 0x3C, 0x2F, 0x64,
0x69, 0x76, 0x3E, 0x0A, 0x3C, 0x62, 0x72, 0x3E, 0x3C, 0x2F, 0x62, 0x72,
0x3E, 0x0A, 0x3C, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3D, 0x22, 0x76,
0x22, 0x3E, 0x3C, 0x2F, 0x64, 0x69, 0x76, 0x3E, 0x0A, 0x25, 0x21, 0x3A,
0x20, 0x2F, 0x66, 0x6F, 0x6F, 0x74, 0x65, 0x72, 0x2E, 0x68, 0x74, 0x6D,
0x6C, 0x0A, 0};
static const char data_footer_html[] = {
/* /footer.html */
0x2f, 0x66, 0x6f, 0x6f, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
0x3c, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3e, 0xa, 0x3c,
0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0xa, 0x3c, 0x2f, 0x68,
0x74, 0x6d, 0x6c, 0x3e, 0xa, 0};
static const char data_spin_gif[] = {
/* /spin.gif */
0x2f, 0x73, 0x70, 0x69, 0x6e, 0x2e, 0x67, 0x69, 0x66, 0,
0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x12, 00, 0xf, 00,
0xf2, 00, 00, 0xff, 0xff, 0xff, 00, 00, 00, 00,
00, 00, 0x5c, 0x5c, 0x5c, 0xb4, 0xb4, 0xb4, 00, 00,
00, 00, 00, 00, 00, 00, 00, 0x21, 0xff, 0xb,
0x4e, 0x45, 0x54, 0x53, 0x43, 0x41, 0x50, 0x45, 0x32, 0x2e,
0x30, 0x3, 0x1, 00, 00, 00, 0x21, 0xfe, 0x1a, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74,
0x68, 0x20, 0x61, 0x6a, 0x61, 0x78, 0x6c, 0x6f, 0x61, 0x64,
0x2e, 0x69, 0x6e, 0x66, 0x6f, 00, 0x21, 0xf9, 0x4, 0x9,
0x5, 00, 00, 00, 0x2c, 00, 00, 00, 00, 0x12,
00, 0xf, 00, 00, 0x3, 0x1c, 0x8, 0xba, 0xdc, 0xfe,
0x30, 0xca, 0x49, 0xab, 0xbd, 0x38, 0x57, 0x21, 0x2e, 0xe7,
0xd6, 0xd7, 0x1, 0x3, 0x5, 0x92, 0x43, 0x9, 0x10, 0x4,
0xa5, 0x6a, 0x4e, 0x2, 00, 0x21, 0xf9, 0x4, 0x9, 0x5,
00, 00, 00, 0x2c, 00, 00, 00, 00, 0x12, 00,
0xf, 00, 00, 0x3, 0x1e, 0x8, 0xba, 0xdc, 0xfe, 0x30,
0xca, 0x49, 0xab, 0x6d, 0xe2, 0x2, 0xc1, 0x75, 0xd6, 0xca,
0x30, 0x5c, 0xa2, 0x68, 0x95, 0x23, 0x40, 0x50, 0xa6, 0x4a,
0xac, 0x17, 0xc, 0x3e, 0x9, 00, 0x21, 0xf9, 0x4, 0x9,
0x5, 00, 00, 00, 0x2c, 00, 00, 00, 00, 0x12,
00, 0xf, 00, 00, 0x3, 0x1c, 0x8, 0xba, 0xdc, 0xfe,
0x30, 0x4a, 0x20, 0xc4, 0xbc, 0x38, 0xab, 0xa1, 0xc1, 0xf8,
0x1d, 0xd7, 0x29, 0x4, 0xa1, 0x95, 0x65, 0x86, 0x9a, 0x2a,
0x3b, 0xbe, 0x53, 0x2, 00, 0x21, 0xf9, 0x4, 0x9, 0x5,
00, 00, 00, 0x2c, 00, 00, 00, 00, 0x12, 00,
0xf, 00, 00, 0x3, 0x17, 0x8, 0xba, 0xdc, 0xbe, 0xe2,
0xc9, 0xf9, 0xc6, 0xa0, 0x38, 0x6b, 0x47, 0xb6, 0x22, 0xa0,
0x7, 0x74, 0x62, 0x69, 0x9e, 0x68, 0x8a, 0x25, 00, 0x21,
0xf9, 0x4, 0x9, 0x5, 00, 00, 00, 0x2c, 00, 00,
00, 00, 0x12, 00, 0xf, 00, 00, 0x3, 0x14, 0x8,
0xba, 0xdc, 0xbe, 0xe3, 0xc9, 0x27, 0x24, 0x21, 0x33, 0xeb,
0xcd, 0xbb, 0xff, 0x60, 0x28, 0x8e, 0x24, 0x98, 00, 00,
0x21, 0xf9, 0x4, 0x9, 0x5, 00, 00, 00, 0x2c, 00,
00, 00, 00, 0x12, 00, 0xf, 00, 00, 0x3, 0x14,
0x8, 0xba, 0xdc, 0xbe, 0xe4, 0xc9, 0x37, 0xa6, 0xbd, 0x38,
0x2f, 0xa1, 0xbb, 0xff, 0x60, 0x28, 0x8e, 0x24, 0x90, 00,
00, 0x21, 0xf9, 0x4, 0x9, 0x5, 00, 00, 00, 0x2c,
00, 00, 00, 00, 0x12, 00, 0xf, 00, 00, 0x3,
0x13, 0x8, 0xba, 0xdc, 0xfe, 0x30, 0x2a, 0x22, 0xab, 0xbd,
0x76, 0xe0, 0xcd, 0xbb, 0x8f, 0xc2, 0x27, 0x8e, 0x57, 0x2,
00, 0x21, 0xf9, 0x4, 0x9, 0x5, 00, 00, 00, 0x2c,
00, 00, 00, 00, 0x12, 00, 0xf, 00, 00, 0x3,
0x14, 0x8, 0xba, 0xdc, 0xfe, 0x30, 0xca, 0x49, 0xab, 0x5,
0xe4, 0xea, 0xcd, 0x3b, 0x1b, 0x1e, 0x25, 0x8, 0x21, 0x97,
00, 00, 0x21, 0xf9, 0x4, 0x9, 0x5, 00, 00, 00,
0x2c, 00, 00, 00, 00, 0x12, 00, 0xf, 00, 00,
0x3, 0x17, 0x8, 0xba, 0xdc, 0xfe, 0x30, 0xca, 0x49, 0xab,
0xbd, 0x38, 0xeb, 0xed, 0x88, 0x14, 0x98, 0x20, 0x2a, 0xc3,
0x40, 0x81, 0x5c, 0x93, 00, 00, 0x3b, 00, 00, 00,
00, 00, 00, 00, 00, 00, 0};
static const char data_neighbors_shtml[] = {
/* /neighbors.shtml */
0x2f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0,
0x25, 0x21, 0x3A, 0x20, 0x2F, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2E,
0x68, 0x74, 0x6D, 0x6C, 0x0A, 0x3C, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
0x20, 0x74, 0x79, 0x70, 0x65, 0x3D, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2F,
0x6A, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x3E,
0x0A, 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x6C, 0x6F,
0x61, 0x64, 0x28, 0x29, 0x20, 0x7B, 0x0A, 0x09, 0x61, 0x3D, 0x64, 0x6F,
0x63, 0x75, 0x6D, 0x65, 0x6E, 0x74, 0x2E, 0x61, 0x6E, 0x63, 0x68, 0x6F,
0x72, 0x73, 0x3B, 0x0A, 0x09, 0x66, 0x6F, 0x72, 0x28, 0x69, 0x3D, 0x30,
0x3B, 0x20, 0x69, 0x3C, 0x61, 0x2E, 0x6C, 0x65, 0x6E, 0x67, 0x74, 0x68,
0x3B, 0x69, 0x2B, 0x2B, 0x29, 0x7B, 0x0A, 0x09, 0x09, 0x69, 0x66, 0x28,
0x61, 0x5B, 0x69, 0x5D, 0x2E, 0x69, 0x64, 0x3D, 0x3D, 0x27, 0x6E, 0x6F,
0x64, 0x65, 0x27, 0x29, 0x0A, 0x09, 0x09, 0x09, 0x61, 0x5B, 0x69, 0x5D,
0x2E, 0x68, 0x72, 0x65, 0x66, 0x3D, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3A,
0x2F, 0x2F, 0x22, 0x2B, 0x61, 0x64, 0x64, 0x72, 0x67, 0x65, 0x6E, 0x28,
0x61, 0x5B, 0x69, 0x5D, 0x2E, 0x6E, 0x61, 0x6D, 0x65, 0x29, 0x2B, 0x22,
0x2F, 0x22, 0x0A, 0x09, 0x7D, 0x0A, 0x7D, 0x0A, 0x66, 0x75, 0x6E, 0x63,
0x74, 0x69, 0x6F, 0x6E, 0x20, 0x61, 0x64, 0x64, 0x72, 0x67, 0x65, 0x6E,
0x28, 0x69, 0x69, 0x64, 0x29, 0x0A, 0x7B, 0x0A, 0x09, 0x68, 0x61, 0x64,
0x64, 0x72, 0x3D, 0x64, 0x6F, 0x63, 0x75, 0x6D, 0x65, 0x6E, 0x74, 0x2E,
0x6C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2E, 0x68, 0x6F, 0x73,
0x74, 0x3B, 0x0A, 0x09, 0x61, 0x64, 0x64, 0x72, 0x3D, 0x68, 0x61, 0x64,
0x64, 0x72, 0x3B, 0x0A, 0x09, 0x69, 0x65, 0x37, 0x6C, 0x6C, 0x3D, 0x30,
0x3B, 0x73, 0x65, 0x70, 0x3D, 0x27, 0x3A, 0x27, 0x3B, 0x65, 0x73, 0x63,
0x3D, 0x27, 0x25, 0x32, 0x35, 0x27, 0x3B, 0x0A, 0x09, 0x69, 0x66, 0x28,
0x61, 0x64, 0x64, 0x72, 0x2E, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x28,
0x2F, 0x69, 0x70, 0x76, 0x36, 0x2D, 0x6C, 0x69, 0x74, 0x65, 0x72, 0x61,
0x6C, 0x2E, 0x6E, 0x65, 0x74, 0x2F, 0x29, 0x21, 0x3D, 0x2D, 0x31, 0x29,
0x7B, 0x0A, 0x09, 0x09, 0x69, 0x65, 0x37, 0x6C, 0x6C, 0x3D, 0x31, 0x3B,
0x73, 0x65, 0x70, 0x3D, 0x27, 0x2D, 0x27, 0x3B, 0x65, 0x73, 0x63, 0x3D,
0x27, 0x73, 0x27, 0x3B, 0x69, 0x69, 0x64, 0x3D, 0x69, 0x69, 0x64, 0x2E,
0x72, 0x65, 0x70, 0x6C, 0x61, 0x63, 0x65, 0x28, 0x2F, 0x3A, 0x2F, 0x67,
0x2C, 0x27, 0x2D, 0x27, 0x29, 0x3B, 0x0A, 0x09, 0x7D, 0x0A, 0x09, 0x6E,
0x63, 0x6F, 0x6C, 0x3D, 0x61, 0x64, 0x64, 0x72, 0x2E, 0x72, 0x65, 0x70,
0x6C, 0x61, 0x63, 0x65, 0x28, 0x2F, 0x69, 0x70, 0x76, 0x36, 0x2D, 0x6C,
0x69, 0x74, 0x65, 0x72, 0x61, 0x6C, 0x2E, 0x6E, 0x65, 0x74, 0x2F, 0x2C,
0x27, 0x27, 0x29, 0x2E, 0x6D, 0x61, 0x74, 0x63, 0x68, 0x28, 0x2F, 0x5B,
0x3A, 0x2D, 0x5D, 0x2F, 0x67, 0x29, 0x2E, 0x6C, 0x65, 0x6E, 0x67, 0x74,
0x68, 0x3B, 0x0A, 0x09, 0x6E, 0x3D, 0x30, 0x3B, 0x69, 0x6E, 0x64, 0x74,
0x6F, 0x74, 0x3D, 0x30, 0x3B, 0x0A, 0x09, 0x61, 0x64, 0x64, 0x72, 0x3D,
0x68, 0x61, 0x64, 0x64, 0x72, 0x3B, 0x0A, 0x09, 0x77, 0x68, 0x69, 0x6C,
0x65, 0x28, 0x6E, 0x3C, 0x34, 0x20, 0x26, 0x26, 0x20, 0x28, 0x69, 0x6E,
0x64, 0x3D, 0x61, 0x64, 0x64, 0x72, 0x2E, 0x69, 0x6E, 0x64, 0x65, 0x78,
0x4F, 0x66, 0x28, 0x73, 0x65, 0x70, 0x29, 0x29, 0x21, 0x3D, 0x2D, 0x31,
0x29, 0x7B, 0x0A, 0x09, 0x09, 0x6E, 0x2B, 0x2B, 0x3B, 0x0A, 0x09, 0x09,
0x69, 0x66, 0x28, 0x61, 0x64, 0x64, 0x72, 0x2E, 0x63, 0x68, 0x61, 0x72,
0x41, 0x74, 0x28, 0x69, 0x6E, 0x64, 0x2B, 0x31, 0x29, 0x3D, 0x3D, 0x73,
0x65, 0x70, 0x29, 0x0A, 0x09, 0x09, 0x09, 0x6E, 0x2B, 0x3D, 0x37, 0x2D,
0x6E, 0x63, 0x6F, 0x6C, 0x3B, 0x09, 0x09, 0x0A, 0x09, 0x09, 0x61, 0x64,
0x64, 0x72, 0x3D, 0x61, 0x64, 0x64, 0x72, 0x2E, 0x73, 0x6C, 0x69, 0x63,
0x65, 0x28, 0x69, 0x6E, 0x64, 0x2B, 0x31, 0x29, 0x3B, 0x0A, 0x09, 0x09,
0x69, 0x6E, 0x64, 0x74, 0x6F, 0x74, 0x2B, 0x3D, 0x69, 0x6E, 0x64, 0x2B,
0x31, 0x3B, 0x0A, 0x09, 0x7D, 0x0A, 0x09, 0x69, 0x66, 0x28, 0x69, 0x6E,
0x64, 0x3D, 0x3D, 0x2D, 0x31, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72,
0x6E, 0x3B, 0x0A, 0x09, 0x6E, 0x65, 0x77, 0x61, 0x64, 0x64, 0x72, 0x20,
0x3D, 0x20, 0x68, 0x61, 0x64, 0x64, 0x72, 0x2E, 0x73, 0x6C, 0x69, 0x63,
0x65, 0x28, 0x30, 0x2C, 0x69, 0x6E, 0x64, 0x74, 0x6F, 0x74, 0x29, 0x2B,
0x69, 0x69, 0x64, 0x3B, 0x0A, 0x09, 0x6F, 0x6C, 0x64, 0x69, 0x69, 0x64,
0x20, 0x3D, 0x20, 0x68, 0x61, 0x64, 0x64, 0x72, 0x2E, 0x73, 0x6C, 0x69,
0x63, 0x65, 0x28, 0x69, 0x6E, 0x64, 0x74, 0x6F, 0x74, 0x29, 0x3B, 0x0A,
0x09, 0x65, 0x6E, 0x64, 0x3D, 0x6F, 0x6C, 0x64, 0x69, 0x69, 0x64, 0x2E,
0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x28, 0x2F, 0x5B, 0x5E, 0x30, 0x2D,
0x39, 0x61, 0x2D, 0x66, 0x3A, 0x2D, 0x5D, 0x2F, 0x69, 0x29, 0x3B, 0x0A,
0x09, 0x69, 0x66, 0x28, 0x65, 0x6E, 0x64, 0x21, 0x3D, 0x2D, 0x31, 0x29,
0x0A, 0x09, 0x09, 0x6E, 0x65, 0x77, 0x61, 0x64, 0x64, 0x72, 0x20, 0x3D,
0x20, 0x6E, 0x65, 0x77, 0x61, 0x64, 0x64, 0x72, 0x2B, 0x6F, 0x6C, 0x64,
0x69, 0x69, 0x64, 0x2E, 0x73, 0x6C, 0x69, 0x63, 0x65, 0x28, 0x65, 0x6E,
0x64, 0x29, 0x3B, 0x0A, 0x09, 0x69, 0x66, 0x28, 0x21, 0x69, 0x65, 0x37,
0x6C, 0x6C, 0x26, 0x26, 0x6E, 0x65, 0x77, 0x61, 0x64, 0x64, 0x72, 0x2E,
0x63, 0x68, 0x61, 0x72, 0x41, 0x74, 0x28, 0x30, 0x29, 0x21, 0x3D, 0x27,
0x5B, 0x27, 0x29, 0x0A, 0x09, 0x09, 0x6E, 0x65, 0x77, 0x61, 0x64, 0x64,
0x72, 0x3D, 0x27, 0x5B, 0x27, 0x2B, 0x6E, 0x65, 0x77, 0x61, 0x64, 0x64,
0x72, 0x2B, 0x27, 0x5D, 0x27, 0x3B, 0x0A, 0x09, 0x69, 0x66, 0x28, 0x6E,
0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x6F, 0x72, 0x2E, 0x75, 0x73, 0x65,
0x72, 0x41, 0x67, 0x65, 0x6E, 0x74, 0x2E, 0x73, 0x65, 0x61, 0x72, 0x63,
0x68, 0x28, 0x2F, 0x46, 0x69, 0x72, 0x65, 0x66, 0x6F, 0x78, 0x2F, 0x69,
0x29, 0x3D, 0x3D, 0x2D, 0x31, 0x29, 0x0A, 0x09, 0x09, 0x6E, 0x65, 0x77,
0x61, 0x64, 0x64, 0x72, 0x3D, 0x6E, 0x65, 0x77, 0x61, 0x64, 0x64, 0x72,
0x2E, 0x72, 0x65, 0x70, 0x6C, 0x61, 0x63, 0x65, 0x28, 0x27, 0x25, 0x27,
0x2C, 0x65, 0x73, 0x63, 0x29, 0x3B, 0x0A, 0x09, 0x72, 0x65, 0x74, 0x75,
0x72, 0x6E, 0x20, 0x6E, 0x65, 0x77, 0x61, 0x64, 0x64, 0x72, 0x3B, 0x0A,
0x7D, 0x0A, 0x3C, 0x2F, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3E, 0x0A,
0x3C, 0x68, 0x31, 0x3E, 0x4E, 0x6F, 0x64, 0x65, 0x0A, 0x25, 0x21, 0x20,
0x6E, 0x6F, 0x64, 0x65, 0x69, 0x64, 0x0A, 0x3C, 0x2F, 0x68, 0x31, 0x3E,
0x0A, 0x3C, 0x68, 0x32, 0x3E, 0x4E, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6F,
0x72, 0x73, 0x3C, 0x2F, 0x68, 0x32, 0x3E, 0x0A, 0x3C, 0x75, 0x6C, 0x3E,
0x0A, 0x25, 0x21, 0x20, 0x6E, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6F, 0x72,
0x73, 0x0A, 0x3C, 0x2F, 0x75, 0x6C, 0x3E, 0x0A, 0x25, 0x21, 0x3A, 0x20,
0x2F, 0x66, 0x6F, 0x6F, 0x74, 0x65, 0x72, 0x2E, 0x68, 0x74, 0x6D, 0x6C,
0x0A, 0x0A, 0};
static const char data_404_html[] = {
/* /404.html */
0x2f, 0x34, 0x30, 0x34, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa, 0x20, 0x20, 0x3c,
0x62, 0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f, 0x6c,
0x6f, 0x72, 0x3d, 0x22, 0x77, 0x68, 0x69, 0x74, 0x65, 0x22,
0x3e, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x63, 0x65, 0x6e,
0x74, 0x65, 0x72, 0x3e, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x3c, 0x68, 0x31, 0x3e, 0x34, 0x30, 0x34, 0x20, 0x2d,
0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20,
0x66, 0x6f, 0x75, 0x6e, 0x64, 0x3c, 0x2f, 0x68, 0x31, 0x3e,
0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x68, 0x33,
0x3e, 0x47, 0x6f, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65,
0x66, 0x3d, 0x22, 0x2f, 0x22, 0x3e, 0x68, 0x65, 0x72, 0x65,
0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x65,
0x61, 0x64, 0x2e, 0x3c, 0x2f, 0x68, 0x33, 0x3e, 0xa, 0x20,
0x20, 0x20, 0x20, 0x3c, 0x2f, 0x63, 0x65, 0x6e, 0x74, 0x65,
0x72, 0x3e, 0xa, 0x20, 0x20, 0x3c, 0x2f, 0x62, 0x6f, 0x64,
0x79, 0x3e, 0xa, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e,
0};
static const char data_header_html[] = {
/* /header.html */
0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20,
0x48, 0x54, 0x4d, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49,
0x43, 0x20, 0x22, 0x2d, 0x2f, 0x2f, 0x57, 0x33, 0x43, 0x2f,
0x2f, 0x44, 0x54, 0x44, 0x20, 0x48, 0x54, 0x4d, 0x4c, 0x20,
0x34, 0x2e, 0x30, 0x31, 0x20, 0x54, 0x72, 0x61, 0x6e, 0x73,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x2f, 0x45,
0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f,
0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72,
0x67, 0x2f, 0x54, 0x52, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x34,
0x2f, 0x6c, 0x6f, 0x6f, 0x73, 0x65, 0x2e, 0x64, 0x74, 0x64,
0x22, 0x3e, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa,
0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, 0xa, 0x3c, 0x74, 0x69,
0x74, 0x6c, 0x65, 0x3e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6b,
0x69, 0x3c, 0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0xa,
0x3c, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x3e, 0xa, 0x3c, 0x62,
0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f, 0x6c, 0x6f,
0x72, 0x3d, 0x22, 0x77, 0x68, 0x69, 0x74, 0x65, 0x22, 0x20,
0x6f, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x3d, 0x22, 0x6c, 0x6f,
0x61, 0x64, 0x28, 0x29, 0x22, 0x3e, 0xa, 0x3c, 0x74, 0x61,
0x62, 0x6c, 0x65, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72,
0x3d, 0x30, 0x20, 0x63, 0x65, 0x6c, 0x6c, 0x70, 0x61, 0x64,
0x64, 0x69, 0x6e, 0x67, 0x3d, 0x34, 0x20, 0x63, 0x65, 0x6c,
0x6c, 0x73, 0x70, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x3d, 0x34,
0x3e, 0x3c, 0x74, 0x72, 0x3e, 0x3c, 0x74, 0x64, 0x20, 0x76,
0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x74, 0x6f, 0x70,
0x22, 0x20, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x72,
0x69, 0x67, 0x68, 0x74, 0x22, 0x3e, 0xa, 0x3c, 0x68, 0x31,
0x3e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6b, 0x69, 0x26, 0x6e,
0x62, 0x73, 0x70, 0x3b, 0x3c, 0x2f, 0x68, 0x31, 0x3e, 0xa,
0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f,
0x22, 0x3e, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x20, 0x70, 0x61,
0x67, 0x65, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x62, 0x72, 0x3e,
0xa, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22,
0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x2e,
0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x4e, 0x65, 0x69,
0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x3c, 0x2f, 0x61, 0x3e,
0x3c, 0x62, 0x72, 0x3e, 0xa, 0x3c, 0x61, 0x20, 0x68, 0x72,
0x65, 0x66, 0x3d, 0x22, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72,
0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x53,
0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x3c, 0x2f, 0x61, 0x3e,
0x3c, 0x62, 0x72, 0x3e, 0xa, 0x3c, 0x2f, 0x74, 0x64, 0x3e,
0x3c, 0x74, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x67, 0x6e,
0x3d, 0x22, 0x74, 0x6f, 0x70, 0x22, 0x20, 0x61, 0x6c, 0x69,
0x67, 0x6e, 0x3d, 0x22, 0x6c, 0x65, 0x66, 0x74, 0x22, 0x3e,
0xa, 0};
static const char data_index_html[] = {
/* /index.html */
0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20,
0x48, 0x54, 0x4d, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49,
0x43, 0x20, 0x22, 0x2d, 0x2f, 0x2f, 0x57, 0x33, 0x43, 0x2f,
0x2f, 0x44, 0x54, 0x44, 0x20, 0x48, 0x54, 0x4d, 0x4c, 0x20,
0x34, 0x2e, 0x30, 0x31, 0x20, 0x54, 0x72, 0x61, 0x6e, 0x73,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x2f, 0x45,
0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f,
0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72,
0x67, 0x2f, 0x54, 0x52, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x34,
0x2f, 0x6c, 0x6f, 0x6f, 0x73, 0x65, 0x2e, 0x64, 0x74, 0x64,
0x22, 0x3e, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa,
0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, 0xa, 0x3c, 0x74, 0x69,
0x74, 0x6c, 0x65, 0x3e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6b,
0x69, 0x3c, 0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0xa,
0x3c, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x3e, 0xa, 0x3c, 0x62,
0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f, 0x6c, 0x6f,
0x72, 0x3d, 0x22, 0x77, 0x68, 0x69, 0x74, 0x65, 0x22, 0x3e,
0xa, 0x3c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x62, 0x6f,
0x72, 0x64, 0x65, 0x72, 0x3d, 0x30, 0x20, 0x63, 0x65, 0x6c,
0x6c, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x3d, 0x34,
0x20, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x70, 0x61, 0x63, 0x69,
0x6e, 0x67, 0x3d, 0x34, 0x3e, 0x3c, 0x74, 0x72, 0x3e, 0x3c,
0x74, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d,
0x22, 0x74, 0x6f, 0x70, 0x22, 0x20, 0x61, 0x6c, 0x69, 0x67,
0x6e, 0x3d, 0x22, 0x72, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3e,
0xa, 0x3c, 0x68, 0x31, 0x3e, 0x43, 0x6f, 0x6e, 0x74, 0x69,
0x6b, 0x69, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x3c, 0x2f,
0x68, 0x31, 0x3e, 0xa, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65,
0x66, 0x3d, 0x22, 0x2f, 0x22, 0x3e, 0x46, 0x72, 0x6f, 0x6e,
0x74, 0x20, 0x70, 0x61, 0x67, 0x65, 0x3c, 0x2f, 0x61, 0x3e,
0x3c, 0x62, 0x72, 0x3e, 0xa, 0x3c, 0x61, 0x20, 0x68, 0x72,
0x65, 0x66, 0x3d, 0x22, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62,
0x6f, 0x72, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22,
0x3e, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73,
0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x62, 0x72, 0x3e, 0xa, 0x3c,
0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x73, 0x65,
0x6e, 0x73, 0x6f, 0x72, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d,
0x6c, 0x22, 0x3e, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73,
0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x62, 0x72, 0x3e, 0xa, 0x3c,
0x2f, 0x74, 0x64, 0x3e, 0x3c, 0x74, 0x64, 0x20, 0x76, 0x61,
0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x74, 0x6f, 0x70, 0x22,
0x20, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x6c, 0x65,
0x66, 0x74, 0x22, 0x3e, 0xa, 0x3c, 0x2f, 0x74, 0x61, 0x62,
0x6c, 0x65, 0x3e, 0xa, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79,
0x3e, 0xa, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa,
0};
const struct httpd_fsdata_file file_sensordata_shtml[] = {{NULL, data_sensordata_shtml, data_sensordata_shtml + 18, sizeof(data_sensordata_shtml) - 18}};
const struct httpd_fsdata_file file_sensors_shtml[] = {{file_sensordata_shtml, data_sensors_shtml, data_sensors_shtml + 15, sizeof(data_sensors_shtml) - 15}};
const struct httpd_fsdata_file file_footer_html[] = {{file_sensors_shtml, data_footer_html, data_footer_html + 13, sizeof(data_footer_html) - 13}};
const struct httpd_fsdata_file file_spin_gif[] = {{file_footer_html, data_spin_gif, data_spin_gif + 10, sizeof(data_spin_gif) - 10}};
const struct httpd_fsdata_file file_neighbors_shtml[] = {{file_spin_gif, data_neighbors_shtml, data_neighbors_shtml + 17, sizeof(data_neighbors_shtml) - 17}};
const struct httpd_fsdata_file file_404_html[] = {{file_neighbors_shtml, data_404_html, data_404_html + 10, sizeof(data_404_html) - 10}};
const struct httpd_fsdata_file file_header_html[] = {{file_404_html, data_header_html, data_header_html + 13, sizeof(data_header_html) - 13}};
const struct httpd_fsdata_file file_index_html[] = {{file_header_html, data_index_html, data_index_html + 12, sizeof(data_index_html) - 12}};
#define HTTPD_FS_ROOT file_index_html
#define HTTPD_FS_NUMFILES 8

View file

@ -0,0 +1,50 @@
/*
* Copyright (c) 2006, Swedish Institute of Computer Science.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* This file is part of the Contiki operating system.
*
*/
/**
* \file
* Multi-hop webserver for the Tmote Sky.
* \author
* Adam Dunkels <adam@sics.se>
*/
/*
* salvopitru: example adapted to mbxxx.
*/
#include "webserver-nogui.h"
#include "contiki.h"
/*---------------------------------------------------------------------------*/
AUTOSTART_PROCESSES(&webserver_nogui_process);
/*---------------------------------------------------------------------------*/

View file

@ -0,0 +1,4 @@
#include "symbols.h"
const int symbols_nelts = 0;
const struct symbols symbols[] = {{0,0}};

View file

@ -0,0 +1,3 @@
#include "loader/symbols.h"
extern const struct symbols symbols[1];

View file

@ -0,0 +1,24 @@
#ifndef __WEBSERVER_AJAX_CONF_H__
#define __WEBSERVER_AJAX_CONF_H__
#undef WITH_RIME
#define WITH_RIME 1
#undef ENERGEST_CONF_ON
#define ENERGEST_CONF_ON 1
#undef UIP_CONF_ROUTER
#define UIP_CONF_ROUTER 0
#undef WITH_SERIAL_LINE_INPUT
#define WITH_SERIAL_LINE_INPUT 0
/* Needed for communicating with other nodes outside the LoWPAN,
as UDP checksum is not optional in IPv6. */
#undef UIP_CONF_UDP_CHECKSUMS
#define UIP_CONF_UDP_CHECKSUMS 1
#endif /* __WEBSERVER_AJAX_CONF_H__ */