Commit Graph

148 Commits (2ec99158ef7a2b40055d6985e76755eee5a7e906)

Author SHA1 Message Date
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
Kevin Bracey 79b3d068e9 mbed-mesh-api: revise some Thread JSON help 2018-03-07 09:35:04 +02:00
Deepak Venugopal 4a3160f442 Merge commit '41d7448660fb20d72ab17615e23c9e64005934e3'
* commit '41d7448660fb20d72ab17615e23c9e64005934e3':
  Squashed 'features/nanostack/FEATURE_NANOSTACK/coap-service/' changes from f6281ed..f40072f
2018-03-02 09:49:36 +02:00
Bartek Szatkowski 4cb47df40a Add system_reset() function to Mbed OS 2018-02-28 16:42:34 +00:00
Kevin Bracey 984cc1ab50
Merge pull request #6032 from jarlamsa/status-callbacks
Status callbacks
2018-02-15 13:02:10 +02:00
Kevin Bracey d07b9f30eb mbed-mesh-api: add JSON help 2018-02-14 14:29:10 +02:00
Jarno Lamsa fd92fe1906 Add void *param to loopback functions 2018-02-09 13:58:56 +02:00
Arto Kinnunen ff47193a0a Add API for reading interface ID 2018-02-09 13:23:39 +02:00
Deepak Venugopal 7d555a3db7 Merge commit '7197b5fd51825257ee04dac5dfd0d16ea1896853'
* commit '7197b5fd51825257ee04dac5dfd0d16ea1896853':
  Squashed 'features/nanostack/FEATURE_NANOSTACK/sal-stack-nanostack/' changes from c9bf20f..43c7ec2
2018-02-09 13:18:25 +02:00
Deepak Venugopal dc7be499ad Merge commit 'df0dc6cd3395ceb44eed35d0b2f341ba7e3e0b91'
* commit 'df0dc6cd3395ceb44eed35d0b2f341ba7e3e0b91':
  Squashed 'features/nanostack/FEATURE_NANOSTACK/coap-service/' changes from 8689fca..f6281ed
2018-02-09 12:55:16 +02:00
Jarno Lamsa 282f3c9da2 Add support for error cases for lwip and nanostack 2018-02-09 12:44:31 +02:00
Teemu Kultala 5a7482667e NSAPI status callback changes
This is the original content of feature-status-callbacks, reviewed in
https://github.com/ARMmbed/mbed-os/pull/5457
2018-02-09 12:44:31 +02:00
Kari Severinkangas f63dbf56db Mesh-api setters for eui64 and pskd 2018-02-07 16:45:39 +02:00
Cruz Monrreal f4aba252de
Merge pull request #5836 from artokin/thread_commissioning_fix
Thread commissioning fix
2018-01-19 11:29:58 -06:00
Kevin Bracey 268a07db37 NSAPI: Add Nanostack multicast membership support
Add support for recently introduced NSAPI generic socket options to
control group membership. Previously applications using Nanostack would
have had to use Nanostack's native socket options.
2018-01-17 14:30:45 +02:00
Arto Kinnunen 8151e55838 Merge commit '47341478379429c08c468093e0326b5c79ecbc62'
* commit '47341478379429c08c468093e0326b5c79ecbc62':
  Squashed 'features/nanostack/FEATURE_NANOSTACK/coap-service/' changes from d0a2597..8689fca
2018-01-12 14:02:31 +02:00
Tero Heinonen d8b369f5b2 mesh-api documentation removed
All documentation is now in Handbook
2018-01-09 12:37:06 +02:00
Cruz Monrreal II 6d042d4ad4
Merge pull request #5736 from SeppoTakalo/ONME-3199
Allow 6LoWPAN applications to leave out channel specification.
2017-12-28 17:51:04 +00:00
Martin Kojtal 227b0341cb
Merge pull request #5670 from ryankurte/fix/efr32-ack-flag
Nanostack EFR32 flag fix
2017-12-20 14:42:51 +00:00
Seppo Takalo 4f36bb6480 Allow 6LoWPAN applications to leave out channel specification.
When specifying a full channel mask in .lib and setting the channel
to zero, device does proper channel scan.

For Thread, channel must be specified for router.
Sleepy devices don't respect the channel settings but do a full channel
scan at the start.

+ Modified the channel mask print to use hex.
2017-12-20 15:12:58 +02:00
Arto Kinnunen e78db9edd6 Update Thread PSKd default value
Thread PSKd can contain only uppercase characters.
2017-12-12 10:45:48 +02:00
Arto Kinnunen efc7f60799 Merge commit '6c0b324e3a5a9a5c22dc4c3a66b6c892b9ed1644' into coap-service-fix-mbedos57oob
* commit '6c0b324e3a5a9a5c22dc4c3a66b6c892b9ed1644':
  Squashed 'features/nanostack/FEATURE_NANOSTACK/coap-service/' changes from 29bfb78..d0a2597
2017-12-12 10:41:08 +02:00
Ryan Kurte 136ac17947 Nanostack flag fix 2017-12-07 14:23:35 +13:00