Skip to content

Commit 80b4d72

Browse files
author
Tero Heinonen
authored
Thread partition merge mode TLV change (ARMmbed#1546)
When thread REED/Router device is sending parent request to higher partition, it must set 'E' bit already in the first message.
1 parent edd7599 commit 80b4d72

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

source/6LoWPAN/Thread/thread_common.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ extern uint16_t thread_joiner_port;
7070

7171
typedef enum {
7272
THREAD_STATE_NETWORK_DISCOVER, // Not commissioned to Thread network
73-
THREAD_STATE_REATTACH, // Connected to thread network, searching for better partition
74-
THREAD_STATE_REATTACH_RETRY, // Connected to thread network, searching for better partition with REED bit is set
75-
THREAD_STATE_ATTACH_ANY, // Connected to thread network, searching for all partitions with leader connectivity
73+
THREAD_STATE_REATTACH, // Connection to leader lost, searching for new parent
74+
THREAD_STATE_REATTACH_RETRY, // Connection to leader lost, searching for new parent with REED bit is set
75+
THREAD_STATE_ATTACH_ANY, // Searching for all partitions with leader connectivity
7676
THREAD_STATE_CONNECTED, // Attached to Thread network - can't route
7777
THREAD_STATE_CONNECTED_ROUTER, // Attached to Thread network - Routing enabled
7878
} thread_attach_state_e;

source/6LoWPAN/Thread/thread_host_bootstrap.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,9 @@ static int thread_parent_request_build(protocol_interface_info_entry_t *cur)
230230
}
231231

232232
if (cur->thread_info->thread_attached_state == THREAD_STATE_REATTACH ||
233-
cur->thread_info->thread_attached_state == THREAD_STATE_REATTACH_RETRY) {
233+
cur->thread_info->thread_attached_state == THREAD_STATE_REATTACH_RETRY ||
234+
cur->thread_info->thread_attached_state == THREAD_STATE_CONNECTED ||
235+
cur->thread_info->thread_attached_state == THREAD_STATE_CONNECTED_ROUTER) {
234236
// When doing re-attach End devices are immediately accepted as parents
235237
scanMask |= 0x40;
236238
}

0 commit comments

Comments
 (0)