Allow mesh-api to configure routing.

pull/2795/head
Seppo Takalo 2016-09-30 15:53:46 +03:00
parent bf8d8211fa
commit 6ba8068c62
3 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@ Currently, 6LoWPAN-ND (neighbour discovery) and Thread bootstrap modes are suppo
## Module Configuration
This module supports static configuration via **mbed configuration system** by using the `mbed_app.json` file. The application needs to create the configuration file if it wants to use other than default settings.
This module supports static configuration via **mbed configuration system** by using the `mbed_app.json` file. The application needs to create the configuration file if it wants to use other than default settings.
An example of the configuration file:
@ -58,7 +58,7 @@ An example of the configuration file:
| 6lowpan-nd-psk-key-id | number | PSK key id when PSK is enabled |
| 6lowpan-nd-psk-key | byte array [16] | Pre shared network key |
| 6lowpan-nd-sec-level | number [1-7] | Network security level. Use default `5` |
| 6lowpan-nd-device-type | "NET_6LOWPAN_ROUTER" or "NET_6LOWPAN_HOST" | Device mode. Router is routing packets from other device, creating a mesh network. |
## Usage notes

View File

@ -9,6 +9,7 @@
"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}",
"6lowpan-nd-sec-level": 5,
"6lowpan-nd-device-type": "NET_6LOWPAN_ROUTER",
"thread-pskd": "\"Secret password\"",
"thread-config-channel-mask": "0x7fff800",
"thread-config-channel-page": 0,

View File

@ -370,8 +370,7 @@ int8_t nd_tasklet_connect(mesh_interface_cb callback, int8_t nwk_interface_id)
tasklet_data_ptr->network_interface_id = nwk_interface_id;
tasklet_data_ptr->tasklet_state = TASKLET_STATE_INITIALIZED;
//TODO: Fetch these values from device config api
tasklet_data_ptr->mode = NET_6LOWPAN_ROUTER;
tasklet_data_ptr->mode = MBED_CONF_MBED_MESH_API_6LOWPAN_ND_DEVICE_TYPE;
tasklet_data_ptr->sec_mode = NET_SEC_MODE_NO_LINK_SECURITY;
//tasklet_data_ptr->psk_sec_info.key_id = 0;