Skip to content

Commit

Permalink
more debug for rpl_udp example
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegHahm authored and dangnhat committed Apr 25, 2014
1 parent 4728124 commit 61da7b1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/rpl_udp/rpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
#include "rpl_dodag.h"
#include "demo.h"

#define ENABLE_DEBUG (0)
#include "debug.h"

#ifdef MODULE_NATIVENET
#define TRANSCEIVER TRANSCEIVER_NATIVE
#else
Expand Down Expand Up @@ -65,8 +68,10 @@ void rpl_udp_init(int argc, char **argv)
return;
}

DEBUG("%s, %d: Setting HW address to %u\n", __FILE__, __LINE__, id);
net_if_set_hardware_address(0, id);

DEBUG("%s, %d: Initializing RPL for interface 0\n", __FILE__, __LINE__);
state = rpl_init(0);

if (state != SIXLOWERROR_SUCCESS) {
Expand All @@ -84,7 +89,9 @@ void rpl_udp_init(int argc, char **argv)
ipv6_iface_set_routing_provider(rpl_get_next_hop);
}

DEBUG("%s, %d: Start monitor\n", __FILE__, __LINE__);
int monitor_pid = thread_create(monitor_stack_buffer, MONITOR_STACK_SIZE, PRIORITY_MAIN - 2, CREATE_STACKTEST, rpl_udp_monitor, "monitor");
DEBUG("%s, %d: Register at transceiver %02X\n", __FILE__, __LINE__, TRANSCEIVER);
transceiver_register(TRANSCEIVER, monitor_pid);
ipv6_register_packet_handler(monitor_pid);
//sixlowpan_lowpan_register(monitor_pid);
Expand Down

0 comments on commit 61da7b1

Please sign in to comment.