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().
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.
- 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.)
- 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.
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.
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.
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.
* 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)
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.
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.