From 6c607b702a7889115d3aa33e0c913b1631ba141f Mon Sep 17 00:00:00 2001 From: Adam Dunkels Date: Fri, 2 Sep 2011 13:52:19 +0200 Subject: [PATCH] Use the SICSLOWPAN_CONF_COMPRESSION_THRESHOLD to avoid compressing IPv6 packets smaller than 60 bytes. This allows us to use ContikiMAC without its header, making it 802.15.4 compliant again. --- platform/sky/contiki-conf.h | 9 ++++++++- platform/z1/contiki-conf.h | 9 +++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/platform/sky/contiki-conf.h b/platform/sky/contiki-conf.h index f87d10ae6..7a4ecbc8c 100644 --- a/platform/sky/contiki-conf.h +++ b/platform/sky/contiki-conf.h @@ -4,7 +4,6 @@ #ifndef CONTIKI_CONF_H #define CONTIKI_CONF_H - #ifdef PROJECT_CONF_H #include "project-conf.h" #endif /* PROJECT_CONF_H */ @@ -43,6 +42,14 @@ #if WITH_UIP6 /* Network setup for IPv6 */ #define NETSTACK_CONF_NETWORK sicslowpan_driver + +/* Specify a minimum packet size for 6lowpan compression to be + enabled. This is needed for ContikiMAC, which needs packets to be + larger than a specified size, if no ContikiMAC header should be + used. */ +#define SICSLOWPAN_CONF_COMPRESSION_THRESHOLD 60 +#define CONTIKIMAC_CONF_WITH_CONTIKIMAC_HEADER 0 + #define CXMAC_CONF_ANNOUNCEMENTS 0 #define XMAC_CONF_ANNOUNCEMENTS 0 diff --git a/platform/z1/contiki-conf.h b/platform/z1/contiki-conf.h index 9753b54c0..f3c6240b3 100644 --- a/platform/z1/contiki-conf.h +++ b/platform/z1/contiki-conf.h @@ -41,13 +41,18 @@ /* Network setup for IPv6 */ #define NETSTACK_CONF_NETWORK sicslowpan_driver -/* #define NETSTACK_CONF_MAC nullmac_driver */ -/* #define NETSTACK_CONF_RDC sicslowmac_driver */ #define NETSTACK_CONF_MAC csma_driver #define NETSTACK_CONF_RDC contikimac_driver #define NETSTACK_CONF_RADIO cc2420_driver #define NETSTACK_CONF_FRAMER framer_802154 +/* Specify a minimum packet size for 6lowpan compression to be + enabled. This is needed for ContikiMAC, which needs packets to be + larger than a specified size, if no ContikiMAC header should be + used. */ +#define SICSLOWPAN_CONF_COMPRESSION_THRESHOLD 60 +#define CONTIKIMAC_CONF_WITH_CONTIKIMAC_HEADER 0 + #define CC2420_CONF_AUTOACK 1 #define NETSTACK_RDC_CHANNEL_CHECK_RATE 8 #define RIME_CONF_NO_POLITE_ANNOUCEMENTS 0