From 9cb34c85c0afac0be48be651bc3575bc07851446 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Thu, 12 Oct 2017 15:32:58 +0200 Subject: [PATCH] TSCH: more automated configuration --- arch/platform/cooja/contiki-conf.h | 1 - arch/platform/cooja/dev/cooja-radio.h | 2 +- arch/platform/srf06-cc26xx/contiki-conf.h | 2 +- examples/6tisch/6p-packet/project-conf.h | 6 ---- .../6tisch/etsi-plugtest-2017/project-conf.h | 28 +------------------ examples/ipv6/rpl-tsch-sixtop/project-conf.h | 4 --- .../code-flush-nbr-queue/project-conf.h | 4 --- tests/16-6tisch/code/project-conf.h | 6 ---- 8 files changed, 3 insertions(+), 50 deletions(-) diff --git a/arch/platform/cooja/contiki-conf.h b/arch/platform/cooja/contiki-conf.h index 970eddbb8..44fe407f1 100644 --- a/arch/platform/cooja/contiki-conf.h +++ b/arch/platform/cooja/contiki-conf.h @@ -124,7 +124,6 @@ typedef uint64_t rtimer_clock_t; #define UIP_ARCH_IPCHKSUM 1 #if MAC_CONF_WITH_TSCH -#define COOJA_CONF_SIMULATE_TURNAROUND 0 /* A bug in cooja causes many EBs to be missed at scan. Increase EB frequency to shorten the join process */ #undef TSCH_CONF_EB_PERIOD diff --git a/arch/platform/cooja/dev/cooja-radio.h b/arch/platform/cooja/dev/cooja-radio.h index a65a61bb1..ee5e9097d 100644 --- a/arch/platform/cooja/dev/cooja-radio.h +++ b/arch/platform/cooja/dev/cooja-radio.h @@ -39,7 +39,7 @@ #ifdef COOJA_CONF_SIMULATE_TURNAROUND #define COOJA_SIMULATE_TURNAROUND COOJA_CONF_SIMULATE_TURNAROUND #else -#define COOJA_SIMULATE_TURNAROUND 1 +#define COOJA_SIMULATE_TURNAROUND (!(MAC_CONF_WITH_TSCH)) #endif #ifdef COOJA_CONF_TRANSMIT_ON_CCA diff --git a/arch/platform/srf06-cc26xx/contiki-conf.h b/arch/platform/srf06-cc26xx/contiki-conf.h index 7cfc46801..bcf4f100f 100644 --- a/arch/platform/srf06-cc26xx/contiki-conf.h +++ b/arch/platform/srf06-cc26xx/contiki-conf.h @@ -55,7 +55,7 @@ * You need to set this to 1 to use TSCH with its default 2.2ms or larger guard time. */ #ifndef CC2650_FAST_RADIO_STARTUP -#define CC2650_FAST_RADIO_STARTUP 0 +#define CC2650_FAST_RADIO_STARTUP (MAC_CONF_WITH_TSCH) #endif #ifdef RF_CHANNEL diff --git a/examples/6tisch/6p-packet/project-conf.h b/examples/6tisch/6p-packet/project-conf.h index 112c5b3ae..1e8fc03e0 100644 --- a/examples/6tisch/6p-packet/project-conf.h +++ b/examples/6tisch/6p-packet/project-conf.h @@ -33,12 +33,6 @@ #define UIP_CONF_ND6_SEND_RA 0 -#if CONTIKI_TARGET_COOJA -#define COOJA_CONF_SIMULATE_TURNAROUND 0 -#else -#error "This example is intended to be used for Cooja mote." -#endif /* CONTIKI_TARGET_COOJA */ - #define TSCH_CONF_WITH_SIXTOP 1 #define TSCH_CONF_AUTOSTART 1 #define TSCH_CONF_DEFAULT_HOPPING_SEQUENCE TSCH_HOPPING_SEQUENCE_1_1 diff --git a/examples/6tisch/etsi-plugtest-2017/project-conf.h b/examples/6tisch/etsi-plugtest-2017/project-conf.h index 4e0602def..e66c2b098 100644 --- a/examples/6tisch/etsi-plugtest-2017/project-conf.h +++ b/examples/6tisch/etsi-plugtest-2017/project-conf.h @@ -56,8 +56,7 @@ #if WITH_SECURITY /* Enable security */ #define LLSEC802154_CONF_ENABLED 1 -#define LLSEC802154_CONF_USES_EXPLICIT_KEYS 0 -#define LLSEC802154_CONF_USES_FRAME_COUNTER 0 + #define TSCH_SECURITY_CONF_K1 { 0x11, 0x11, 0x11, 0x11, \ 0x11, 0x11, 0x11, 0x11, \ 0x11, 0x11, 0x11, 0x11, \ @@ -93,35 +92,10 @@ /************* Platform dependent configuration ********/ /*******************************************************/ -#if CONTIKI_TARGET_CC2538DK || CONTIKI_TARGET_ZOUL || \ - CONTIKI_TARGET_OPENMOTE_CC2538 -#define TSCH_CONF_HW_FRAME_FILTERING 0 -#endif /* CONTIKI_TARGET_CC2538DK || CONTIKI_TARGET_ZOUL \ - || CONTIKI_TARGET_OPENMOTE_CC2538 */ - -/* Needed for CC2538 platforms only */ -/* For TSCH we have to use the more accurate crystal oscillator - * by default the RC oscillator is activated */ -#define SYS_CTRL_CONF_OSC32K_USE_XTAL 1 - /* USB serial takes space, free more space elsewhere */ #define SICSLOWPAN_CONF_FRAG 0 #define UIP_CONF_BUFFER_SIZE 160 -#if CONTIKI_TARGET_SRF06_CC26XX -#define CC2650_FAST_RADIO_STARTUP 1 -#endif /* CONTIK_TARGET_SRF06_CC26XX */ - -#if CONTIKI_TARGET_COOJA -#define COOJA_CONF_SIMULATE_TURNAROUND 0 -#endif /* CONTIKI_TARGET_COOJA */ - -/* Needed for cc2420 platforms only */ -/* Disable DCO calibration (uses timerB) */ -#define DCOSYNCH_CONF_ENABLED 0 -/* Enable SFD timestamps (uses timerB) */ -#define CC2420_CONF_SFD_TIMESTAMPS 1 - /*******************************************************/ /******************* Configure 6LoWPAN/IPv6 ************/ /*******************************************************/ diff --git a/examples/ipv6/rpl-tsch-sixtop/project-conf.h b/examples/ipv6/rpl-tsch-sixtop/project-conf.h index 52370676b..6ce893bd7 100755 --- a/examples/ipv6/rpl-tsch-sixtop/project-conf.h +++ b/examples/ipv6/rpl-tsch-sixtop/project-conf.h @@ -78,10 +78,6 @@ /* Enable security */ #define LLSEC802154_CONF_ENABLED 1 -/* TSCH uses explicit keys to identify k1 and k2 */ -#define LLSEC802154_CONF_USES_EXPLICIT_KEYS 1 -/* TSCH uses the ASN rather than frame counter to construct the Nonce */ -#define LLSEC802154_CONF_USES_FRAME_COUNTER 0 #endif /* WITH_SECURITY */ diff --git a/tests/13-ieee802154/code-flush-nbr-queue/project-conf.h b/tests/13-ieee802154/code-flush-nbr-queue/project-conf.h index a0cde69ec..6923ae6fb 100644 --- a/tests/13-ieee802154/code-flush-nbr-queue/project-conf.h +++ b/tests/13-ieee802154/code-flush-nbr-queue/project-conf.h @@ -41,8 +41,4 @@ #define TSCH_CONF_WITH_SIXTOP 1 -#if CONTIKI_TARGET_COOJA -#define COOJA_CONF_SIMULATE_TURNAROUND 0 -#endif /* CONTIKI_TARGET_COOJA */ - #endif /* __PROJECT_CONF_H__ */ diff --git a/tests/16-6tisch/code/project-conf.h b/tests/16-6tisch/code/project-conf.h index 41782a8a3..657244d5a 100644 --- a/tests/16-6tisch/code/project-conf.h +++ b/tests/16-6tisch/code/project-conf.h @@ -31,12 +31,6 @@ #ifndef _PROJECT_CONF_H_ #define _PROJECT_CONF_H_ -#if CONTIKI_TARGET_COOJA -#define COOJA_CONF_SIMULATE_TURNAROUND 0 -#else -//#error "This file is intended to be used for Cooja mote." -#endif /* CONTIKI_TARGET_COOJA */ - #define SIXTOP_CONF_MAX_SCHEDULING_FUNCTIONS 2 #define SIXTOP_CONF_MAX_TRANSACTIONS 2