Skip to content

Commit

Permalink
Squashed 'features/nanostack/sal-stack-nanostack/' changes from cc03296
Browse files Browse the repository at this point in the history
…..b3fe574

b3fe574 Remove test files from the release
b2bf24c Merge branch 'release_internal' into release_external
0ed25a7 Fix errors found from coverity scan (ARMmbed#2386)
7a138f7 Added IID for border router info structure
4021b0c LLC secure data duplicate check update and EAPOL relay duplicate fix
b190a97 Remove Thread-protocol from README (ARMmbed#2383)
ae8ae32 EAPOL relay agent rx filter from joiner side
0d4eb7a Removed dead code part
fc644f5 RPL new parent accept update and NUD operation
f5920e2 ETX API update and RPL ETX threshold callback update.
1fdee20 Wi-sun keep all candidates alive by NUD.
bd746da Key storage settings are no longer cleared on delete
bd388fc Changed EAPOL initial-Key retries from 2 to 4 on large NW
a3d80a3 WS bootstrap: Default CCA threshold to -60dBm (ARMmbed#2377)
72b26a7 Created extra large network setup for Wi-SUN
38dd4a6 Corrected PTK and PMK lifetime handling
64f2a77 Cleared EAPOL temporary trace print's.
02ec23f Timed parent selection is now imim-imin*2 earlier there was just 5 seconds randomize.
3b2d906 Added check for network name and DODAG ID IID (EUI-64) (ARMmbed#2373)
ee45f4b Updated initial key trickles
184425b Fixed parent target address set.
07ec237 Updated Discovery and RPL setup large & medium size network
a94d8f2 RPL version num update
9e2ac1d Double default eapol entry size for test purpose.
6b8beef Clear all neighbors only on eapol next target check
faa19e1 Corrected next address set
8a917fb Continue trickle on initial EAPOL-key TX failure
cfdb193 Merge pull request ARMmbed#2368 from ARMmbed/sync_with_mbedos
f7a15fa (via MbedOS) ws: added support for brazilian regulatory domain
c397edb Changed large network initial-key trickle parameters
758f534 Added maximum frame counter storing interval
b0ea148 Corrected key storage configuration setting
be3c94e WS RPL paret soft filter update
8b1d537 Adjusted EAPOL limits and timers
9a21668 Merge branch 'release_internal' into release_external
8e72b80 MAC CCA thr: Check if channel out of range (ARMmbed#2363)
146a0a3 Corrected trace on authenticator
d04a96d Merge pull request ARMmbed#2361 from ARMmbed/sync_with_mbedos
2c2b915 Added empty function for ns time callback
76ac0de Remove NCS36510 target
0258ac3 Remove KW24D target
788f01b Netsocket/lwIP Stack: Remove support for ARM Compiler 5
2fbc7a1 Corrected invalid memory read on access revoke
941b9b4 Updates to stagger/latency (ARMmbed#2358)
c2abaaa Corrected defects
1811194 Corrected warning trace, validations and ut stubs
69e2d19 Added NS filesystem and interface to application
c5b6993 refactored packet ingress
a05605e Unsecured packets will be acked by default automatically.
36dfb29 MAC: Implemented automatic CCA threshold (ARMmbed#2353)
0396b97 Revert EAPOL simplify failure handling and focus this problem later on.
b2fe3d4 Ignoring authentication failure if security protocol already started
11de56d Added info API for Wi-SUN border router
87a4f69 Added EAPOL key storage to authenticator and unified GTK storage (ARMmbed#2345)
ff1ca25 EAPOL failure simplify and EAPOL relay agent add trace when eapol temp pool is empty
6667b31 Update NA trace
34cdafe Temporary EAPOL neighbour entry Update and MAC MLME update
d092f83 Iotthd 3995 (ARMmbed#2347)
e2ea4e4 Disabled BR (TLS server) EC calculation queue
5759851 Changed the rate limiting function to calculate the values runtime
899e755 Make it possible to update tr51 table to larger dynamically
8436669 Added configuration for DHCP lifetime value
da732bc When network name or PAN ID is changed authenticator updates MAC keys

git-subtree-dir: features/nanostack/sal-stack-nanostack
git-subtree-split: b3fe574
  • Loading branch information
Arto Kinnunen committed Jun 8, 2020
1 parent e357a43 commit 93c77e8
Show file tree
Hide file tree
Showing 101 changed files with 5,611 additions and 1,378 deletions.
22 changes: 7 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,29 @@ ARM Mesh networking stack

This repository contains the ARM mesh networking stack that provides support for the following mesh protocols:

* 6LoWPAN with Neighbor Discovery (ND) and Mesh Link Establishment (MLE)
* Thread
* Wi-SUN
* 6LoWPAN with Neighbor Discovery (ND) and Mesh Link Establishment (MLE)
* Wi-SUN

All networking stacks are using IEEE 802.15.4 based radios.
All networking stacks are using IEEE 802.15.4 based radios.

The full documentation is hosted in [Mbed OS documentation](https://os.mbed.com/docs/mbed-os/latest/reference/mesh-tech.html).

On mbed OS, mesh networking stacks can be used through [Mbed Mesh API](https://os.mbed.com/docs/mbed-os/latest/apis/mesh-api.html) and [Network Socket API](https://os.mbed.com/docs/mbed-os/v5.11/apis/network-socket.html).
On mbed OS, mesh networking stacks can be used through [Mbed Mesh API](https://os.mbed.com/docs/mbed-os/latest/apis/mesh-api.html) and [Network Socket API](https://os.mbed.com/docs/mbed-os/latest/apis/network-socket.html).

To see, how the mesh networking stack works, check the example application [mbed-os-example-mesh-minimal](https://github.com/ARMmbed/mbed-os-example-mesh-minimal).

##6LoWPAN with ND and MLE

## 6LoWPAN with ND and MLE

This networking stack is using standard 6LoWPAN and uses:

* Neighbor Discovery Protocol ([RFC4861](https://tools.ietf.org/html/rfc4861)) to locate other devices in the mesh network.
* Mesh-Link-Establishment ([draft-kelsey-intarea-mesh-link-establishment-06](https://tools.ietf.org/html/draft-kelsey-intarea-mesh-link-establishment-06)) is used for establishing and configuring secure radio links.

##Thread
Thread is standardized by [Thread group](https://www.threadgroup.org/).

![](docs/img/thread_certified.png)

mbed OS is now a Thread Certified Component. Using IPv6 with 6LoWPAN as the foundation, Thread technology provides a low-power, self-healing mesh network designed for the home.

##Wi-SUN
## Wi-SUN
Wi-SUN (Smart Utility Networks) specification is standardized by [Wi-SUN Alliance](https://www.wi-sun.org/).

Mbed OS release 5.12 contains the initial Mbed Wi-SUN FAN implementation. Functionality of the Mbed Wi-SUN network stack will be updated when the Wi-SUN protocol is specified further.

## License

Expand Down
Binary file removed docs/img/thread_certified.png
Binary file not shown.
6 changes: 0 additions & 6 deletions mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@
},
"macros": ["NS_USE_EXTERNAL_MBED_TLS"],
"target_overrides": {
"KW24D": {
"nanostack.configuration": "lowpan_router"
},
"NCS36510": {
"nanostack.configuration": "lowpan_router"
},
"TB_SENSE_12": {
"nanostack.configuration": "lowpan_router"
},
Expand Down
13 changes: 13 additions & 0 deletions nanostack/fhss_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@ typedef struct fhss_configuration {
*/
typedef int32_t fhss_vendor_defined_cf(const fhss_api_t *api, uint16_t slot, uint8_t eui64[8], uint16_t bsi, uint16_t number_of_channels);

/**
* \brief Struct fhss_config_parameters defines FHSS configuration parameters.
*
*/
typedef struct fhss_config_parameters {
/** Number of channel retries defines how many consecutive channels are used when retransmitting a frame after initial transmission channel. */
uint8_t number_of_channel_retries;
} fhss_config_parameters_t;


/**
* \brief Struct fhss_ws_configuration defines configuration of WS FHSS.
*/
Expand Down Expand Up @@ -125,6 +135,9 @@ typedef struct fhss_ws_configuration {
/** Vendor defined channel function. */
fhss_vendor_defined_cf *vendor_defined_cf;

/** Configuration parameters. */
fhss_config_parameters_t config_parameters;

} fhss_ws_configuration_t;

/**
Expand Down
11 changes: 11 additions & 0 deletions nanostack/fhss_test_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@ extern "C" {
*/
int8_t fhss_set_optimal_packet_length(const fhss_api_t *fhss_api, uint16_t packet_length);

/**
* \brief Set number of channel retries
*
* \param fhss_api FHSS instance.
* \param number_of_channel_retries Number of channel retries
*
* \return 0 Success
* \return -1 Failure
*/
int8_t fhss_set_number_of_channel_retries(const fhss_api_t *fhss_api, uint8_t number_of_channel_retries);

#ifdef __cplusplus
}
#endif
Expand Down
2 changes: 2 additions & 0 deletions nanostack/mlme.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ typedef enum {
macAutoRequestKeyIndex = 0x7b, /*<The index of the key used for automatic data*/
macDefaultKeySource = 0x7c, /*<Default key source*/
//NON standard extension
macCCAThresholdStart = 0xf4, /*< Start automatic CCA threshold */
macDevicePendingAckTrig = 0xf5, /*< Trig Pending ACK for Accepted Data packet for temporary neighbour */
mac802_15_4Mode = 0xf6, /*<IEEE 802.15.4 mode*/
macDeviceDescriptionPanIDUpdate = 0xf7, /*<Thread pending link update case this will update device descrioton list pan-id to new one*/
macTXPower = 0xf8, /*<TX output power*/
Expand Down
103 changes: 103 additions & 0 deletions nanostack/ns_file_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,109 @@ int ns_file_system_set_root_path(const char *root_path);
*/
char *ns_file_system_get_root_path(void);

/**
* \brief NS file handle
*
*/
typedef void *NS_FILE;

/**
* File open callback
*
* Depending on underlying file system file open for read for non-existing
* files can return success. In that case file read will fail.
*
* \param filename filename
* \param mode can be either "r" or "w"
*
* \return file handle
* \return NULL on error
*
*/
typedef NS_FILE(*ns_file_open)(const char *filename, const char *mode);

/**
* File close callback
*
* \param handle file handle
*
* \return 0 on success
* \return < 0 in case of errors
*
*/
typedef int (*ns_file_close)(NS_FILE *handle);

/**
* File remove callback
*
* \param filename filename
*
* \return 0 on success
* \return < 0 in case of errors
*
*/
typedef int (*ns_file_remove)(const char *filename);

/**
* File write callback
*
* Write is not stream write. The whole file is written from start to end
* and if function is called again, previous file content is replaced with
* new content.
*
* \param handle file handle
* \param buffer buffer
* \param buffer buffer size
*
* \return bytes written
*
*/
typedef size_t (*ns_file_write)(NS_FILE *handle, const void *buffer, size_t size);

/**
* File read callback
*
* Read is not stream read. The whole file is read from start to end
* and if function is called again, read is started from start again.
*
* \param handle file handle
* \param buffer buffer
* \param size buffer size
*
* \return bytes written
*
*/
typedef size_t (*ns_file_read)(NS_FILE *handle, void *buffer, size_t size);

/**
* File size callback
*
* Reads file size.
*
* \param handle file handle
* \param size file size
*
* \return 0 on success
* \return < 0 in case of reading file size is not supported
*
*/
typedef int (*ns_file_size)(NS_FILE *handle, size_t *size);

/**
* File callbacks set
*
* Sets file handling callbacks to nanostack.
*
* \param open file open callback
* \param close file close callback
* \param remove file remove callback
* \param write file write callback
* \param read file read callback
* \param size file size callback
*
*/
void ns_file_system_callbacks_set(ns_file_open open, ns_file_close close, ns_file_remove remove, ns_file_write write, ns_file_read read, ns_file_size size);

#ifdef __cplusplus
}
#endif
Expand Down
51 changes: 51 additions & 0 deletions nanostack/ns_time_api.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Copyright (c) 2020, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* \file ns_time_api.h
* \brief Nanostack time API
*
* This is Nanostack time API.
*
*/

#ifndef NS_TIME_API_H_
#define NS_TIME_API_H_

#include "ns_types.h"

/**
* System time callback.
*
* Callback shall return the system time in seconds after 1970.
*
* \param seconds system time in seconds
*
*/
typedef uint64_t ns_time_api_system_time_callback(void);

/**
* System time callback set.
*
* Sets callback for the system time.
*
* \param callback system time callback
*
*/
void ns_time_api_system_time_callback_set(ns_time_api_system_time_callback callback);

#endif /* NS_TIME_API_H_ */
1 change: 1 addition & 0 deletions nanostack/platform/arm_hal_phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ typedef enum {
PHY_EXTENSION_FILTERING_SUPPORT, /**< Return filtering modes that can be supported by the PHY driver. See phy_link_filters_e */
PHY_EXTENSION_SET_TX_POWER, /**< Set TX output power which is given as percentage of maximum. 0 is the lowest possible TX power and 100 is the highest possible TX power */
PHY_EXTENSION_SET_CCA_THRESHOLD, /**< Set CCA threshold which is given as percentage of maximum threshold. 0 is the lowest(strictest) possible threshold and 100 is the highest possible threshold */
PHY_EXTENSION_SET_CHANNEL_CCA_THRESHOLD, /**< Set CCA threshold which is given as dBm. This value is set in PHY_LINK_CCA_PREPARE callback and PHY driver should update the CCA threshold configuration */
PHY_EXTENSION_SET_802_15_4_MODE /**< Set IEEE 802.15.4 mode as defined by phy_802_15_4_mode_t*/
} phy_extension_type_e;

Expand Down
Loading

0 comments on commit 93c77e8

Please sign in to comment.