Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for 6lowpan PAN ID filter to mbed mesh api configuration #3158

Merged
merged 1 commit into from
Oct 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ An example of the configuration file:
| 6lowpan-nd-channel-mask | number [0-0x07fff800] | Channel mask, bit-mask of channels to use |
| 6lowpan-nd-channel-page | number [0, 2] | 0 for 2,4 GHz and 2 for sub-GHz radios |
| 6lowpan-nd-channel | number [0-27] | RF channel to use when `channel_mask` is not defined |
| 6lowpan-nd-panid-filter | number [0-0xffff] | Beacon PAN ID filter, 0xffff means no filtering |
| 6lowpan-nd-security-mode | "NONE" or "PSK" | To use either no security, or Pre shared network key |
| 6lowpan-nd-psk-key-id | number | PSK key id when PSK is enabled |
| 6lowpan-nd-psk-key | byte array [16] | Pre shared network key |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"6lowpan-nd-channel-mask": "(1<<12)",
"6lowpan-nd-channel-page": 0,
"6lowpan-nd-channel": 12,
"6lowpan-nd-panid-filter": "0xffff",
"6lowpan-nd-security-mode": "NONE",
"6lowpan-nd-psk-key-id": 1,
"6lowpan-nd-psk-key": "{0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ extern "C" {
#define MBED_MESH_API_6LOWPAN_ND_SEC_LEVEL 5
#endif

#if defined MBED_CONF_MBED_MESH_API_6LOWPAN_ND_PANID_FILTER
#define MBED_MESH_API_6LOWPAN_ND_PANID_FILTER MBED_CONF_MBED_MESH_API_6LOWPAN_ND_PANID_FILTER
#else
#define MBED_MESH_API_6LOWPAN_ND_PANID_FILTER 0xffff
#endif

/* Thread configuration */
// PSKd, must be longer than 6
#ifdef YOTTA_CFG_MBED_MESH_API_THREAD_PSKD
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@ void nd_tasklet_configure_and_connect_to_network(void)
arm_nwk_6lowpan_link_nwk_id_filter_for_nwk_scan(
tasklet_data_ptr->network_interface_id, NULL);

arm_nwk_6lowpan_link_panid_filter_for_nwk_scan(
tasklet_data_ptr->network_interface_id,
MBED_MESH_API_6LOWPAN_ND_PANID_FILTER);

status = arm_nwk_interface_up(tasklet_data_ptr->network_interface_id);
if (status >= 0) {
tasklet_data_ptr->tasklet_state = TASKLET_STATE_BOOTSTRAP_STARTED;
Expand Down