Commit Graph

170 Commits (e7cd6ae2a98d7b24cf30072eef07b66740aa85bc)

Author SHA1 Message Date
Seppo Takalo a2c4426965 Allow using of malloc() for reserving the Nanostack's heap.
Some devices have RAM memory split into two sections.
This becames a problem for GCC based toolchains as they don't
support splitting .bss or .data sections into two memory parts.
When we run out of memory from .bss sections, allocating the stack
by malloc() allows it to be moved to .data section which might already
be in the second memory section. For example KW24D platform.
2017-08-08 11:20:22 +03:00
Jimmy Brisson 3f52924821 Merge pull request #4738 from SeppoTakalo/compile_warnings
ONME-3113: Fix GCC_ARM and ARM compiler warnings from mbed-mesh-api
2017-07-27 09:42:18 -05:00
Kari Haapalehto f3c7e0dbc0 ONME-3113: Fix GCC_ARM and ARM compiler warnings from mbed-mesh-api
Warning #1300-D: inherits implicit virtual
- Adding the virtual keyword in the derived class prevents the warning

Warning #1-D: last line of file ends without a newline
- New line added at the end of file

Warning #997-D:
function "MeshInterfaceNanostack::initialize(NanostackPhy *)" is hidden
by "ThreadInterface::initialize"  -- virtual function override intended?
- virtual keyword removed from "MeshInterfaceNanostack::initialize"

Warning #1300-D: inherits implicit virtual
- Adding the virtual keyword in the derived class prevents the warning
2017-07-11 15:56:08 +03:00
Kari 3c44a20dd0 [ONME-3089] - Adjust lowpan ND interface connect timeout
Device needs to wait for connectivity:
-routers will create new network and get local connectivity
-end device will get connectivity once attached to existing network
-devices without network settings gets connectivity once
 commissioned and attached to network

Signed-off-by: Kari <kari.haapalehto@arm.com>
2017-06-29 11:02:04 +03:00
Seppo Takalo a36c9abca0 Fix compilation for NCS36510 RF driver.
RTX porting for this driver was done against the previous API that
have now been reverted.
2017-06-08 13:54:33 +03:00
Bartek Szatkowski b793a3fb89 Update codebase for CMSIS5/RTX5
Update all of mbed-os to use RTX5.
2017-05-30 18:55:52 +01:00
Sam Grove ef7ab92cb8 Merge pull request #4345 from ARMmbed/nanostack_update
Nanostack update
2017-05-26 17:01:29 -05:00
Sam Grove cb61fc5f81 Merge pull request #4333 from artokin/thread_interface_timeout
Adjust Thread interface connect timeout
2017-05-26 10:23:28 -05:00
Kari Severinkangas 4a438b6ab2 Thread minimal end device operating mode added 2017-05-19 11:30:11 +03:00
Seppo Takalo 3126c3abf1 Update Nanostack to v6.1.0 2017-05-18 11:51:14 +03:00
Arto Kinnunen 28a6fa1819 Adjust Thread interface connect timeout
Thread device needs to wait for connectivity:
-routers will create new network and get local connectivity
-end device will get connectivity once attached to existing network
-devices without network settings gets connectivity once
 commissioned and attached to network
2017-05-17 12:45:52 +03:00
Kari Severinkangas f5d6e7d33c Update README.md
Minor changes
2017-04-12 15:21:02 +03:00
Kari Severinkangas 7d2b03bde8 Update README.md
Config table updated
2017-04-11 16:37:52 +03:00
Kari Severinkangas e10f2ae287 irrelevant zeros removed from timestamp 2017-04-11 16:19:01 +03:00
Kari Severinkangas e52d3db50e Security policy defined in .json 2017-04-11 15:45:12 +03:00
Sam Grove c776eaa767 Merge pull request #3987 from karsev/thread_link_config_update
thread link configuration bypass flag in mesh-api
2017-04-10 10:16:05 -05:00
Kari Severinkangas 8862edefad -useless static_config.h removed 2017-03-28 11:46:40 +03:00
Kari Severinkangas b2b106c431 config update to the previous commit 2017-03-28 11:16:05 +03:00
Kari Severinkangas 156cd00d66 - some refactoring and cleaning 2017-03-28 11:14:03 +03:00
Kari Severinkangas 90d4590a05 Arm powered core removed. 2017-03-22 14:27:48 +02:00
Kari Severinkangas f359b60c2a thread-static-link-config paramter added
when false thread has empty link config
must join the network by commissioning
2017-03-22 11:08:31 +02:00
Steven Cooreman d2173574d0 Stop using device_has for non-mbed options
As asked by @0xc0170 in PR #3934, we won't be using device_has for indicating RF/Crypto features any longer. RF config options moved to the SL_RAIL lib.json, crypto config options will come with mbedTLS integration.
2017-03-21 16:23:52 +01:00
Steven Cooreman 2ee05def53 EFR32 radio driver small fixes
* Reduce verbosity of EFR32 radio driver when debug tracing is on.
* Correctly pass pending bit of received ACK to the stack.
2017-03-21 16:23:50 +01:00
Steven Cooreman 59dc6da5c4 Update to Gecko SDK 5.1.2
Update RAIL library to 1.5.1
2017-03-20 16:34:12 +01:00
Steven Cooreman 0e098678b5 First pass on TB Sense (and EFR32MG12) support 2017-03-20 16:34:12 +01:00
Sam Grove 371aaa53c3 Merge pull request #3789 from yogpan01/master
Separating CoAP library from mbed-client-c
2017-02-23 15:44:58 -06:00
Sam Grove 3642c3b226 Merge pull request #3736 from karsev/thread_config_update
Thread config update
2017-02-23 10:18:48 -06:00
Yogesh Pande d3b48a8e2d Merge remote-tracking branch 'upstream/master' 2017-02-23 08:15:51 +02:00
Christopher Haster aff49d8d1e Renamed files in platform to match source names
critical.h     -> mbed_critical.h
sleep.h        -> mbed_sleep.h
toolchain.h    -> mbed_toolchain.h
rtc_time.h     -> mbed_rtc_time.h
semihost_api.h -> mbed_semihost_api.h
wait_api.h     -> mbed_wait_api.h
2017-02-22 18:17:54 -06:00
Kari Severinkangas 52ca190474 timestamp bit moved to correct place. 2017-02-22 14:03:59 +02:00
Kari Severinkangas 81452424d4 Security related traces removed. Network name copy fixed. 2017-02-22 13:59:31 +02:00
Kari Severinkangas 407d8d3962 yotta defines removed. minor edits on thread conf. 2017-02-22 13:59:31 +02:00
Kari Severinkangas ba5cd8c6d6 IOTTHD-1028: thread config update 2017-02-22 13:59:31 +02:00
Kari Severinkangas a26a80d686 IOTTHD-1028: thread config update 2017-02-22 13:59:31 +02:00
Yogesh Pande f57433a00a Separating CoAP library from mbed-client-c
This commit includes
 - Removing CoAP sources from mbed-client-c to its own repository.
 - mbed-client-c is moved outside of mbed-os source tree because it is used by mbed-client, so
   it will be part of mbed-client offering.
 - CoAP sources are used by coap-service which is a part of nanostack deliveries hence coap now existing
   as independent module under mbed-coap.

 - Commit handles the interdepdency of coap-service with mbed-client-c because of coap sources, coap-service
   header files are now fixed to point to right header directory.
2017-02-16 19:08:28 +02:00
Hasnain Virk 1ac5700eb6 [ONME-2953 ]Minor glitch in error handling
In sendto(), memory allocation failures were mistakenly being treated as
would blocks (assumption was that the device might be able to recover).
However, that put the blocking socket into deep sleep and there was no mechanism to wake it up
ever again. Somehow that got slipped through testing. Fixed in this amenment
2017-02-13 16:37:12 +02:00
Hasnain Virk 1f24533847 Minor amendments
NanostackLockGuard usage is now consistent throughout.
Missing Lock assertion added at a few locations in the code
2017-02-13 11:13:56 +02:00
Seppo Takalo 7dc2dc8c66 Squashed 'features/nanostack/FEATURE_NANOSTACK/coap-service/' changes from a1982c1..e125164
e125164 Check secure session pointer in timer callback (#61)
f49e596 Update unit tests (#59)
6a5634a Support for multiple virtual services (#58)
7fe6b98 Remove yotta files (#57)
5c5c8fe Fix socket send return value overflow (#56)
0870d05 Update unit test stubs to match latest socket api (#55)
e687be8 Merge pull request #54 from ARMmbed/warn_fixes
b8fe613 updated unittests
8640d05 Compilation warnings fixed
eea83e5 Flag out entropy source addition (#53)
7d72eb4 Fix unittests (#52)
4a6991e Avoid referencing ns_msghdr_t::flags

git-subtree-dir: features/nanostack/FEATURE_NANOSTACK/coap-service
git-subtree-split: e1251645d38d5b1b90350957f0e8b66e0fb59235
2017-02-12 22:06:41 +02:00
Seppo Takalo 667006e1ba Nanostack 6.0.1 2017-02-12 22:05:33 +02:00
Hasnain Virk e4f91cd0dc [ONME-2927] Socket adaptation layer for nanostack
As a result of major overhaul in Nanostack generally for socket API and especially
for TCP, the adaptation layer for mbed-OS is being upgraded.

Previously, as nanostack was not able to provide receive queue, adaptation layer had been
faking it. Now with Stream Socket by default Nanostack provides 2K receive queue and 2K send queue.
Receive queue size can be changed using setsockopt(). Batre metal nanostack would not provide with any
receive queues with Datagram Socket, however in this adaptation layer we introduce a 2K receive queue size
for the Datagram Socket as well.

Layer state machine handling is polished to ensure robustness.

::socket_connect() will can return 2 new error codes now. NSAPI_ERROR_ALREADY (like posix EALREADY) in case
if the connection is in progress or NSAPI_ERROR_IS_CONNECTED (like posix EISCONN) if already connected.
NSAPI_ERROR_WOULDBLOCK is now mapped directly to nanostack NS_WOULDBLOCK.

NanostackLockGaurd class is introduced which enables us to claim and release mutex using RAII style.
2017-02-12 22:05:26 +02:00
Seppo Takalo 1a5d6d7f19 Add support for ethernet-only configuration with Nanostack.
This saves about 100kB of flash when using ethernet only configuration.
Otherwise only border router configuration was supporting ethernet.
2017-01-09 18:26:56 +02:00
Martin Kojtal ab2e869a24 Merge pull request #3157 from SiliconLabs/SiliconLabs-EFR32
[Silicon Labs] Adding support for EFR32MG1 wireless SoC
2016-12-02 15:46:35 +01:00
Steven Cooreman ad773716ff [EFR32] Move Nanostack driver to Nanostack folder
mbed compile doesn't support two different FEATURE_X folders being merged, so we'll have to move our nanostack driver into the Nanostack folder for the time being.
2016-11-18 10:58:36 +01:00
Seppo Takalo 3d5962db48 Return localhost from NanostackInterface::get_ip_address()
For NetworkStack::gethostbyname() to properly validate the
IP address version, we must return a valid address from
Networkstack::get_ip_address().
2016-11-16 19:07:23 +02:00
Seppo Takalo 9f8fe897d8 Add documentation for NanostackEthernetInterface. 2016-11-15 15:30:39 +02:00
Seppo Takalo ae885ca0e9 Implement Ethernet interface for Nanostack.
* New Phy type: NanostackEthernetPhy
* New tasklet: enet_tasklet.
* New Interface: NanostackEthernetInterface,
  inherited from MeshInterfaceNanostack
2016-11-15 13:15:52 +02:00
Seppo Takalo 7732adb8a0 Rename NanostackRfPhy to NanostackPhy
This is to allow other types of PHY drivers than just RF.
Mesh-API does not actually care about driver type, it is drivers
responsibility to register right handlers with Nanostack.

* Implement a wrapper class NanostackRfPhy to ensure backward
  compatibility.
* Remove mesh_connect()/disconnect() functions from MeshInterface
  This job is already done in inherited classes.
* LoWPANNDInterface and ThreadInterface should only be used with
  NanostackRfPhy.
2016-11-15 13:12:18 +02:00
Seppo Takalo 6ba755e444 Move MeshInterfaceNanostack to own file.
+Also nanostack_lock() moved to mesh_system.h
+Added includes into NanostackInterface.h to be backward
compatible
2016-11-15 13:12:18 +02:00
Seppo Takalo 27cced74fb Get rid of Mesh6LoWPAN_ND and MeshThread classes.
* Move all the functionality to LoWPANNDInterface and
    ThreadInterface classes.
* AbstractMesh class modified to be pure virtual
* Thread/6LoWPAN specific functionality totally separated.
    Now linker will drop the unreferenced classes.
* MeshInterfaceNanostack now inherits from AbstractMesh
2016-11-15 13:12:18 +02:00
Seppo Takalo 62558e9cff Get rid of AbstractNetworkInterface class. 2016-11-15 13:12:18 +02:00
Seppo Takalo 154d66404a Get rid of MeshInterfaceFactory. 2016-11-15 13:12:18 +02:00
Seppo Takalo 53cc28f4c5 Remove some references to YOTTA_CFG. 2016-11-15 13:12:18 +02:00
Seppo Takalo c71abfed26 Update NanostackSocket to match API changes in v5.0.7 2016-11-09 16:07:13 +02:00
Seppo Takalo cbb300db9c Nanostack v5.0.7 2016-11-09 15:42:41 +02:00
Seppo Takalo e27c7840d7 Don't clone coap-service, it's subtree now 2016-11-09 15:34:58 +02:00
Seppo Takalo 1e791e2e76 Add 'features/nanostack/FEATURE_NANOSTACK/coap-service/' from commit 'a1982c1de752c50410d975a03f505a69972539f5'
git-subtree-dir: features/nanostack/FEATURE_NANOSTACK/coap-service
git-subtree-mainline: c0adb069c9
git-subtree-split: a1982c1de7
2016-11-09 15:27:17 +02:00
Seppo Takalo c0adb069c9 Remove coap-service 2016-11-09 15:26:30 +02:00
Martin Kojtal 7eaf32baa0 Merge pull request #3075 from geky/nsapi-error-size-types-2
nsapi - Add standardized return types for size and errors
2016-11-07 11:13:40 +00:00
Sam Grove 53b31318d0 Merge pull request #3165 from kjbracey-arm/ns_ipv6_checks
Add address type checks to NanostackInterface
2016-11-03 02:16:42 -05:00
Christopher Haster 00458c391c nsapi - Adopted standardized return types in the Nanostack interfaces 2016-11-02 15:55:42 -05:00
Kevin Bracey 2135c8f368 NanostackInterface: Remove string round-trips
Older versions of SocketAddress required conversion via string - this is
no longer the case.
2016-10-31 10:20:24 +02:00
Kevin Bracey b2834b9aa6 NanostackInterface: Allow binding to address
These days Nanostack does let you bind to an address - permit this.
(Remembering to check it is an IPv6 address).
2016-10-31 10:20:24 +02:00
Kevin Bracey 8e5391ab85 NanostackInterface: Check input address is IPv6
For the two calls that use the address - sendto and connect, check that it
actually is an IPv6 address.
2016-10-31 10:20:18 +02:00
Mika Leppänen fae713e4d1 Added support for 6lowpan PAN ID filter to mbed mesh api configuration 2016-10-28 13:28:11 +03:00
Hasnain Virk 3942b6d0e3 ONME-2822 Binary build script mod
* Binary build script is modified to follow currebt mbedOS baseline structure
* License files are moved to the correct location.
* Contribution.md is also moved to the correct location.
2016-10-14 12:38:13 +03:00
Russ Butler 6375b8cf2b Fix ncs36510 by updating header guard
Fix the header guard in the ncs36510 RF driver. Also update the
license in NanostackRfPhyNcs36510.h.
2016-10-06 11:52:09 -05:00
Sam Grove 5693e7a7ca Merge pull request #2916 from c1728p9/ncs36510_rf_phy
Add ncs36510 RF phy
2016-10-05 00:52:54 -05:00
Russ Butler 1aec3700de Add ncs36510 RF phy
Check in the RF phy for the ncs36510. Note that the RF phy is included
in the built when nanostack is included since the phy is specific to
nanostack.
2016-10-04 14:20:14 -05:00
Seppo Takalo f022d20e0e Fix build on Cortex M3 with Nanostack.
TARGET_CORTEX_M3 renamed to TARGET_M3
2016-10-04 14:15:36 +03:00
Christopher Haster ba99a1f31d restructure - Restructured features/net directory
features/net/network-socket -> features/netsocket
features/net/FEATURE_IPV4 -> features/FEATURE_LWIP
features/net/nanostack-binaries -> features/nanostack
features/net/FEATURE_NANOSTACK -> features/nanostack/FEATURE_NANOSTACK
2016-09-30 19:18:09 -05:00