Skip to content

Commit 92044d6

Browse files
author
Tero Heinonen
authored
Changed BBR router upgrade status (#1661)
When BBR is started, it should require router ID with status "HAVE_CHILD_ID_REQUEST" (3)
1 parent e4a9657 commit 92044d6

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

source/6LoWPAN/Thread/thread_bbr_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ static bool thread_bbr_activated(thread_bbr_t *this, uint32_t seconds)
738738
return true;
739739
}
740740
// We will try to become router. This is done only in 120 seconds intervals if failed
741-
thread_router_bootstrap_router_id_request(cur, 0);
741+
thread_router_bootstrap_router_id_request(cur, THREAD_BBR_ROUTER_ID_REQUEST_STATUS);
742742
this->router_upgrade_delay_timer = 120;
743743
return false;
744744
}

source/6LoWPAN/Thread/thread_config.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
#ifndef THREAD_CONFIG_H_
3232
#define THREAD_CONFIG_H_
3333

34+
/**
35+
* Thread stack configuration values. All constants that are specified in Thread specification can be found from thread_constants.h
36+
*/
37+
3438
#include "thread_constants.h"
3539

3640
/**
@@ -316,6 +320,12 @@
316320
* Parent response wait time (in 100ms) when both "R" and "E" bit is set in scan mask TLV (rounded up from 1.25 seconds)
317321
*/
318322
#define THREAD_PARENT_REQ_SCANMASK_RE_TIMEOUT 15
323+
324+
/*
325+
* When BBR is started, router address is requested from leader with following status
326+
*/
327+
#define THREAD_BBR_ROUTER_ID_REQUEST_STATUS THREAD_COAP_STATUS_TLV_HAVE_CHILD_ID_REQUEST
328+
319329
/**
320330
* Build time flag to enable THCI special traces for test harness purposes
321331
*/

source/6LoWPAN/Thread/thread_constants.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#define THREAD_CONSTANTS_H_
3232

3333
/**
34-
* Constants defined in Thread specifications
34+
* Constants defined in Thread specifications. All configured values are defined in thread_config.h
3535
*/
3636

3737
/**

0 commit comments

Comments
 (0)