Skip to content

Commit 4f36bb6

Browse files
author
Seppo Takalo
committed
Allow 6LoWPAN applications to leave out channel specification.
When specifying a full channel mask in .lib and setting the channel to zero, device does proper channel scan. For Thread, channel must be specified for router. Sleepy devices don't respect the channel settings but do a full channel scan at the start. + Modified the channel mask print to use hex.
1 parent a7aaee3 commit 4f36bb6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

features/nanostack/FEATURE_NANOSTACK/mbed-mesh-api/mbed_lib.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"config": {
44
"heap-size": 32500,
55
"use-malloc-for-heap": false,
6-
"6lowpan-nd-channel-mask": "(1<<12)",
6+
"6lowpan-nd-channel-mask": "0x7fff800",
77
"6lowpan-nd-channel-page": 0,
8-
"6lowpan-nd-channel": 12,
8+
"6lowpan-nd-channel": 0,
99
"6lowpan-nd-panid-filter": "0xffff",
1010
"6lowpan-nd-security-mode": "NONE",
1111
"6lowpan-nd-psk-key-id": 1,

features/nanostack/FEATURE_NANOSTACK/mbed-mesh-api/source/nd_tasklet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static void initialize_channel_list(void)
106106

107107
tr_debug("Channel: %ld", channel);
108108
tr_debug("Channel page: %d", tasklet_data_ptr->channel_list.channel_page);
109-
tr_debug("Channel mask: %ld", tasklet_data_ptr->channel_list.channel_mask[word_index]);
109+
tr_debug("Channel mask: 0x%.8lx", tasklet_data_ptr->channel_list.channel_mask[word_index]);
110110
}
111111

112112
/*

features/nanostack/FEATURE_NANOSTACK/mbed-mesh-api/source/thread_tasklet.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ void thread_tasklet_configure_and_connect_to_network(void)
274274
thread_tasklet_data_ptr->channel_list.channel_mask[0] = MBED_CONF_MBED_MESH_API_THREAD_CONFIG_CHANNEL_MASK;
275275

276276
TRACE_DETAIL("channel page: %d", thread_tasklet_data_ptr->channel_list.channel_page);
277-
TRACE_DETAIL("channel mask: %d", (int)thread_tasklet_data_ptr->channel_list.channel_mask[0]);
278-
277+
TRACE_DETAIL("channel mask: 0x%.8lx", thread_tasklet_data_ptr->channel_list.channel_mask[0]);
278+
279279
// PSKd
280280
const char PSKd[] = MBED_CONF_MBED_MESH_API_THREAD_PSKD;
281281
MBED_ASSERT(sizeof(PSKd) > 5 && sizeof(PSKd) < 33);

0 commit comments

Comments
 (0)