Skip to content

Commit

Permalink
Thread partition merge mode TLV change (ARMmbed#1546)
Browse files Browse the repository at this point in the history
When thread REED/Router device is sending parent request to higher partition,
it must set 'E' bit already in the first message.
  • Loading branch information
Tero Heinonen authored Jan 30, 2018
1 parent edd7599 commit 80b4d72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions source/6LoWPAN/Thread/thread_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ extern uint16_t thread_joiner_port;

typedef enum {
THREAD_STATE_NETWORK_DISCOVER, // Not commissioned to Thread network
THREAD_STATE_REATTACH, // Connected to thread network, searching for better partition
THREAD_STATE_REATTACH_RETRY, // Connected to thread network, searching for better partition with REED bit is set
THREAD_STATE_ATTACH_ANY, // Connected to thread network, searching for all partitions with leader connectivity
THREAD_STATE_REATTACH, // Connection to leader lost, searching for new parent
THREAD_STATE_REATTACH_RETRY, // Connection to leader lost, searching for new parent with REED bit is set
THREAD_STATE_ATTACH_ANY, // Searching for all partitions with leader connectivity
THREAD_STATE_CONNECTED, // Attached to Thread network - can't route
THREAD_STATE_CONNECTED_ROUTER, // Attached to Thread network - Routing enabled
} thread_attach_state_e;
Expand Down
4 changes: 3 additions & 1 deletion source/6LoWPAN/Thread/thread_host_bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ static int thread_parent_request_build(protocol_interface_info_entry_t *cur)
}

if (cur->thread_info->thread_attached_state == THREAD_STATE_REATTACH ||
cur->thread_info->thread_attached_state == THREAD_STATE_REATTACH_RETRY) {
cur->thread_info->thread_attached_state == THREAD_STATE_REATTACH_RETRY ||
cur->thread_info->thread_attached_state == THREAD_STATE_CONNECTED ||
cur->thread_info->thread_attached_state == THREAD_STATE_CONNECTED_ROUTER) {
// When doing re-attach End devices are immediately accepted as parents
scanMask |= 0x40;
}
Expand Down

0 comments on commit 80b4d72

Please sign in to comment.