From 0fc1c00f0926592fe539c37b6229b12fa54039d8 Mon Sep 17 00:00:00 2001 From: nvt-se Date: Thu, 4 Mar 2010 15:04:28 +0000 Subject: [PATCH] Use LPP for radio duty cycling. 1 Hz channel check rate --- platform/msb430/contiki-conf.h | 6 +++--- platform/msb430/contiki-msb430-main.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/msb430/contiki-conf.h b/platform/msb430/contiki-conf.h index 790f1409c..7a2f76c65 100644 --- a/platform/msb430/contiki-conf.h +++ b/platform/msb430/contiki-conf.h @@ -7,7 +7,7 @@ #define WITH_SD 0 #define NETSTACK_CONF_RADIO cc1020_driver -#define NETSTACK_CONF_RDC nullrdc_driver +#define NETSTACK_CONF_RDC lpp_driver #define NETSTACK_CONF_MAC csma_driver #define NETSTACK_CONF_NETWORK rime_driver #define NETSTACK_CONF_FRAMER framer_nullmac @@ -30,8 +30,8 @@ #define CC_CONF_INLINE inline #define CC_CONF_VA_ARGS 1 -#define LPP_CONF_LISTEN_TIME CLOCK_SECOND / 32 -#define LPP_CONF_OFF_TIME CLOCK_SECOND +#define LPP_CONF_LISTEN_TIME 2 +#define LPP_CONF_OFF_TIME (CLOCK_SECOND - (LPP_CONF_LISTEN_TIME)) #define QUEUEBUF_CONF_NUM 4 diff --git a/platform/msb430/contiki-msb430-main.c b/platform/msb430/contiki-msb430-main.c index 4714e4ea2..9bb5db7cb 100644 --- a/platform/msb430/contiki-msb430-main.c +++ b/platform/msb430/contiki-msb430-main.c @@ -147,7 +147,7 @@ main(void) leds_off(LEDS_ALL); - printf("%d.%d: %s %s, channel check rate %u Hz\n", + printf("Node %d.%d: %s %s, channel check rate %u Hz\n", rimeaddr_node_addr.u8[0], rimeaddr_node_addr.u8[1], NETSTACK_MAC.name, NETSTACK_RDC.name, CLOCK_SECOND / (NETSTACK_RDC.channel_check_interval() == 0 ?