Turn off RDC before SLIP prefix interchange. Disable SIN/SUT prints, leave off-route prints.

This commit is contained in:
David Kopf 2012-02-11 15:15:00 -05:00
parent 9d6542d49b
commit 0327fe3020
2 changed files with 9 additions and 6 deletions

View file

@ -225,6 +225,7 @@ PROCESS_THREAD(border_router_process, ev, data)
rpl_dag_t *dag;
PROCESS_BEGIN();
prefix_set = 0;
PROCESS_PAUSE();
@ -233,6 +234,12 @@ PROCESS_THREAD(border_router_process, ev, data)
PRINTF("RPL-Border router started\n");
/* The border router runs with a 100% duty cycle in order to ensure high
packet reception rates.
Note if the MAC RDC is not turned off now, aggressive power management of the
cpu will interfere with establishing the SLIP connection */
NETSTACK_MAC.off(1);
/* Request prefix until it has been received */
while(!prefix_set) {
etimer_set(&et, CLOCK_SECOND);
@ -250,10 +257,6 @@ PROCESS_THREAD(border_router_process, ev, data)
print_local_addresses();
#endif
/* The border router runs with a 100% duty cycle in order to ensure high
packet reception rates. */
NETSTACK_MAC.off(1);
while(1) {
PROCESS_YIELD();
if (ev == sensors_event && data == &button_sensor) {

View file

@ -57,7 +57,7 @@ static uip_ipaddr_t last_sender;
static void
slip_input_callback(void)
{
PRINTF("SIN: %u\n", uip_len);
// PRINTF("SIN: %u\n", uip_len);
if(uip_buf[0] == '!') {
PRINTF("Got configuration message of type %c\n", uip_buf[1]);
uip_len = 0;
@ -113,7 +113,7 @@ output(void)
PRINT6ADDR(&UIP_IP_BUF->destipaddr);
PRINTF("\n");
} else {
PRINTF("SUT: %u\n", uip_len);
// PRINTF("SUT: %u\n", uip_len);
slip_send();
}
}