diff --git a/apps/er-coap-07/er-coap-07-engine.c b/apps/er-coap-07/er-coap-07-engine.c
index 4b3312ca6..6c0c44628 100644
--- a/apps/er-coap-07/er-coap-07-engine.c
+++ b/apps/er-coap-07/er-coap-07-engine.c
@@ -44,7 +44,7 @@
#include "er-coap-07-engine.h"
-#define DEBUG 0
+#define DEBUG 0
#if DEBUG
#define PRINTF(...) printf(__VA_ARGS__)
#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15])
@@ -169,7 +169,7 @@ handle_incoming_data(void)
PRINTF("handle_incoming_data(): block_offset >= response->payload_len\n");
response->code = BAD_OPTION_4_02;
- coap_set_payload(response, (uint8_t*)"Block out of scope", 18);
+ coap_set_payload(response, (uint8_t*)"BlockOutOfScope", 15);
}
else
{
@@ -308,55 +308,79 @@ RESOURCE(well_known_core, METHOD_GET, ".well-known/core", "");
void
well_known_core_handler(void* request, void* response, uint8_t *buffer, uint16_t preferred_size, int32_t *offset)
{
- /* Response might be NULL for non-confirmable requests. */
- if (response)
- {
size_t strpos = 0;
size_t bufpos = 0;
+ size_t tmplen = 0;
resource_t* resource = NULL;
for (resource = (resource_t*)list_head(rest_get_resources()); resource; resource = resource->next)
{
- strpos += snprintf((char *) buffer + bufpos, REST_MAX_CHUNK_SIZE - bufpos + 1,
- "%s>%s%s%s",
- resource->url,
- resource->attributes[0] ? ";" : "",
- resource->attributes,
- resource->next ? "," : "" );
+ PRINTF("res: /%s (%p)\npos: s%d, o%d, b%d\n", resource->url, resource, strpos, *offset, bufpos);
- PRINTF("discover: %s\n", resource->url);
-
- if (strpos <= *offset)
+ if (strpos >= *offset && bufpos < preferred_size)
{
- /* Discard output before current block */
- PRINTF(" if %d <= %ld B\n", strpos, *offset);
- PRINTF(" %s\n", buffer);
- bufpos = 0;
+ buffer[bufpos++] = '<';
}
- else /* (strpos > *offset) */
+ ++strpos;
+
+ if (strpos >= *offset && bufpos < preferred_size)
{
- /* output partly in block */
- size_t len = MIN(strpos - *offset, preferred_size);
+ buffer[bufpos++] = '/';
+ }
+ ++strpos;
- PRINTF(" el %d/%d @ %ld B\n", len, preferred_size, *offset);
+ tmplen = strlen(resource->url);
+ if (strpos+tmplen > *offset)
+ {
+ bufpos += snprintf((char *) buffer + bufpos, preferred_size - bufpos + 1,
+ "%s", resource->url + ((*offset-(int32_t)strpos > 0) ? (*offset-(int32_t)strpos) : 0));
+ /* minimal-net requires these casts */
+ }
+ strpos += tmplen;
- /* Block might start in the middle of the output; align with buffer start. */
- if (bufpos == 0)
+ if (strpos >= *offset && bufpos < preferred_size)
+ {
+ buffer[bufpos++] = '>';
+ }
+ ++strpos;
+
+ if (resource->attributes[0])
+ {
+ if (strpos >= *offset && bufpos < preferred_size)
{
- memmove(buffer, buffer+strlen((char *)buffer)-strpos+*offset, len);
+ buffer[bufpos++] = ';';
}
+ ++strpos;
- bufpos = len;
- PRINTF(" %s\n", buffer);
-
- if (bufpos >= preferred_size)
+ tmplen = strlen(resource->attributes);
+ if (strpos+tmplen > *offset)
{
- break;
+ bufpos += snprintf((char *) buffer + bufpos, preferred_size - bufpos + 1,
+ "%s", resource->attributes + (*offset-(int32_t)strpos > 0 ? *offset-(int32_t)strpos : 0));
}
+ strpos += tmplen;
+ }
+
+ if (resource->next)
+ {
+ if (strpos >= *offset && bufpos < preferred_size)
+ {
+ buffer[bufpos++] = ',';
+ }
+ ++strpos;
+ }
+
+ /* buffer full, but resource not completed yet; or: do not break if resource exactly fills buffer. */
+ if (bufpos >= preferred_size && strpos-bufpos > *offset)
+ {
+ PRINTF("res: BREAK at %s (%p)\n", resource->url, resource);
+ break;
}
}
if (bufpos>0) {
+ PRINTF("BUF %d: %.*s\n", bufpos, bufpos, (char *) buffer);
+
coap_set_payload(response, buffer, bufpos );
coap_set_header_content_type(response, APPLICATION_LINK_FORMAT);
}
@@ -365,17 +389,18 @@ well_known_core_handler(void* request, void* response, uint8_t *buffer, uint16_t
PRINTF("well_known_core_handler(): bufpos<=0\n");
coap_set_rest_status(response, BAD_OPTION_4_02);
- coap_set_payload(response, (uint8_t*)"Block out of scope", 18);
+ coap_set_payload(response, (uint8_t*)"BlockOutOfScope", 15);
}
if (resource==NULL) {
+ PRINTF("res: DONE\n");
*offset = -1;
}
else
{
+ PRINTF("res: MORE at %s (%p)\n", resource->url, resource);
*offset += bufpos;
}
- }
}
/*-----------------------------------------------------------------------------------*/
PROCESS_THREAD(coap_receiver, ev, data)
diff --git a/apps/webserver-nano/httpd-cgi.c b/apps/webserver-nano/httpd-cgi.c
index 7608a9da2..2b0fdfce3 100644
--- a/apps/webserver-nano/httpd-cgi.c
+++ b/apps/webserver-nano/httpd-cgi.c
@@ -524,14 +524,14 @@ static unsigned short
generate_sensor_readings(void *arg)
{
uint16_t numprinted;
- uint16_t h,m,s;
+ uint16_t days,h,m,s;
unsigned long seconds=clock_seconds();
-// uint8_t p1;
static const char httpd_cgi_sensor0[] HTTPD_STRING_ATTR = "[Updated %d seconds ago]
";
static const char httpd_cgi_sensor1[] HTTPD_STRING_ATTR = "Temperature: %s
";
static const char httpd_cgi_sensor2[] HTTPD_STRING_ATTR = "Battery: %s
";
// static const char httpd_cgi_sensr12[] HTTPD_STRING_ATTR = "Temperature: %s Battery: %s
";
- static const char httpd_cgi_sensor3[] HTTPD_STRING_ATTR = "Elapsed timer : %02d:%02d:%02d
";
+ static const char httpd_cgi_sensor3[] HTTPD_STRING_ATTR = "Uptime : %02d:%02d:%02d
";
+ static const char httpd_cgi_sensor3d[] HTTPD_STRING_ATTR = "Uptime : %u days %02u:%02u:%02u
";
// static const char httpd_cgi_sensor4[] HTTPD_STRING_ATTR = "Sleeping time : %02d:%02d:%02d (%d%%)
";
numprinted=0;
@@ -554,33 +554,97 @@ generate_sensor_readings(void *arg)
numprinted+=httpd_snprintf((char *)uip_appdata+numprinted, uip_mss()-numprinted, httpd_cgi_sensor2, sensor_extvoltage);
// numprinted+=httpd_snprintf((char *)uip_appdata+numprinted, uip_mss()-numprinted, httpd_cgi_sensr12, sensor_temperature,sensor_extvoltage);
+
#if RADIOSTATS
/* Remember radioontime for display below - slow connection might make it report longer than cpu ontime! */
savedradioontime = radioontime;
#endif
- h=seconds/3600;
- s=seconds-h*3600;
- m=s/60;
- s=s-m*60;
- numprinted+=httpd_snprintf((char *)uip_appdata + numprinted, uip_mss() - numprinted, httpd_cgi_sensor3, h,m,s);
-
-/* TODO: some gcc's have a bug with %02d format that adds a zero byte and extra chars to the end of the string.
+ h=seconds/3600;s=seconds-h*3600;m=s/60;s=s-m*60;
+ days=h/24;
+ if (days == 0) {
+ numprinted+=httpd_snprintf((char *)uip_appdata + numprinted, uip_mss() - numprinted, httpd_cgi_sensor3, h,m,s);
+ } else {
+ h=h-days*24;
+ numprinted+=httpd_snprintf((char *)uip_appdata + numprinted, uip_mss() - numprinted, httpd_cgi_sensor3d, days,h,m,s);
+ }
+/* TODO: some gcc's have a bug with %02d format that adds an extra char after the string terminator.
* Seen with arm-none-eabi-gcc.exe (Sourcery G++ Lite 2008q3-66) 4.3.2
* Quick cosmetic fix to strip that off: */
- if (*(char *)(uip_appdata + numprinted-3)==0) {numprinted-=3;}
- else if (*(char *)(uip_appdata + numprinted-2)==0) {numprinted-=2;}
- else if (*(char *)(uip_appdata + numprinted-1)==0) {numprinted-=1;}
-
+ if (*(char *)(uip_appdata + numprinted-3)==0) {numprinted-=3;}
+ else if (*(char *)(uip_appdata + numprinted-2)==0) {numprinted-=2;}
+ else if (*(char *)(uip_appdata + numprinted-1)==0) {numprinted-=1;}
+
#if 0
if (sleepseconds) {
- p1=100UL*sleepseconds/seconds;
- h=sleepseconds/3600;
- s=sleepseconds-h*3600;
- m=s/60;
- s=s-m*60;
+ uint8_t p1;
+ p1=100UL*sleepseconds/seconds;h=sleepseconds/3600;s=sleepseconds-h*3600;m=s/60;s=s-m*60;
numprinted+=httpd_snprintf((char *)uip_appdata + numprinted, uip_mss() - numprinted, httpd_cgi_sensor4, h,m,s,p1);
}
#endif
+
+#if ENERGEST_CONF_ON
+{uint8_t p1,p2;
+#if 0
+/* Update all the timers to get current values */
+ for (p1=1;p1buf);
- /* We try to defer, and return an error this wasn't possible */
- int ret = phase_wait(&phase_list, packetbuf_addr(PACKETBUF_ADDR_RECEIVER),
- CYCLE_TIME, GUARD_TIME,
- sent, ptr, curr, 2);
- if(ret != PHASE_DEFERRED) {
- mac_call_sent_callback(sent, ptr, MAC_TX_ERR, 1);
- }
+ /* Return COLLISION so the MAC may try again later */
+ mac_call_sent_callback(sent, ptr, MAC_TX_COLLISION, 1);
return;
}
/* The receiver needs to be awoken before we send */
diff --git a/core/net/mac/cxmac.c b/core/net/mac/cxmac.c
index 61d942813..4e1c336fb 100644
--- a/core/net/mac/cxmac.c
+++ b/core/net/mac/cxmac.c
@@ -699,7 +699,7 @@ qsend_packet(mac_callback_t sent, void *ptr)
mac_call_sent_callback(sent, ptr, ret, 1);
}
/*---------------------------------------------------------------------------*/
-void
+static void
qsend_list(mac_callback_t sent, void *ptr, struct rdc_buf_list *buf_list)
{
if(buf_list != NULL) {
diff --git a/core/net/mac/lpp.c b/core/net/mac/lpp.c
index 11b73c370..7b5188d6f 100644
--- a/core/net/mac/lpp.c
+++ b/core/net/mac/lpp.c
@@ -726,7 +726,7 @@ send_packet(mac_callback_t sent, void *ptr)
}
}
/*---------------------------------------------------------------------------*/
-void
+static void
send_list(mac_callback_t sent, void *ptr, struct rdc_buf_list *buf_list)
{
if(buf_list != NULL) {
diff --git a/core/net/mac/nullrdc-noframer.c b/core/net/mac/nullrdc-noframer.c
index 3a909dcb6..1fa0249bb 100644
--- a/core/net/mac/nullrdc-noframer.c
+++ b/core/net/mac/nullrdc-noframer.c
@@ -41,6 +41,7 @@
#include "net/mac/nullrdc-noframer.h"
#include "net/packetbuf.h"
#include "net/netstack.h"
+#include
/*---------------------------------------------------------------------------*/
static void
@@ -55,7 +56,7 @@ send_packet(mac_callback_t sent, void *ptr)
mac_call_sent_callback(sent, ptr, ret, 1);
}
/*---------------------------------------------------------------------------*/
-void
+static void
send_list(mac_callback_t sent, void *ptr, struct rdc_buf_list *buf_list)
{
if(buf_list != NULL) {
diff --git a/core/net/mac/nullrdc.c b/core/net/mac/nullrdc.c
index c705e64f3..9783249a5 100644
--- a/core/net/mac/nullrdc.c
+++ b/core/net/mac/nullrdc.c
@@ -201,7 +201,7 @@ send_packet(mac_callback_t sent, void *ptr)
mac_call_sent_callback(sent, ptr, ret, 1);
}
/*---------------------------------------------------------------------------*/
-void
+static void
send_list(mac_callback_t sent, void *ptr, struct rdc_buf_list *buf_list)
{
if(buf_list != NULL) {
diff --git a/core/net/mac/phase.c b/core/net/mac/phase.c
index 513330181..6e29ed959 100644
--- a/core/net/mac/phase.c
+++ b/core/net/mac/phase.c
@@ -167,7 +167,7 @@ phase_wait(struct phase_list *list,
const rimeaddr_t *neighbor, rtimer_clock_t cycle_time,
rtimer_clock_t guard_time,
mac_callback_t mac_callback, void *mac_callback_ptr,
- struct rdc_buf_list *buf_list, int extra_deferment)
+ struct rdc_buf_list *buf_list)
{
struct phase *e;
// const rimeaddr_t *neighbor = packetbuf_addr(PACKETBUF_ADDR_RECEIVER);
@@ -176,7 +176,7 @@ phase_wait(struct phase_list *list,
time for the next expected phase and setup a ctimer to switch on
the radio just before the phase. */
e = find_neighbor(list, neighbor);
- if((e != NULL) | extra_deferment) {
+ if(e != NULL) {
rtimer_clock_t wait, now, expected, sync;
clock_time_t ctimewait;
@@ -202,14 +202,10 @@ phase_wait(struct phase_list *list,
if(wait < guard_time) {
wait += cycle_time;
}
- if(extra_deferment) {
- wait += extra_deferment * cycle_time;
- }
-
ctimewait = (CLOCK_SECOND * (wait - guard_time)) / RTIMER_ARCH_SECOND;
- if((ctimewait > PHASE_DEFER_THRESHOLD) | extra_deferment) {
+ if(ctimewait > PHASE_DEFER_THRESHOLD) {
struct phase_queueitem *p;
p = memb_alloc(&queued_packets_memb);
diff --git a/core/net/mac/phase.h b/core/net/mac/phase.h
index 1ce17a697..d74431fcc 100644
--- a/core/net/mac/phase.h
+++ b/core/net/mac/phase.h
@@ -76,7 +76,7 @@ void phase_init(struct phase_list *list);
phase_status_t phase_wait(struct phase_list *list, const rimeaddr_t *neighbor,
rtimer_clock_t cycle_time, rtimer_clock_t wait_before,
mac_callback_t mac_callback, void *mac_callback_ptr,
- struct rdc_buf_list *buf_list, int extra_deferment);
+ struct rdc_buf_list *buf_list);
void phase_update(const struct phase_list *list, const rimeaddr_t *neighbor,
rtimer_clock_t time, int mac_status);
diff --git a/core/net/mac/xmac.c b/core/net/mac/xmac.c
index 864089ecc..7b03bf055 100644
--- a/core/net/mac/xmac.c
+++ b/core/net/mac/xmac.c
@@ -763,7 +763,7 @@ qsend_packet(mac_callback_t sent, void *ptr)
mac_call_sent_callback(sent, ptr, ret, 1);
}
/*---------------------------------------------------------------------------*/
-void
+static void
qsend_list(mac_callback_t sent, void *ptr, struct rdc_buf_list *buf_list)
{
if(buf_list != NULL) {
diff --git a/examples/er-rest-example/Makefile b/examples/er-rest-example/Makefile
index 2d2227c8f..7bf002ebc 100644
--- a/examples/er-rest-example/Makefile
+++ b/examples/er-rest-example/Makefile
@@ -24,8 +24,7 @@ CFLAGS += -DUIP_CONF_IPV6_RPL=1
endif
# linker optimizations
-CFLAGS += -ffunction-sections
-LDFLAGS += -Wl,--gc-sections,--undefined=_reset_vector__,--undefined=InterruptVectors,--undefined=_copy_data_init__,--undefined=_clear_bss_init__,--undefined=_end_of_init__
+SMALL=1
# REST framework, requires WITH_COAP
ifeq ($(WITH_COAP), 7)
diff --git a/examples/er-rest-example/project-conf.h b/examples/er-rest-example/project-conf.h
index f1c94e750..1672795d7 100644
--- a/examples/er-rest-example/project-conf.h
+++ b/examples/er-rest-example/project-conf.h
@@ -34,9 +34,11 @@
#define SICSLOWPAN_CONF_FRAG 1
-#ifndef QUEUEBUF_CONF_NUM
-#define QUEUEBUF_CONF_NUM 6
-#endif
+/* Save some memory for the sky platform */
+#undef UIP_CONF_DS6_NBR_NBU
+#define UIP_CONF_DS6_NBR_NBU 10
+#undef UIP_CONF_DS6_ROUTE_NBU
+#define UIP_CONF_DS6_ROUTE_NBU 10
/* Increase rpl-border-router IP-buffer when using 128 */
#ifndef REST_MAX_CHUNK_SIZE
@@ -45,7 +47,7 @@
/* Decrease to 2 if no space left for stack when using 128-byte chunks */
#ifndef COAP_MAX_OPEN_TRANSACTIONS
-#define COAP_MAX_OPEN_TRANSACTIONS 4
+#define COAP_MAX_OPEN_TRANSACTIONS 4
#endif
/* Must be <= open transaction number */
@@ -62,4 +64,6 @@
#define WEBSERVER_CONF_CFS_CONNS 2
#endif
+
+
#endif /* __PROJECT_RPL_WEB_CONF_H__ */
diff --git a/examples/er-rest-example/rest-server-example.c b/examples/er-rest-example/rest-server-example.c
index 846211169..48bfffb26 100644
--- a/examples/er-rest-example/rest-server-example.c
+++ b/examples/er-rest-example/rest-server-example.c
@@ -93,7 +93,7 @@
* Resources are defined by the RESOURCE macro.
* Signature: resource name, the RESTful methods it handles, and its URI path (omitting the leading slash).
*/
-RESOURCE(helloworld, METHOD_GET, "hello", "title=\"Hello world (set length with ?len query)\";rt=\"Text\"");
+RESOURCE(helloworld, METHOD_GET, "hello", "title=\"Hello world: ?len=0..\";rt=\"Text\"");
/*
* A handler function named [resource name]_handler must be implemented for each RESOURCE.
@@ -105,8 +105,9 @@ void
helloworld_handler(void* request, void* response, uint8_t *buffer, uint16_t preferred_size, int32_t *offset)
{
const char *len = NULL;
- int length = 12; /* ------->| */
- char *message = "Hello World! ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789?!at 86 now+2+4at 99 now100..105..110..115..120..125..130..135..140..145..150..155..160";
+ /* Some data that has the length up to REST_MAX_CHUNK_SIZE. For more, see the chunk resource. */
+ char const * const message = "Hello World! ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxy";
+ int length = 12; /* |<-------->| */
/* The query string can be retrieved by rest_get_query() or parsed for its key-value pairs. */
if (REST.get_query_variable(request, "len", &len)) {
@@ -124,7 +125,7 @@ helloworld_handler(void* request, void* response, uint8_t *buffer, uint16_t pref
}
/* This resource mirrors the incoming request. It shows how to access the options and how to set them for the response. */
-RESOURCE(mirror, METHOD_GET | METHOD_POST | METHOD_PUT | METHOD_DELETE | HAS_SUB_RESOURCES, "mirror", "title=\"Returns your decoded message\";rt=\"Debug\"");
+RESOURCE(mirror, METHOD_GET | METHOD_POST | METHOD_PUT | METHOD_DELETE, "mirror", "title=\"Returns your decoded message\";rt=\"Debug\"");
void
mirror_handler(void* request, void* response, uint8_t *buffer, uint16_t preferred_size, int32_t *offset)
@@ -283,7 +284,7 @@ mirror_handler(void* request, void* response, uint8_t *buffer, uint16_t preferre
*/
RESOURCE(chunks, METHOD_GET, "chunks", "title=\"Blockwise demo\";rt=\"Data\"");
-#define CHUNKS_TOTAL 1030
+#define CHUNKS_TOTAL 2050
void
chunks_handler(void* request, void* response, uint8_t *buffer, uint16_t preferred_size, int32_t *offset)
@@ -294,26 +295,35 @@ chunks_handler(void* request, void* response, uint8_t *buffer, uint16_t preferre
if (*offset>=CHUNKS_TOTAL)
{
REST.set_response_status(response, REST.status.BAD_OPTION);
- REST.set_response_payload(response, (uint8_t*)"Block out of scope", 18);
+ /* A block error message should not exceed the minimum block size (16). */
+ REST.set_response_payload(response, (uint8_t*)"BlockOutOfScope", 15);
return;
}
/* Generate data until reaching CHUNKS_TOTAL. */
- while (strpos CHUNKS_TOTAL)
+
+ /* snprintf() does not adjust return value if truncated by size. */
+ if (strpos > preferred_size)
+ {
+ strpos = preferred_size;
+ }
+
+ /* Truncate if above total size. */
+ if (*offset+(int32_t)strpos > CHUNKS_TOTAL)
{
strpos = CHUNKS_TOTAL - *offset;
}
REST.set_response_payload(response, buffer, strpos);
- /* Signal chunk awareness of resource to framework. */
+ /* IMPORTANT for chunk-wise resources: Signal chunk awareness to REST engine. */
*offset += strpos;
- /* Signal end of resource. */
+ /* Signal end of resource representation. */
if (*offset>=CHUNKS_TOTAL)
{
*offset = -1;
@@ -395,7 +405,7 @@ event_event_handler(resource_t *r)
#if defined (PLATFORM_HAS_LEDS)
/*A simple actuator example, depending on the color query parameter and post variable mode, corresponding led is activated or deactivated*/
-RESOURCE(led, METHOD_POST | METHOD_PUT , "leds", "title=\"Led control (use ?color=red|green|blue and POST/PUT mode=on|off)\";rt=\"Control\"");
+RESOURCE(led, METHOD_POST | METHOD_PUT , "leds", "title=\"LEDs: ?color=r|g|b, POST/PUT mode=on|off\";rt=\"Control\"");
void
led_handler(void* request, void* response, uint8_t *buffer, uint16_t preferred_size, int32_t *offset)
@@ -409,11 +419,11 @@ led_handler(void* request, void* response, uint8_t *buffer, uint16_t preferred_s
if ((len=REST.get_query_variable(request, "color", &color))) {
PRINTF("color %.*s\n", len, color);
- if (strncmp(color, "red", len)==0) {
+ if (strncmp(color, "r", len)==0) {
led = LEDS_RED;
- } else if(strncmp(color,"green", len)==0) {
+ } else if(strncmp(color,"g", len)==0) {
led = LEDS_GREEN;
- } else if (strncmp(color,"blue", len)==0) {
+ } else if (strncmp(color,"b", len)==0) {
led = LEDS_BLUE;
} else {
success = 0;
@@ -524,7 +534,6 @@ battery_handler(void* request, void* response, uint8_t *buffer, uint16_t preferr
}
#endif /* PLATFORM_HAS_BATTERY */
-
PROCESS(rest_server_example, "Rest Server Example");
AUTOSTART_PROCESSES(&rest_server_example);
@@ -569,6 +578,7 @@ PROCESS_THREAD(rest_server_example, ev, data)
rest_activate_resource(&resource_led);
rest_activate_resource(&resource_toggle);
#endif /* PLATFORM_HAS_LEDS */
+
#if defined (PLATFORM_HAS_LIGHT)
SENSORS_ACTIVATE(light_sensor);
rest_activate_resource(&resource_light);
diff --git a/examples/er-rest-example/rest-server-example.csc b/examples/er-rest-example/rest-server-example.csc
index de5c85fa8..837e3d1d4 100644
--- a/examples/er-rest-example/rest-server-example.csc
+++ b/examples/er-rest-example/rest-server-example.csc
@@ -47,9 +47,9 @@
se.sics.cooja.mspmote.SkyMoteType
skyweb
Rest
-
+
make rest-server-example.sky TARGET=sky
- [CONTIKI_DIR]/examples/rest-example/rest-server-example.sky
+ [CONTIKI_DIR]/examples/er-rest-example/rest-server-example.sky
se.sics.cooja.interfaces.Position
se.sics.cooja.interfaces.RimeAddress
se.sics.cooja.interfaces.IPAddress
@@ -98,7 +98,7 @@
se.sics.cooja.plugins.SimControl
259
- 1
+ 5
179
0
0
@@ -115,21 +115,22 @@
7.9849281638410705 0.0 0.0 7.9849281638410705 -133.27812697619663 -225.04752569190535
300
- 0
+ 4
175
- 371
- 2
+ 263
+ 3
se.sics.cooja.plugins.LogListener
+
- 762
- 3
+ 560
+ 1
326
- 12
- 294
+ 1
+ 293
se.sics.cooja.plugins.RadioLogger
@@ -148,10 +149,10 @@
SerialSocketServer
0
422
- 5
+ 2
74
- 1234
- 93
+ 39
+ 199
se.sics.cooja.plugins.TimeLine
@@ -166,10 +167,10 @@
25.49079397896416
1624
- 4
+ 3
252
- 166
- 699
+ 4
+ 622
se.sics.cooja.plugins.MoteInterfaceViewer
@@ -178,11 +179,11 @@
Serial port
0,0
- 662
- 2
- 362
- 7
- 221
+ 702
+ 0
+ 646
+ 564
+ 2
diff --git a/examples/ipv6/rpl-border-router/Makefile b/examples/ipv6/rpl-border-router/Makefile
index dbc8abbb1..c166000bc 100644
--- a/examples/ipv6/rpl-border-router/Makefile
+++ b/examples/ipv6/rpl-border-router/Makefile
@@ -7,6 +7,9 @@ WITH_UIP6=1
UIP_CONF_IPV6=1
CFLAGS+= -DUIP_CONF_IPV6_RPL
+#linker optimizations
+SMALL=1
+
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
PROJECT_SOURCEFILES += slip-bridge.c
diff --git a/platform/minimal-net/contiki-conf.h b/platform/minimal-net/contiki-conf.h
index 02ac073f9..2483e8b5a 100644
--- a/platform/minimal-net/contiki-conf.h
+++ b/platform/minimal-net/contiki-conf.h
@@ -141,7 +141,7 @@ typedef unsigned short uip_stats_t;
#define UIP_CONF_TCP_SPLIT 0
#define UIP_CONF_IP_FORWARD 0
#define UIP_CONF_LOGGING 0
-#define UIP_CONF_UDP_CHECKSUMS 0
+#define UIP_CONF_UDP_CHECKSUMS 1
/* Not used but avoids compile errors while sicslowpan.c is being developed */
#define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_HC06