From 6d86b77cfe42b74de16ac0fe984f1df702180473 Mon Sep 17 00:00:00 2001 From: fros4943 Date: Thu, 23 Aug 2007 07:35:26 +0000 Subject: [PATCH] setting rime id at init --- platform/cooja/init-net-rime.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/platform/cooja/init-net-rime.c b/platform/cooja/init-net-rime.c index 351893586..c96a14d3c 100644 --- a/platform/cooja/init-net-rime.c +++ b/platform/cooja/init-net-rime.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: init-net-rime.c,v 1.2 2007/06/08 12:26:25 fros4943 Exp $ + * @(#)$Id: init-net-rime.c,v 1.3 2007/08/23 07:35:26 fros4943 Exp $ */ #include "contiki.h" @@ -36,12 +36,17 @@ #include "dev/radio.h" #include "dev/cooja-radio.h" #include "net/mac/nullmac.h" +#include "node-id.h" void init_net(void) { + rimeaddr_t rimeaddr; + nullmac_init(&cooja_driver); rime_init(&nullmac_driver); - - /* TODO Rime node ID */ + + rimeaddr.u8[0] = node_id >> 8; + rimeaddr.u8[1] = node_id & 0xff; + rimeaddr_set_node_addr(&rimeaddr); }