CellularContext now tries to get an IP address after connect and before
sending NSAPI_STATUS_GLOBAL_UP. Even if we don't the IP address from
the modem we will send NSAPI_STATUS_GLOBAL_UP and return success.
Modem has an ip address but for some reason some modems don't
give it to us.
If delete fails there is nothing we or application can do. There is no point
returning an error for this. This affects to AT_CellularContext::disconnect
not returning an error if context delete fails.
Separate drivers, events, and rtos internal APIs from public APIs.
* Move source files to source subdirs
* Move internal headers to internal subdirs
* Add Doxygen comments for documenting internal and public APIs
* Remove source code from header files in order to remove include pre-processor directives
that included header files not directly used by said header files
* Explicitly include header files instead of implicit inclusions via third-party header files.
Release Notes
This will break user code that was using an internal API as the internal header files have been moved.
This will only break if the user was including the header file using a namespace (i.e #include "foo/bar.h" instead of #include "bar.h"
Compare get_timeout against the last timeout successfully set.
Merge most of the test cases into one. Do not rely on the tests
execution order.
Fix the watchdog_api_stub to keep timeout value set by init function.
Deprecate wait() in favour of acquire(), try_acquire(),
try_acquire_for() and try_acquire_until().
Brings Semaphore more into line with CMSIS-RTOS 2 (which uses "acquire"),
itself (as it has "release"), and other classes having "try", "try for"
and "try until".
Also steps away from vague "wait" term - the primary operation here is
to acquire the semaphore, and this will of course sleep.
CellularContext member variables were initialized in inheriting class.
Now in base class where they should be initialized so that every inheriting
class don't have to init them.
Reimplement atomic code in inline assembly. This can improve
optimisation, and avoids potential architectural problems with using
LDREX/STREX intrinsics.
API further extended:
* Bitwise operations (fetch_and/fetch_or/fetch_xor)
* fetch_add and fetch_sub (like incr/decr, but returning old value -
aligning with C++11)
* compare_exchange_weak
* Explicit memory order specification
* Basic freestanding template overloads for C++
This gives our existing C implementation essentially all the functionality
needed by C++11.
An actual Atomic<T> template based upon these C functions could follow.
Disconnect was sent to all CellularContext classes even it concerned
one specific context. Some disconnect events are still sent to all
context classes. These event are coming from network and ment for all
context classes or event did not specify cid.
State machine has retry logic until device is attached to network.
After this CellularContext does the context activation e.g. connect.
There was no retry logic for context activation. Added logic to
CellularContext level so it's available for at and (upcoming)ril layers.
When using NetworkInterface::get_default_instance() application gets handle
to CellularInterface which is actually CellularContext derived from CellularInterface.
Application needs also handle to CellularDevice to open other interfaces.
This was left accidentally after refactoring.
It wasn't giving correct states after refactoring.
CellularContext::get_connection_status should be used instead.
Fix syncing back to at mode after ppp disconnect.
Fix AT_CellularContext flags and states to allow new connect after disconnect.
Fix that state machine is not reseted in disconnect is it's running (might be
running because of another context or new connect already started).
There are two EventQueue.h in mbed-os codebase:
events/EventQueue.h
features/FEATURE_BLE/ble/pal/EventQueue.h
By accident, `mbed compile` generates includes.txt with the correct
order of include search paths. This is not the case for the CMake
exporter: targets with FEATURE_BLE enables fail to compile with errors:
mbed-os/features/cellular/framework/AT/ATHandler.h:99:60: error:
'events' has not been declared
Update all places to always include either "events/EventQueue.h"
or "ble/pal/EventQueue.h": to always find the correct header.
Added Multihoming feature to LWIP (ability to use more than one network interfaces) for increasing networking reliability.
This involves:
LWIP interface
LWIP IP routing
DNS storage
Sockets (bind to interface name possibility)
possibility to add non default network interface
cellular middleware modifications if cellular connection is used
Information removed from the cellular subsystem trace log:
* SIM pin
* APN username and password
Added get_debug() to ATHandler.h to get the current trace state in order
to support suspend/resume of trace output.
Allow more than one callback to be register to NetworkInterfaces.
This introduces new APIs:
void NetworkInterface::add_event_listener(...);
void NetworkInterface::remove_event_listener(...);
Which internally calls interfaces attach() functions.
Change usage of AT_CellularContext::stack_type_supported to
AT_CellularBase::get_property. This way we can rid of
targets overriding stack_type_supported and delete
unnecessary classes and simplify new targets.
-added an API for checking network eps ciot optimization support
-renamed the API for getting the UE parameters
-the API for setting the UE parameters includes now a callback, which
will be called once network support for eps ciot optimization is known
Moved methods to classes CellularDevice and CellularInformation.
SIM interface was removed to simplify cellular usage and
methods better suite new classes.
Updated greentea and unit tests.
Add atomic load and store functions, and add barriers to the existing atomic
functions.
File currently has no explicit barriers - we don't support SMP, so don't
need CPU barriers.
But we do need to worry about compiler barriers - particularly if link time
optimisation is activated so that the compiler can see inside these
functions. The assembler or intrinsics that access PRIMASK for
enter/exit critical act as barriers, but LDREX, STREX and simple
volatile pointer loads and stores do not.
Unittest stubs needed to be updated for the API change.
Although this API is private and internal to LoRaPHY, somehow it
appeared in the LoRaPHYStub. Updating it for consistency.
This also includes their Datagram counterparts: DTLSSocket and DTLSSocketWrapper.
Coverage missing for timer-related functionality, but this would require more advanced stub development.
The extra (d)tls_test_config.h is necessary for successful compilation without HW support for the mbedtls features in unittests.
I reused the mbedtls stub found in features/nanostack/coap-service/test/coap-service/unittest/stub/mbedtls_stub.c and amended it slightly with a few missing functions.
This is equivalent of POSIX getpeername() function. It allows to
get remote address associated with the socket.
For example:
socket *s = server.accept();
SocketAddress remote;
s->getpeername(&remote);
Static Thread methods and signal methods have been deprecated. Remove
all references in the main code, and most of the tests. Some tests of
the deprecated APIs themselves remain.
Improved the stubs for event queue and nsapi_dns, to allow checking if callback are handled correctly. This involves some memory allocation and deallocation.
The NetworkStackWrapper is not covered as it seems to be deprecated code.
Add functional and line coverage for UDPSocket and TCPSocket. The EventFlagsstub and NetworkStackstub classes are allowed to store multiple return values to allow running internal loops multiple times.