Merge branch 'contiki' into osd

This commit is contained in:
Harald Pichler 2014-12-07 15:24:00 +01:00
commit a02be51f08
274 changed files with 1159 additions and 1285 deletions

View file

@ -5,4 +5,5 @@ SMALL = 1
all: netdb-client netdb-server
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -7,4 +7,5 @@ SMALL = 1
all: shell-db
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -3,4 +3,5 @@ CONTIKI_PROJECT = hello-world blink-hello timer-test sensors-demo
all: $(CONTIKI_PROJECT)
CONTIKI = ../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -2,8 +2,6 @@ DEFINES+=PROJECT_CONF_H=\"project-conf.h\"
# We need uIPv6, therefore we also need banking
HAVE_BANKING=1
UIP_CONF_IPV6=1
UIP_CONF_RPL=1
PROJECT_SOURCEFILES += slip-bridge.c
@ -12,5 +10,5 @@ CONTIKI_PROJECT = border-router
all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

View file

@ -5,4 +5,5 @@ DEFINES+=MODELS_CONF_CC2531_USB_STICK=1
all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -7,4 +7,5 @@ all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -1,8 +1,6 @@
DEFINES+=PROJECT_CONF_H=\"project-conf.h\"
HAVE_BANKING=1
UIP_CONF_IPV6=1
UIP_CONF_RPL=1
PROJECT_SOURCEFILES += ping6.c
@ -11,5 +9,7 @@ CONTIKI_PROJECT = client server
all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
CONTIKI_WITH_IPV6 = 1
# needed for rimestats
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -4,4 +4,5 @@ CONTIKI_PROJECT = cc2538-demo timer-test
all: $(CONTIKI_PROJECT)
CONTIKI = ../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -6,5 +6,5 @@ CONTIKI_PROJECT = sniffer
all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -1,10 +1,7 @@
UIP_CONF_IPV6=1
UIP_CONF_RPL=1
CONTIKI_PROJECT = udp-echo-server
all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

View file

@ -4,4 +4,5 @@ all: $(CONTIKI_PROJECT)
APPS = serial-shell powertrace collect-view
CONTIKI = ../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -3,4 +3,5 @@ all: $(CONTIKI_PROJECT)
TARGET=mbxxx
CONTIKI = ../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -4,4 +4,5 @@ all: $(CONTIKI_PROJECT)
APPS = email
CONTIKI = ../..
CONTIKI_WITH_IPV4 = 1
include $(CONTIKI)/Makefile.include

View file

@ -3,12 +3,6 @@ all: er-example-server er-example-client
CONTIKI=../..
# Contiki IPv6 configuration
WITH_UIP6=1
UIP_CONF_IPV6=1
CFLAGS += -DUIP_CONF_IPV6=1
CFLAGS += -DUIP_CONF_IPV6_RPL=1
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
# automatically build RESTful resources
@ -37,6 +31,7 @@ APPS += rest-engine
#CUSTOM_RULE_C_TO_OBJECTDIR_O = 1
#CUSTOM_RULE_S_TO_OBJECTDIR_O = 1
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include
# minimal-net target is currently broken in Contiki
@ -46,7 +41,7 @@ ${info INFO: er-example compiling with large buffers}
CFLAGS += -DUIP_CONF_BUFFER_SIZE=1300
CFLAGS += -DREST_MAX_CHUNK_SIZE=1024
CFLAGS += -DCOAP_MAX_HEADER_SIZE=176
CFLAGS += -DUIP_CONF_IPV6_RPL=0
CONTIKI_WITH_RPL=0
endif
# optional rules to get assembly

View file

@ -3,5 +3,6 @@ all: $(CONTIKI_PROJECT)
APPS = serial-shell
CONTIKI = ../..
CONTIKI_WITH_RIME = 1
CONTIKI_WITH_IPV4 = 1
include $(CONTIKI)/Makefile.include

View file

@ -5,4 +5,5 @@ CONTIKI_PROJECT = extended-rf-api
all: $(CONTIKI_PROJECT)
CONTIKI = ../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -4,4 +4,5 @@ all: $(CONTIKI_PROJECT)
APPS = ftp
CONTIKI = ../..
CONTIKI_WITH_IPV4 = 1
include $(CONTIKI)/Makefile.include

View file

@ -1,7 +1,5 @@
CONTIKI_PROJECT = hello-world
all: $(CONTIKI_PROJECT)
#UIP_CONF_IPV6=1
CONTIKI = ../..
include $(CONTIKI)/Makefile.include

View file

@ -1,6 +1,5 @@
CONTIKI=../../..
UIP_CONF_IPV6=1
SMALL=1
PROJECT_SOURCEFILES += json-ws.c
@ -26,4 +25,5 @@ ifneq ($(TARGET),)
all: websense-$(TARGET)
endif
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

View file

@ -1,5 +1,4 @@
DEFINES+=PROJECT_CONF_H=\"project-conf.h\"
UIP_CONF_IPV6=1
CONTIKI_PROJECT = root intermediate sink
all: $(CONTIKI_PROJECT)
@ -8,4 +7,5 @@ CONTIKI = ../../..
MODULES += core/net/ipv6/multicast
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

View file

@ -47,9 +47,9 @@
#include "contiki-net.h"
#include "net/ipv6/multicast/uip-mcast6.h"
#if !UIP_CONF_IPV6 || !UIP_CONF_ROUTER || !UIP_CONF_IPV6_MULTICAST || !UIP_CONF_IPV6_RPL
#if !NETSTACK_CONF_WITH_IPV6 || !UIP_CONF_ROUTER || !UIP_CONF_IPV6_MULTICAST || !UIP_CONF_IPV6_RPL
#error "This example can not work with the current contiki configuration"
#error "Check the values of: UIP_CONF_IPV6, UIP_CONF_ROUTER, UIP_CONF_IPV6_RPL"
#error "Check the values of: NETSTACK_CONF_WITH_IPV6, UIP_CONF_ROUTER, UIP_CONF_IPV6_RPL"
#endif
/*---------------------------------------------------------------------------*/
PROCESS(mcast_intermediate_process, "Intermediate Process");

View file

@ -52,7 +52,6 @@
#undef UIP_CONF_IPV6_RPL
#undef UIP_CONF_ND6_SEND_RA
#undef UIP_CONF_ROUTER
#define UIP_CONF_IPV6_RPL 1
#define UIP_CONF_ND6_SEND_RA 0
#define UIP_CONF_ROUTER 1
#define UIP_MCAST6_ROUTE_CONF_ROUTES 1

View file

@ -63,9 +63,9 @@ static struct uip_udp_conn * mcast_conn;
static char buf[MAX_PAYLOAD_LEN];
static uint32_t seq_id;
#if !UIP_CONF_IPV6 || !UIP_CONF_ROUTER || !UIP_CONF_IPV6_MULTICAST || !UIP_CONF_IPV6_RPL
#if !NETSTACK_CONF_WITH_IPV6 || !UIP_CONF_ROUTER || !UIP_CONF_IPV6_MULTICAST || !UIP_CONF_IPV6_RPL
#error "This example can not work with the current contiki configuration"
#error "Check the values of: UIP_CONF_IPV6, UIP_CONF_ROUTER, UIP_CONF_IPV6_RPL"
#error "Check the values of: NETSTACK_CONF_WITH_IPV6, UIP_CONF_ROUTER, UIP_CONF_IPV6_RPL"
#endif
/*---------------------------------------------------------------------------*/
PROCESS(rpl_root_process, "RPL ROOT, Multicast Sender");

View file

@ -57,9 +57,9 @@ static uint16_t count;
#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
#if !UIP_CONF_IPV6 || !UIP_CONF_ROUTER || !UIP_CONF_IPV6_MULTICAST || !UIP_CONF_IPV6_RPL
#if !NETSTACK_CONF_WITH_IPV6 || !UIP_CONF_ROUTER || !UIP_CONF_IPV6_MULTICAST || !UIP_CONF_IPV6_RPL
#error "This example can not work with the current contiki configuration"
#error "Check the values of: UIP_CONF_IPV6, UIP_CONF_ROUTER, UIP_CONF_IPV6_RPL"
#error "Check the values of: NETSTACK_CONF_WITH_IPV6, UIP_CONF_ROUTER, UIP_CONF_IPV6_RPL"
#endif
/*---------------------------------------------------------------------------*/
PROCESS(mcast_sink_process, "Multicast Sink");

View file

@ -4,9 +4,6 @@ APPS = slip-cmd
CONTIKI=../../..
UIP_CONF_IPV6=1
CFLAGS+= -DUIP_CONF_IPV6_RPL -DUIP_CONF_IPV6 -DWITH_UIP6
#linker optimizations
SMALL=1
@ -23,6 +20,7 @@ APPS += $(WITH_WEBSERVER)
CFLAGS += -DWEBSERVER=2
endif
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include
connect-router: border-router.native

View file

@ -3,9 +3,6 @@ all: $(CONTIKI_PROJECT)
CONTIKI=../../..
UIP_CONF_IPV6=1
CFLAGS+= -DUIP_CONF_IPV6_RPL
#linker optimizations
SMALL=1
@ -26,10 +23,12 @@ PROJECT_SOURCEFILES += slip-bridge.c
WITH_WEBSERVER=1
ifeq ($(WITH_WEBSERVER),1)
CFLAGS += -DUIP_CONF_TCP=1
CFLAGS += -DWEBSERVER=1
PROJECT_SOURCEFILES += httpd-simple.c
else ifneq ($(WITH_WEBSERVER), 0)
APPS += $(WITH_WEBSERVER)
CFLAGS += -DUIP_CONF_TCP=1
CFLAGS += -DWEBSERVER=2
endif
@ -37,6 +36,7 @@ ifeq ($(PREFIX),)
PREFIX = aaaa::1/64
endif
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include
$(CONTIKI)/tools/tunslip6: $(CONTIKI)/tools/tunslip6.c

View file

@ -3,14 +3,11 @@ APPS = powertrace collect-view
CONTIKI_PROJECT = udp-sender udp-sink
PROJECT_SOURCEFILES += collect-common.c
UIP_CONF_IPV6=1
CFLAGS+= -DUIP_CONF_IPV6_RPL
ifdef PERIOD
CFLAGS=-DPERIOD=$(PERIOD)
endif
all: $(CONTIKI_PROJECT)
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

View file

@ -2,10 +2,6 @@ all: udp-client udp-server
APPS=servreg-hack
CONTIKI=../../..
UIP_CONF_IPV6=1
CFLAGS+= -DUIP_CONF_IPV6_RPL
ifdef WITH_COMPOWER
APPS+=powertrace
CFLAGS+= -DCONTIKIMAC_CONF_COMPOWER=1 -DWITH_COMPOWER=1 -DQUEUEBUF_CONF_NUM=4
@ -18,4 +14,5 @@ ifdef PERIOD
CFLAGS+=-DPERIOD=$(PERIOD)
endif
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

View file

@ -2,7 +2,5 @@ all: broadcast-example unicast-sender unicast-receiver
APPS=servreg-hack
CONTIKI=../../..
UIP_CONF_IPV6=1
CFLAGS+= -DUIP_CONF_IPV6_RPL
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

View file

@ -2,9 +2,6 @@ all: sky-websense
CONTIKI=../../..
UIP_CONF_IPV6=1
CFLAGS+= -DUIP_CONF_IPV6_RPL
APPS += webbrowser
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
@ -12,6 +9,7 @@ CONTIKI_SOURCEFILES += wget.c
PROJECTDIRS += ../rpl-border-router
PROJECT_SOURCEFILES += httpd-simple.c
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include
$(CONTIKI)/tools/tunslip6: $(CONTIKI)/tools/tunslip6.c

View file

@ -8,9 +8,6 @@ endif
CONTIKI=../../..
UIP_CONF_IPV6=1
UIP_CONF_RPL=0
#linker optimizations
SMALL=1
@ -26,4 +23,6 @@ ifeq ($(TARGET),econotag)
PROJECT_SOURCEFILES += slip-radio-mc1322x.c
endif
CONTIKI_WITH_RPL = 0
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

View file

@ -39,9 +39,6 @@
#undef UIP_CONF_ROUTER
#define UIP_CONF_ROUTER 0
#undef UIP_CONF_IPV6_RPL
#define UIP_CONF_IPV6_RPL 0
#define CMD_CONF_OUTPUT slip_radio_cmd_output
/* add the cmd_handler_cc2420 + some sensors if TARGET_SKY */

View file

@ -4,4 +4,5 @@ all: $(CONTIKI_PROJECT)
APPS = irc
CONTIKI = ../..
CONTIKI_WITH_IPV4 = 1
include $(CONTIKI)/Makefile.include

View file

@ -4,11 +4,8 @@ all: $(CONTIKI_PROJECT)
CONTIKI = ../../../..
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
WITH_UIP6=1
UIP_CONF_IPV6=1
CFLAGS+= -DUIP_CONF_IPV6_RPL
#linker optimizations
SMALL=1
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

View file

@ -4,11 +4,8 @@ all: $(CONTIKI_PROJECT)
CONTIKI = ../../../..
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
WITH_UIP6=1
UIP_CONF_IPV6=1
CFLAGS+= -DUIP_CONF_IPV6_RPL
#linker optimizations
SMALL=1
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

View file

@ -3,4 +3,5 @@ CONTIKI_PROJECT = acc-example
all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -3,4 +3,5 @@ CONTIKI_PROJECT = test-button
all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -4,4 +4,5 @@ all: $(CONTIKI_PROJECT)
COFFEE=1
CONTIKI = ../../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -9,4 +9,5 @@ PROJECT_SOURCEFILES = shell-sensors.c
all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -2,8 +2,6 @@ all: mbxxx-websense
CONTIKI=../../..
UIP_CONF_IPV6=1
APPS += webserver webbrowser
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
@ -11,6 +9,7 @@ CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
PROJECTDIRS += ../../ipv6/rpl-border-router
PROJECT_SOURCEFILES += httpd-simple.c
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include
$(CONTIKI)/tools/tunslip6: $(CONTIKI)/tools/tunslip6.c

View file

@ -11,6 +11,7 @@ APPS = serial-shell
PROJECT_SOURCEFILES = shell-exec.c
CONTIKI = ../../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include
%.shell-upload: %.ce

View file

@ -1,6 +1,4 @@
CONTIKI_PROJECT = telnet-server
UIP_CONF_IPV6=1
APPS = telnetd
@ -11,4 +9,5 @@ PROJECT_SOURCEFILES = shell-sensors.c
all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

View file

@ -3,4 +3,5 @@ CONTIKI_PROJECT = temp-sensor
all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

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

View file

@ -2,16 +2,13 @@ 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 = ../../..
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

View file

@ -164,7 +164,7 @@ make_neighbor(void *arg)
return 0;
}
#if !UIP_CONF_IPV6
#if !NETSTACK_CONF_WITH_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],
@ -212,7 +212,7 @@ make_neighbor(void *arg)
n->addr.u8[6],
n->addr.u8[7]);
#endif /* UIP_CONF_IPV6 */
#endif /* NETSTACK_CONF_WITH_IPV6 */
}
/*---------------------------------------------------------------------------*/
static

View file

@ -2,4 +2,5 @@ CONTIKI_PROJECT = multi-threading
all: $(CONTIKI_PROJECT)
CONTIKI = ../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -3,4 +3,5 @@ all: $(CONTIKI_PROJECT)
APPS=serial-shell
CONTIKI = ../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -1,7 +1,6 @@
all: example-ping6
APPS=ping6
UIP_CONF_IPV6=1
CONTIKI = ../..
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

View file

@ -3,4 +3,5 @@ APPS+=powertrace
all: $(CONTIKI_PROJECT)
CONTIKI = ../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -1,12 +1,10 @@
all: ravenusbstick
#Define CONTIKI_NO_NET=1 for a passthrough ipv6/6lowpan interface using fakeuip.c
#Define UIP_CONF_IPV6=1 to include the uip6 stack (for rpl, internal webserver)
#Define CONTIKI_WITH_IPV6 = 1 to include the uip6 stack (for rpl, internal webserver)
#Do make clean when switching to remove the duplicate library modules
CONTIKI_NO_NET=1
#UIP_CONF_IPV6=1
CFLAGS=-DUIP_CONF_IPV6=0 -DUIP_CONF_IPV6_RPL=0
CONTIKI_WITH_IPV6=0
CONTIKI = ../..

View file

@ -6,8 +6,6 @@ endif
CONTIKI=../..
UIP_CONF_IPV6=1
WITH_COAP = 1
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
@ -20,6 +18,7 @@ CFLAGS += -DWITH_HTTP
APPS += rest-http
endif
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include
$(CONTIKI)/tools/tunslip6: $(CONTIKI)/tools/tunslip6.c

View file

@ -4,4 +4,5 @@ all: example-abc example-mesh example-collect example-trickle example-polite \
example-rudolph0 example-rudolph1 example-rudolph2 example-rucb \
example-runicast example-unicast example-neighbors
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -0,0 +1,23 @@
DEFINES=PROJECT_CONF_H=\"project-conf.h\"
ifndef TARGET
TARGET = z1
endif
CONTIKI = ../..
CONTIKI_PROJECT = rssi-scanner-cc2420
all: $(CONTIKI_PROJECT)
%.class: %.java
javac $(basename $<).java
viewrssi3d: ViewRSSI3D.class
make login | java ViewRSSI3D
viewrssi: ViewRSSI.class
make login | java ViewRSSI
include $(CONTIKI)/Makefile.include

View file

@ -1,4 +1,5 @@
/*
* Copyright (c) 2007, Swedish Institute of Computer Science.
* Copyright (c) 2010, University of Luebeck, Germany.
* All rights reserved.
*
@ -25,9 +26,14 @@
* 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.
*
* Author: Carlo Alberto Boano <cboano@iti.uni-luebeck.de>, Joakim Eriksson, <joakime@sics.se>
*
*/
/**
* \file
* ViewRSSI java application
* \author
* Joakim Eriksson <joakime@sics.se>
* Carlo Alberto Boano <cboano@iti.uni-luebeck.de>
*/
import javax.swing.*;

View file

@ -1,7 +1,7 @@
/**
* 3D RSSI Viewer - view RSSI values of 802.15.4 channels
* ---------------------------------------------------
* Note: run the rssi-scanner on a Sky or sentilla node connected to USB
* Note: run the rssi-scanner on a Sky, Z1 or sentilla node connected to USB
* then start with
* make login | java ViewRSSI3D
*

View file

@ -54,15 +54,22 @@ static void
set_frq(int c)
{
int f;
// We can read even other channels with CC2420!
// Fc = 2048 + FSCTRL ; Fc = 2405 + 5(k-11) MHz, k=11,12, ... , 26
f = c + 352; // Start from 2400 MHz to 2485 MHz,
//FASTSPI_SETREG(CC2420_FSCTRL, f);
//FASTSPI_STROBE(CC2420_SRXON);
CC2420_WRITE_REG(CC2420_FSCTRL, f);
CC2420_STROBE(CC2420_SRXON);
}
/* We can read even other channels with CC2420! */
/* Fc = 2048 + FSCTRL ; Fc = 2405 + 5(k-11) MHz, k=11,12, ... , 26 */
f = c + 352; /* Start from 2400 MHz to 2485 MHz, */
/* Write the new channel value */
CC2420_SPI_ENABLE();
SPI_WRITE_FAST(CC2420_FSCTRL);
SPI_WRITE_FAST((uint8_t)(f >> 8));
SPI_WRITE_FAST((uint8_t)(f & 0xff));
SPI_WAITFORTx_ENDED();
SPI_WRITE(0);
/* Send the strobe */
SPI_WRITE(CC2420_SRXON);
CC2420_SPI_DISABLE();
}
static void
do_rssi(void)
{
@ -74,7 +81,6 @@ do_rssi(void)
}
printf("\n");
}
/*---------------------------------------------------------------------------*/
PROCESS(scanner_process, "RSSI Scanner");
AUTOSTART_PROCESSES(&scanner_process);

View file

@ -7,13 +7,8 @@ all: remotepowerswitch
CONTIKI=../../../
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
# for some platforms
UIP_CONF_IPV6=1
WITH_COAP=13
UIP_CONF_RPL=1
# REST framework, requires WITH_COAP
ifeq ($(WITH_COAP), 13)
${info INFO: compiling with CoAP-13}
@ -49,4 +44,5 @@ endif
APPS += erbium
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

View file

@ -13,4 +13,5 @@ CONTIKI_PROJECT += timer-test blink-hello broadcast-rime
all: $(CONTIKI_PROJECT)
CONTIKI = ../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -7,8 +7,6 @@ DEFINES+=MODEL_N601,PROJECT_CONF_H
# We need uIPv6, therefore we also need banking
HAVE_BANKING=1
UIP_CONF_IPV6=1
UIP_CONF_RPL=1
PROJECT_SOURCEFILES += slip-bridge.c
@ -17,4 +15,5 @@ all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

View file

@ -14,4 +14,5 @@ all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -6,8 +6,6 @@ endif
DEFINES+=MODEL_N740
HAVE_BANKING=1
UIP_CONF_IPV6=1
UIP_CONF_RPL=1
OFFSET_FIRMWARE=1
CONTIKI_PROJECT = disco-example
@ -16,4 +14,5 @@ all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

View file

@ -13,4 +13,5 @@ all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -13,5 +13,5 @@ CONTIKI_PROJECT = event-post
all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -7,7 +7,6 @@ DEFINES+=MODEL_N740,PROJECT_CONF_H
# This example won't fit in flash without banking so we turn it on
HAVE_BANKING=1
UIP_CONF_IPV6=1
CONTIKI_SOURCEFILES += sensors-driver.c
@ -15,5 +14,5 @@ CONTIKI_PROJECT = sensors-ipv6
all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

View file

@ -13,5 +13,5 @@ CONTIKI_PROJECT = sensors-example
all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -10,4 +10,5 @@ CONTIKI_PROJECT = flash
all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -12,5 +12,5 @@ CONTIKI_PROJECT = sniffer
all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -7,8 +7,6 @@ DEFINES+=MODEL_N740,PROJECT_CONF_H
# This example won't fit in flash without banking so we turn it on
HAVE_BANKING=1
UIP_CONF_IPV6=1
UIP_CONF_RPL=1
CONTIKI_SOURCEFILES += ping6.c
@ -16,5 +14,7 @@ CONTIKI_PROJECT = client server
all: $(CONTIKI_PROJECT)
CONTIKI = ../../..
CONTIKI_WITH_IPV6 = 1
# needed for rimestats
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -1,10 +1,9 @@
CONTIKI_PROJECT = example-servreg-client
all: $(CONTIKI_PROJECT)
UIP_CONF_IPV6=1
APPS=servreg-hack
CONTIKI = ../..
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include
-include /home/user/nes/testbed-scripts/Makefile.include

View file

@ -2,4 +2,5 @@ CONTIKI_PROJECT = settings-example
all: $(CONTIKI_PROJECT)
CFLAGS += -DCONTIKI_CONF_SETTINGS_MANAGER=1
CONTIKI = ../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -2,7 +2,7 @@ CONTIKI_PROJECT = sky-webserver
all: sky-webserver sky-telnet-server telnet
PLATFORM_BUILD=1 # This is needed to avoid the shell to include the httpd-cfs version of the webserver
APPS = webserver telnetd
CFLAGS = -DWITH_UIP=1 -I.
CFLAGS = -I.
SMALL=1
DEFINES=NETSTACK_CONF_RDC=cxmac_driver,NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE=8
@ -19,6 +19,8 @@ DEFINES=NETSTACK_CONF_RDC=cxmac_driver,NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE=8
# endif
CONTIKI = ../..
CONTIKI_WITH_IPV4 = 1
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include
sky-webserver.$(TARGET): $(OBJECTDIR)/ajax-cgi.o

View file

@ -7,6 +7,7 @@ DEFINES=ELFLOADER_DATAMEMORY_SIZE=0x100,ELFLOADER_TEXTMEMORY_SIZE=0x100
APPS = serial-shell
CONTIKI = ../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include
%.shell-upload: %.ce

View file

@ -2,11 +2,13 @@ CONTIKI_PROJECT = sky-shell-webserver
all: $(CONTIKI_PROJECT)
PROJECT_SOURCEFILES = webserver-nogui.c
HTTPD_CFS=1
CFLAGS = -DWITH_UIP=1 -DRESOLV_CONF_SUPPORTS_MDNS=0
CFLAGS = -DRESOLV_CONF_SUPPORTS_MDNS=0
DEFINES=NETSTACK_MAC=nullmac_driver,NETSTACK_RDC=nullrdc_driver
SMALL=1
CONTIKI = ../..
APPS = webserver serial-shell
CONTIKI_WITH_IPV4 = 1
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -51,7 +51,7 @@ PROCESS_THREAD(sky_shell_process, ev, data)
{
PROCESS_BEGIN();
/* WITH_UIP=1 assumes incoming SLIP serial data.
/* NETSTACK_CONF_WITH_IPV4=1 assumes incoming SLIP serial data.
* We override this assumption by restoring default serial input handler. */
uart1_set_input(serial_line_input_byte);
serial_line_init();

View file

@ -4,6 +4,7 @@ all: $(CONTIKI_PROJECT)
APPS = serial-shell powertrace collect-view
CONTIKI = ../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include
-include /home/user/nes/testbed-scripts/Makefile.include

View file

@ -11,10 +11,6 @@ all: blink sky-collect #rt-leds test-button test-cfs tcprudolph0
echo $(basename $<)/$(basename $<).ihex 600 > $(basename $<)/runfile ; \
tar czf $@ $(basename $<)
%.class: %.java
javac $(basename $<).java
viewrssi: ViewRSSI.class
make login | java ViewRSSI
CONTIKI_WITH_IPV4 = 1
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -1,105 +0,0 @@
/**
* RSSI Viewer - view RSSI values of 802.15.4 channels
* ---------------------------------------------------
* Note: run the rssi-scanner on a Sky or sentilla node connected to USB
* then start with
* make ViewRSSI.class
* make login | java ViewRSSI
* or
* make viewrssi
*
* Created: Fri Apr 24 00:40:01 2009, Joakim Eriksson
*
* @author Joakim Eriksson, SICS
* @version 1.0
*/
import javax.swing.*;
import java.awt.*;
import java.io.*;
public class ViewRSSI extends JPanel {
private int[] rssi = new int[80];
private int[] rssiMax = new int[80];
/* 55 is added by the scanner. 45 is the offset of the CC2420 */
private final int DELTA = -55 -45;
/* this is the max value of the RSSI from the cc2420 */
private static final int RSSI_MAX_VALUE = 200;
public ViewRSSI() {
}
public void paint(Graphics g) {
int h = getHeight();
int w = getWidth();
double factor = (h - 20.0) / RSSI_MAX_VALUE;
double sSpacing = (w - 15) / 80.0;
int sWidth = (int) (sSpacing - 1);
if (sWidth == 0)
sWidth = 1;
Graphics2D g2d=(Graphics2D)g;
Font myFont=new Font("Arial", Font.PLAIN, 8);
g2d.setFont( myFont );
g.setColor(Color.white);
g.fillRect(0, 0, w, h);
g.setColor(Color.gray);
double xpos = 10;
for (int i = 0, n = rssi.length; i < n; i++) {
int rssi = (int) (rssiMax[i] * factor);
g.fillRect((int) xpos, h - 20 - rssi, sWidth, rssi + 1);
g2d.drawString(Integer.toString(rssiMax[i] + DELTA), (int)xpos,h - 20 - rssi - 5 );
xpos += sSpacing;
}
xpos = 10;
for (int i = 0, n = rssi.length; i < n; i++) {
g.setColor(Color.black);
int rssiVal = (int) (rssi[i] * factor);
g.fillRect((int) xpos, h - 20 - rssiVal, sWidth, rssiVal + 1);
g2d.drawString(Integer.toString(rssi[i] + DELTA), (int)xpos,h - 20 - rssiVal - 8 );
g.setColor(Color.white);
g2d.drawString(Float.toString((float)i / 5 + (float)56/5), (int)xpos,h - 20 - 5 );
xpos += sSpacing;
}
}
private void handleInput() throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
while (true) {
String line = reader.readLine();
if (line.startsWith("RSSI:")) {
try {
String[] parts = line.substring(5).split(" ");
for (int i = 0, n = parts.length; i < n; i++) {
rssi[i] = 3 * Integer.parseInt(parts[i]);
if (rssi[i] >= rssiMax[i])
rssiMax[i] = rssi[i];
else if (rssiMax[i] > 0)
rssiMax[i]--;
}
} catch (Exception e) {
/* report but do not fail... */
e.printStackTrace();
}
repaint();
}
}
}
public static void main(String[] args) throws IOException {
JFrame win = new JFrame("RSSI Viewer");
ViewRSSI panel;
win.setBounds(10, 10, 300, 300);
win.getContentPane().add(panel = new ViewRSSI());
win.setVisible(true);
win.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
panel.handleInput();
}
}

View file

@ -1,94 +0,0 @@
/*
* Copyright (c) 2007, 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
* Scanning 2.4 GHz radio frequencies using CC2420 and prints
* the values
* \author
* Joakim Eriksson, joakime@sics.se
*/
#include "contiki.h"
#include "net/rime/rime.h"
#include "net/netstack.h"
#include "dev/leds.h"
#include "cc2420.h"
#include "cc2420_const.h"
#include "dev/spi.h"
#include <stdio.h>
/*---------------------------------------------------------------------------*/
/* This assumes that the CC2420 is always on and "stable" */
static void
set_frq(int c)
{
int f;
/* fine graied channel - can we even read other channels with CC2420 ? */
f = c + 302 + 0x4000;
CC2420_WRITE_REG(CC2420_FSCTRL, f);
CC2420_STROBE(CC2420_SRXON);
}
static void
do_rssi(void)
{
int channel;
printf("RSSI:");
for(channel = 0; channel <= 79; ++channel) {
set_frq(channel + 55);
printf("%d ", cc2420_rssi() + 55);
}
printf("\n");
}
/*---------------------------------------------------------------------------*/
PROCESS(scanner_process, "RSSI Scanner");
AUTOSTART_PROCESSES(&scanner_process);
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(scanner_process, ev, data)
{
PROCESS_BEGIN();
/* switch mac layer off, and turn radio on */
NETSTACK_MAC.off(0);
cc2420_on();
while(1) {
do_rssi();
PROCESS_PAUSE();
}
PROCESS_END();
}
/*---------------------------------------------------------------------------*/

View file

@ -1,5 +1,5 @@
all: tcp-server
CONTIKI=../..
CONTIKI_WITH_IPV4 = 1
include $(CONTIKI)/Makefile.include

View file

@ -3,7 +3,6 @@ all: $(CONTIKI_PROJECT)
APPS = telnetd program-handler
WITH_UIP=1
CONTIKI = ../..
CONTIKI_WITH_IPV4 = 1
include $(CONTIKI)/Makefile.include

View file

@ -1,9 +1,8 @@
UIP_CONF_IPV6=1
CONTIKI_PROJECT = trickle-library
all: $(CONTIKI_PROJECT)
CONTIKI = ../..
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

View file

@ -1,6 +1,5 @@
all: udp-server udp-client
UIP_CONF_IPV6=1
CONTIKI = ../..
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

View file

@ -6,8 +6,8 @@ ifndef TARGET
TARGET = sky
endif
UIP_CONF_IPV6 = 1
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
SMALL = 1
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

View file

@ -4,4 +4,5 @@ all: $(CONTIKI_PROJECT)
APPS = webbrowser
CONTIKI = ../..
CONTIKI_WITH_IPV4 = 1
include $(CONTIKI)/Makefile.include

View file

@ -3,9 +3,7 @@ all: webserver6
APPS=raven-webserver raven-lcd-interface
TARGET=avr-raven
UIP_CONF_IPV6=1
#UIP_CONF_RPL=0 //RPL is now the default.
#RF230BB=1 //Use radio driver that communicates with the core MAC layer. Now the default.
#COFFEE_FILES=1 //Static coffee file system in EEPROM
#COFFEE_FILES=2 //Dynamic coffee file system in EEPROM
@ -14,5 +12,5 @@ UIP_CONF_IPV6=1
#COFFEE_ADDRESS=0xnnnn //Override default coffee file system starting address
CONTIKI = ../..
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

View file

@ -34,15 +34,15 @@ all : $(CONTIKI_PROJECT)
@if (test -n "$(ELF_SIZE)");then $(ELF_SIZE) $(CONTIKI_PROJECT).$(TARGET);fi
endif
UIP_CONF_IPV6=1
DEFINES=WITH_UIP6
DEFINES=UIP_CONF_TCP=1
# Make no RPL the default for minimal-net builds
ifeq ($(TARGET),minimal-net)
ifndef UIP_CONF_RPL
UIP_CONF_RPL=0
ifndef CONTIKI_WITH_RPL
CONTIKI_WITH_RPL = 0
endif
endif
CONTIKI = ../..
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

View file

@ -16,6 +16,7 @@ ifeq ($(HTTPD-CFS),1)
endif
CONTIKI = ../..
CONTIKI_WITH_IPV4 = 1
include $(CONTIKI)/Makefile.include
# Intentionally httpd.c and httpd-cfs.c implement the same interface. When

View file

@ -4,4 +4,5 @@ all: $(CONTIKI_PROJECT)
APPS = webbrowser
CONTIKI = ../..
CONTIKI_WITH_IPV4 = 1
include $(CONTIKI)/Makefile.include

View file

@ -15,4 +15,5 @@ endif
all: $(CONTIKI_PROJECT)
CONTIKI = ../..
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include

View file

@ -2,8 +2,6 @@ all: z1-websense
CONTIKI=../../../..
UIP_CONF_IPV6=1
SMALL=1
APPS += webserver webbrowser
@ -13,6 +11,7 @@ CONTIKI_SOURCEFILES += wget.c
PROJECTDIRS += ../../../ipv6/rpl-border-router
PROJECT_SOURCEFILES += httpd-simple.c
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include
$(CONTIKI)/tools/tunslip6: $(CONTIKI)/tools/tunslip6.c

View file

@ -1,33 +0,0 @@
DEFINES=PROJECT_CONF_H=\"project-conf.h\"
# Define the target platform
ifndef TARGET
TARGET=z1
endif
CONTIKI_SOURCEFILES += cc2420-arch.c sensors.c sht11.c
PROJECT_SOURCEFILES = i2cmaster.c tmp102.c adxl345.c battery-sensor.c sky-sensors.c #potentiometer-sensor.c
# Give a name to your project
CONTIKI = ../../../../contiki-2.x/
CONTIKI_PROJECT = rssi-scanner
# Compile project typing "make"
all: $(CONTIKI_PROJECT)
# Upload project typing "make upload"
upload: $(CONTIKI_PROJECT).upload
%.class: %.java
javac $(basename $<).java
viewrssi3d: ViewRSSI3D.class
make login | java ViewRSSI3D
viewrssi: ViewRSSI.class
make login | java ViewRSSI
# ContikiProjects: including the makefile
#include ../../../Makefile.projects
include $(CONTIKI)/Makefile.include

View file

@ -9,6 +9,7 @@ CONTIKI_SOURCEFILES += cc2420-arch.c sensors.c sht11.c
PROJECT_SOURCEFILES = i2cmaster.c tmp102.c adxl345.c battery-sensor.c sky-sensors.c #potentiometer-sensor.c
all: example-unicast2
CONTIKI_WITH_RIME = 1
include $(CONTIKI)/Makefile.include