Commit Graph

170 Commits (e7cd6ae2a98d7b24cf30072eef07b66740aa85bc)

Author SHA1 Message Date
Steven 9a0fc98bdc Hotfix for PR #7778
TB_SENSE_12 would have been left behind by the changes in #7778. This commit implements the changes in mbed to allow targets to provide a default network interface for Silicon Labs targets.
2018-09-19 12:30:21 +02:00
Seppo Takalo 1ef04796ee On KW24D and NCS36510 default to smaller Nanostack configuration
These boards do not fit the full Nanostack, so we need to select
6LoWPAN-ND as a default.
2018-09-01 12:37:46 -05:00
Cruz Monrreal 06a98e7dcf
Merge pull request #7778 from SeppoTakalo/provide_default_mesh
Fix MeshInterface::get_default_instance()
2018-08-30 16:11:00 -05:00
Seppo Takalo 488632bc79 Fix LoWPANInterface to provide ::get_target_default()
LoWPANInterface should provide target default, instead of default.
2018-08-28 18:50:59 +03:00
Martin Kojtal b2a05511d0
Merge pull request #7818 from kjbracey-arm/eui64_get_early
Allow ThreadInterface::device_eui64_get() before connect()
2018-08-28 12:11:47 +02:00
Seppo Takalo 9836b9bd6a Provide default mesh driver on NCS36510 2018-08-28 11:02:58 +03:00
Seppo Takalo c5064a8e33 Fix *MeshInterface::get_default_instance()
This was returning object, instead of pointer.
Also it was trying to call lowpan(reference), instad of lowpan(ptr).
2018-08-28 11:02:58 +03:00
Mika Leppänen 1250ceb82c Corrected thread tasklet during interface disconnect/connect
Added check for valid interface ID to network scan timer start so that it
is not triggered after disconnect. Added variable for mac api so that it
is not tried to set again after re-connecting.
2018-08-27 15:08:48 +03:00
Mika Leppänen 68f5739e09 Corrected 6lowpan tasklet during interface disconnect/connect
Removed main tasklet ID and used instead tasklet id. Added check
for valid interface ID to network scan timer start so that it
is not triggered after disconnect. Added small delay to re-connect
so that stack has time to send its status events to application
after disconnect.
2018-08-27 15:08:48 +03:00
Cruz Monrreal 2f8e679183
Merge pull request #7592 from orenc17/remove_uvisor
Remove uVisor from mbed-os
2018-08-25 19:52:24 -05:00
Oren Cohen 787317b7eb Remove uVisor from mbed-os 2018-08-22 16:36:59 +03:00
Deepak Venugopal 8c94411882 Merge commit '94f82102284f73721f685ec9ae535aef815e0d69'
* commit '94f82102284f73721f685ec9ae535aef815e0d69':
  Squashed 'features/nanostack/sal-stack-nanostack/' changes from 7963594..2535a6c
2018-08-22 10:52:10 +03:00
Cruz Monrreal b53a9ea4c0
Merge pull request #7780 from artokin/nsrc510_p1
Rename nanostack configuration (.cfg) files
2018-08-21 10:21:15 -05:00
Juha Ylinen b8a7e25e84 Nanostack: Fix return code for unsupported socket options 2018-08-20 16:30:19 +03:00
Kevin Bracey e014104258 Allow ThreadInterface::device_eui64_get() before connect()
Perform necessary driver initialisation so that we can read
the EUI-64 before connecting.

Fixes #7391.
2018-08-17 16:41:23 +03:00
Kevin Bracey 3a238bd7bd Streamline Nanostack interface initialisation
Can unify quite a log of the setup here, and that would be useful to
allow initialisation other than in "connect".
2018-08-17 16:41:23 +03:00
Nir Sonnenschein 1d9c66af82
Merge pull request #7771 from KariHaapalehto/while1
Update mesh_system_heap_error_handler to use new error handler
2018-08-14 19:43:15 +03:00
Arto Kinnunen 0ee40296f0 Merge commit 'f292d7ad9ab5da89381d7f54de88b46df573c79d'
* commit 'f292d7ad9ab5da89381d7f54de88b46df573c79d':
  Squashed 'features/nanostack/sal-stack-nanostack/' changes from 4a188ea..7963594
2018-08-13 18:44:28 +03:00
Kari Haapalehto de1d9c45b6 Update mesh_system_heap_error_handler to use new error codes and mbed_error call 2018-08-13 14:39:49 +03:00
Deepak Venugopal b82566eeaa Merge commit 'bee5d601f841949ed8d2e6eecef648d09a3d1984'
* commit 'bee5d601f841949ed8d2e6eecef648d09a3d1984':
  Squashed 'features/nanostack/coap-service/' changes from 1cb994e..cbe656a
2018-08-08 16:56:19 +03:00
Deepak Venugopal edfeecdab8 Merge commit '7e1fb3c8420b4d7e43c740c3e779751c9eedb4fb'
* commit '7e1fb3c8420b4d7e43c740c3e779751c9eedb4fb':
  Squashed 'features/nanostack/sal-stack-nanostack/' changes from 82bbdcc..4a188ea
2018-08-08 16:51:52 +03:00
Juha Ylinen 942b77255b Nanostack: fix error code
Return NSAPI_ERROR_NO_MEMORY if socket->open() fails
2018-08-03 12:13:21 +03:00
Cruz Monrreal 68002155d3
Merge pull request #7107 from kjbracey-arm/ns-global-events
Add option to make Nanostack use global event queue
2018-07-12 10:06:03 -05:00
Kevin Bracey 229dfe5ce2 Add Apache licenses to ns_hal files 2018-07-09 12:58:39 +03:00
Kevin Bracey 8ad3e47a7e Add option to make Nanostack use global event queue 2018-07-09 12:58:38 +03:00
Mika Leppänen 46bcbf2a28 Added json options for nanostack heap statictics
Added configuration options to mbed-mesh-api mbed_lib.json to enable
nanostack nsdynmemLIB heap statistics.
2018-07-04 10:35:35 +03:00
Cruz Monrreal 093a6066c2
Merge pull request #7158 from kjbracey-arm/thread-eui64
Add API to read Thread EUI-64
2018-06-11 10:21:22 -05:00
Cruz Monrreal 3206b81437
Merge pull request #6978 from OpenNuvoton/nuvoton_m23_tz_module
Support default tz_module in event loop thread for M23/M33
2018-06-11 08:44:21 -05:00
Cruz Monrreal ef86bf97b8
Merge pull request #7121 from kjbracey-arm/ns-emac-hardfault
Nanostack EMAC - avoid initialisation race
2018-06-11 08:42:03 -05:00
Kevin Bracey e06923c64a Make Nanostack C++ constructor initialise Nanostack
Nanostack object constructor didn't actually initialise Nanostack.
Nanostack initialisation was deferred until an interface was actually
attached to the stack, which generally happened at first interface
connect.

Not normally a problem, unless you're trying to make direct Nanostack
setup calls prior to connect - some applications do this, and were
relying on ThreadInterface::initialise to do Nanostack
initialisation.

Unfortunately in 5.9 ThreadInterface::initialise no longer does
initialise Nanostack immediately, because the mesh interfaces were
aligned and integrated with the Ethernet interfaces, which did
initialisation on connect().

Make the Nanostack object constructor initialise Nanostack (as the LWIP
constructor does for lwIP), so calling Nanostack::get_instance() is the
5.9 API for Nanostack initialisation.

For future work, APIs like ns_file_system_set_root_path should be
exposed as methods of Nanostack, so everything happens with a single
Nanostack::get_instance().file_system_set_root_path().
2018-06-08 13:00:58 +03:00
Kevin Bracey fc5c2fa84b Add API to read Thread EUI-64
Previously get_mac_address on a ThreadInterface returned the EUI-64
reported by the radio driver. This was required for commissioning, but
was inconsistent with other interfaces, and the API concept.

5.9.0 inadvertently changed this so that get_mac_address returned the
actual MAC address used by the radio, which is a hash result of the
EUI-64 for Thread.

The original "return the EUI-64" form was somewhat faulty, as
get_mac_address would not return the EUI-64 set by set_device_eui64() or
another mechanism before connect() was called.

Rather than revert to old behaviour, add a new API to get the device
EUI-64 to ThreadInterface, alongside the existing set API.
2018-06-07 12:17:03 +03:00
Kevin Bracey 852445a364 Nanostack EMAC - avoid initialisation race
Hard fault was possible if packet reception occurred during
initialisation. Adjust start-up ordering and add NULL check to
avoid.
2018-06-05 17:02:34 +03:00
Cruz Monrreal e3aa140aaa
Merge pull request #6981 from yogpan01/master
Remove ns_event_loop_thread_start() from NDInterface and ThreadInterface connect()
2018-05-25 16:51:04 -05:00
Kevin Bracey f3ec0dacd5 Add NetworkInterface::get_default_instance()
Provide an initial framework to make it easier to find a default network
interface.
2018-05-23 12:25:17 +03:00
Mika Leppänen 1c01f5dda4 Corrected defects
- Changed call_in/call methods of the stack to callback provided by the stack
- Specified what are limitations for operations that are made in callback
- Added pure virtual class DNS that defines DNS operations
- Added cancel operation and unique ID to DNS request used in cancel
- Added DNS configuration options to netsocket/mbed_lib.json for retries,
  response wait time and cache size
- Changed host name to use dynamic memory in DNS query list and cache,
  set maximum length for the name to 255 bytes.
- Added mutex to asynchronous DNS
- Reworked retries: there is now total retry count and a server specific count
- Ignores invalid incoming UDP socket messages (DNS header is not valid), and retries DNS query
- Reworked DNS module asynchronous operation functions
- Corrected other review issues (nothrow new, missing free, missing mutex unlock etc.)
2018-05-23 12:24:10 +03:00
Mika Leppänen b7e8400c2c Added non-blocking DNS functionality to network interface
- Added non-blocking DNS interface to network interface and
  network stack.
- Added caching of DNS replies.
- Added a network stack function to get DNS addresses from stack.
- Added call and call_in hooks to onboard network stack to
  allow calling functions from onboard stack context.
- Added support to call and call_in functions to LWIP and
  Nanostack.
- Disabled LWIP DNS translator with the exception of DNS
  address storage used in DNS address get.
2018-05-23 12:24:10 +03:00
Kevin Bracey 3c83c62ff7 Nanostack EMAC implementation
Make Nanostack an OnboardNetworkInterface, implementing
add_ethernet_interface so it can use EMAC drivers.

Can now be used via EthernetInterface, and be the system's default
network stack.

Legacy support for NanostackEthernetInterface retained. Some
restructuring of mesh interface code to fit into the
OnboardNetworkStack:::Interface system.
2018-05-23 12:24:04 +03:00
Yogesh Pande c520baeebf Remove ns_event_loop_thread_start() from NDInterface and ThreadInterface connect().
ns_event_loop_thread_start() is incorrectly used at connect() phase, the initial
setup is already done at init() phase and the eventloop thread is correctly initialized.

Also, the usage of ns_event_loop_thread_start() API should be behind MBED_CONF_NANOSTACK_HAL_EVENT_LOOP_DISPATCH_FROM_APPLICATION
flag as application can decide to use main thread for event loop, which will result in linker error for this API call in
case of ARMCC compiler.
2018-05-22 16:44:40 +03:00
cyliangtw 665dc99096 Support default tz_module for event loop & lwip 2018-05-22 17:19:47 +08:00
Juhani Puurula 8bede897e6 Merge commit '03edf998fa6142cb5e3d4c28154c9bdfea98105f'
* commit '03edf998fa6142cb5e3d4c28154c9bdfea98105f':
  Squashed 'features/nanostack/coap-service/' changes from 36d36ce..1cb994e
2018-05-14 17:08:10 +03:00
Juhani Puurula f7fd0af47e Merge commit '4cb7e03c7b39f446cfddc46385b00600e0e702f9'
* commit '4cb7e03c7b39f446cfddc46385b00600e0e702f9':
  Squashed 'features/nanostack/coap-service/' changes from f40072f..36d36ce
2018-05-11 09:52:34 +03:00
Juhani Puurula 2f0bd6b6f6 Merge commit '8e546a301f0b93dab28e7b4454df97e5f9e83843'
* commit '8e546a301f0b93dab28e7b4454df97e5f9e83843':
  Squashed 'features/nanostack/sal-stack-nanostack/' changes from 43c7ec2..82bbdcc
2018-05-11 09:52:10 +03:00
Seppo Takalo f69531e82f Move EFR32 RF driver to TARGET_Silicon_Labs/TARGET_SL_RAIL
This folder structure is identical to where the target code
is found from targets directory.
2018-04-27 14:38:44 +03:00
Seppo Takalo f0bf771502 Get rid of FEATURE_NANOSTACK
Allow FEATURE_NANOSTACK still to be defined in the build so
that we don't break any builds.
2018-04-27 14:38:44 +03:00
Seppo Takalo d1c6bc0913 Get rid of FEATURE_COMMON_PAL
Nanostack related files moved under 'feature/nanostack'
Common libraries moved to 'features/frameworks'

Allow FEATURE_COMMON_PAL still to be defined in the build so
that we don't break any builds.
2018-04-27 14:38:43 +03:00
Cruz Monrreal a19a528b65
Merge pull request #6745 from SeppoTakalo/mesh_docs
Clarify mesh configuration values.
2018-04-26 20:16:40 -05:00
Seppo Takalo b60454fac5 Clarify mesh configuration values.
Most of the help fields were correct. Just add field specifying
acceptable ranges.
2018-04-25 15:33:40 +03:00
Steven Cooreman c0ee42a6e7 Update to EFR32 15.4 driver
* Updates driver library to v2.3.1 (2018q1) for bugfixes and convenience functions
* Provides library in correct format (2-byte wchar_t flag) for compiling with ARMCC (#6695 uncovered by #6577)
* Reverts to using a statically-allocated packet buffer since malloc is not thread-safe (and the asserts have been turned on)
2018-04-22 23:23:02 -05:00
Seppo Takalo fbea6f15e2 Add missing Doxygen descriptions for Nanostack
Fix couple of parameter issues as well.
2018-03-21 14:15:28 +02:00
Cruz Monrreal abb74e8cbc
Merge pull request #6092 from kjbracey-arm/mesh-help
mbed-mesh-api: add JSON help
2018-03-15 10:57:02 -05:00