From 49d861979ba25240cdcf1cb9e7c881ab4a5468f2 Mon Sep 17 00:00:00 2001 From: Giovanni evilaliv3 Pellerano Date: Fri, 17 May 2013 14:45:13 +0200 Subject: [PATCH] remote power switch example updated to use coap version 13 --- examples/seedeye/powerswitch/Makefile | 28 ++++++++++++++++++++------- platform/seedeye/contiki-conf.h | 2 ++ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/examples/seedeye/powerswitch/Makefile b/examples/seedeye/powerswitch/Makefile index f8fc0570f..da5e2d82f 100644 --- a/examples/seedeye/powerswitch/Makefile +++ b/examples/seedeye/powerswitch/Makefile @@ -1,3 +1,7 @@ +ifndef TARGET +TARGET=seedeye +endif + all: remotepowerswitch CONTIKI=../../../ @@ -8,31 +12,41 @@ WITH_UIP6=1 # for some platforms UIP_CONF_IPV6=1 -# variable for this Makefile -# configure CoAP implementation (3|7) (er-coap-07 also supports CoAP draft 08) -WITH_COAP=7 +WITH_COAP=13 UIP_CONF_RPL=1 # REST framework, requires WITH_COAP -ifeq ($(WITH_COAP), 7) +ifeq ($(WITH_COAP), 13) +${info INFO: compiling with CoAP-13} +CFLAGS += -DWITH_COAP=13 +CFLAGS += -DREST=coap_rest_implementation +CFLAGS += -DUIP_CONF_TCP=0 +APPS += er-coap-13 +else ifeq ($(WITH_COAP), 12) +${info INFO: compiling with CoAP-12} +CFLAGS += -DWITH_COAP=12 +CFLAGS += -DREST=coap_rest_implementation +CFLAGS += -DUIP_CONF_TCP=0 +APPS += er-coap-12 +else ifeq ($(WITH_COAP), 7) ${info INFO: compiling with CoAP-08} CFLAGS += -DWITH_COAP=7 CFLAGS += -DREST=coap_rest_implementation CFLAGS += -DUIP_CONF_TCP=0 -APPS += er-coap-07 +APPS += er-coap-07 else ifeq ($(WITH_COAP), 3) ${info INFO: compiling with CoAP-03} CFLAGS += -DWITH_COAP=3 CFLAGS += -DREST=coap_rest_implementation CFLAGS += -DUIP_CONF_TCP=0 -APPS += er-coap-03 +APPS += er-coap-03 else ${info INFO: compiling with HTTP} CFLAGS += -DWITH_HTTP CFLAGS += -DREST=http_rest_implementation CFLAGS += -DUIP_CONF_TCP=1 -APPS += er-http-engine +APPS += er-http-engine endif APPS += erbium diff --git a/platform/seedeye/contiki-conf.h b/platform/seedeye/contiki-conf.h index ceaff1cd6..80ca80947 100644 --- a/platform/seedeye/contiki-conf.h +++ b/platform/seedeye/contiki-conf.h @@ -104,6 +104,8 @@ typedef uint32_t rtimer_clock_t; #define UIP_CONF_ND6_RETRANS_TIMER 10000 +#define UIP_CONF_BUFFER_SIZE 240 + #ifndef QUEUEBUF_CONF_NUM #define QUEUEBUF_CONF_NUM 16 #endif /* QUEUEBUF_CONF_NUM */