mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-03 11:30:53 +00:00
Turn off RDC before SLIP prefix interchange. Disable SIN/SUT prints, leave off-route prints.
This commit is contained in:
parent
9d6542d49b
commit
0327fe3020
@ -225,6 +225,7 @@ PROCESS_THREAD(border_router_process, ev, data)
|
|||||||
rpl_dag_t *dag;
|
rpl_dag_t *dag;
|
||||||
|
|
||||||
PROCESS_BEGIN();
|
PROCESS_BEGIN();
|
||||||
|
|
||||||
prefix_set = 0;
|
prefix_set = 0;
|
||||||
|
|
||||||
PROCESS_PAUSE();
|
PROCESS_PAUSE();
|
||||||
@ -233,6 +234,12 @@ PROCESS_THREAD(border_router_process, ev, data)
|
|||||||
|
|
||||||
PRINTF("RPL-Border router started\n");
|
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 */
|
/* Request prefix until it has been received */
|
||||||
while(!prefix_set) {
|
while(!prefix_set) {
|
||||||
etimer_set(&et, CLOCK_SECOND);
|
etimer_set(&et, CLOCK_SECOND);
|
||||||
@ -250,10 +257,6 @@ PROCESS_THREAD(border_router_process, ev, data)
|
|||||||
print_local_addresses();
|
print_local_addresses();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The border router runs with a 100% duty cycle in order to ensure high
|
|
||||||
packet reception rates. */
|
|
||||||
NETSTACK_MAC.off(1);
|
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
PROCESS_YIELD();
|
PROCESS_YIELD();
|
||||||
if (ev == sensors_event && data == &button_sensor) {
|
if (ev == sensors_event && data == &button_sensor) {
|
||||||
|
@ -57,7 +57,7 @@ static uip_ipaddr_t last_sender;
|
|||||||
static void
|
static void
|
||||||
slip_input_callback(void)
|
slip_input_callback(void)
|
||||||
{
|
{
|
||||||
PRINTF("SIN: %u\n", uip_len);
|
// PRINTF("SIN: %u\n", uip_len);
|
||||||
if(uip_buf[0] == '!') {
|
if(uip_buf[0] == '!') {
|
||||||
PRINTF("Got configuration message of type %c\n", uip_buf[1]);
|
PRINTF("Got configuration message of type %c\n", uip_buf[1]);
|
||||||
uip_len = 0;
|
uip_len = 0;
|
||||||
@ -113,7 +113,7 @@ output(void)
|
|||||||
PRINT6ADDR(&UIP_IP_BUF->destipaddr);
|
PRINT6ADDR(&UIP_IP_BUF->destipaddr);
|
||||||
PRINTF("\n");
|
PRINTF("\n");
|
||||||
} else {
|
} else {
|
||||||
PRINTF("SUT: %u\n", uip_len);
|
// PRINTF("SUT: %u\n", uip_len);
|
||||||
slip_send();
|
slip_send();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user