- 128 bits service's UUID discovered by a GATT client was shifted.
- not possible to connect while being scanning.
- not possible to scanning while being connected.
for sd >= 3 whitelisting is now setups into setWhitelist method
- Gap::setAddress could failed
- Gap::getWhitelist wron implemenation
- Remove ble_advertising.h/c - it was unused, redundant code
- includes for SD header ble.h were changed to headers\ble.h in order to distingusch form feature-ble BLE.h
- btle_init() introduced PM for disable <B>privacy</B> for API 3 and further.
- temporary removed or mocked real implemantation of whitelist-ing support functionalities:
btle_security.createWhitelistFromBondTable , gap::startAdvertising, gat::startRadioScan, gap::stopAdvertising
Gap::generateStackWhitelist, Gap::getStackWhiteIdentityList-(mock)
- Characteristic Descriptor Discoverer - aligned to the apply SD API
- long uuid service's read spupport
- add BLE features support to sdk configurations file
- publicate sdk's id_manager.ah() function.
- cutted out f. app_error_handler for mbed-os
- removed PACKED definition form app_util_platform (redefined by mbed-os)
- Gap::setAddress - allign to new SD API using peer manager
- extend Gap::getPermittedTxPowerValues for nRF52840
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.
mbed_lwip_socket_recv() takes one netbuf at a time from the netconn API,
and it holds a partially-read netbuf if necessary in order to present as
a stream for TCP.
This held netbuf was not being freed when the socket was closed.
Should follow same path as FileHandle, although this is less used
and there is currently no route to introduce a hook for a customized
DirHandle in retarget.
As identified by @hasnainvirk, @kjbracey-arm, the FileHandle and
FileBase serve two separate functions and their integration is
limiting for certain use cases.
FileLike is actually the redundant class here, but the multiple
inheritance it provides is used as a hack by the retargeting code
to get at the FileHandle implementation bound to the FileBase name.
It may make more sense for the FileBase to inherit from FileHandle,
(with perhaps a different name), but rather than explore the
possibility, this will just restore the previous hierarchy.
The `sleep` function as been changed into `hal_sleep` by #3607.
Unfortunately the call to `sleep` in the hal_patch for the NRF51822 has not been
updated to `hal_sleep`. The result was a link time error for targets based on
NRF51822_LEGACY compiling with the mbed OS 5 tree.
The 'TARGET_M%' rules depend on files generated by the 'rsync' target,
so make this dependency explicit by setting 'rsync' as a pre-requisite
of 'TARGET_M%'. The 'rsync' dependency was removed from 'publish' to
avoid the case where make would select one of the 'TARGET' rules before
completing 'rsync', which would cause the build to fail.
Additionally, also moved the core libs selection in the 'TARGET_M%'
pattern rule from the pre-requisites into the rule's recipe. This is
required because when the wildcard expression used before as a
pre-requisite is expanded (make's 1st phase), it won't find any files
(not built yet via 'rsync' target), so it won't create the associated
'TARGET_M%' rules, finally causing the 'publish' target building to fail
due to missing rules for 'TARGET_M3' and 'TARGET_M4'.
With this change and the previous one, it is ensured that 'rsync' is
done before executing the recipe for 'TARGET_M%', so the required core
libs are already available and can be used from withing the recipe. The
same wildcard pattern is used as before.
The issues being fixed are visible with GNU Make 4.2.1, but not seen
with GNU Make 3.81.
Fixes issue #3905.
cleanup in include files (unrequired removed + other moved to aes_alt.h)
hcryp_aes moved to mbedtls_aes_context to allow multi instances
remove ctx->nr, ctx->buf
doxygen comments are removed (kept in .h file)
function _ALT are removed (full module _ALT)
handle error returned by HAL_CRYPxx functions
aes is symetric, remove the dupplicated set_key_enc and set_key_dec
buffer, and factorize the call to set_key function
Intention is to make filesystem api and network stack api consistent
as current designs diverge greatly. Attempted to change as little as
possible outside of api structure.
By default the number of pstorage pages is set 1 and all addresses are
calculated in the pstorage module accordingly. Nordic recommends
changing this macro to whatever number is suitable for the app (see
https://devzone.nordicsemi.com/question/53066/what-will-be-the-starting-
address-of-pstorage-page-how-we-can-change-it/?answer=53085#post-id-5308
5) which is not quite elegant given that pstorage_platform.h is part of
the mbed-os repo. With this modification you can e.g. define
PSTORAGE_NUM_OF_PAGES on the command line, however note that you should
rebuild mbed-os with this setting as it affects pstorage_platform.c.
Sometimes when under heavy load, the CI machines can take a significant
amount of time to bring up a python process (~10s). The timeouts for
the network tests were chosen without much thought, and didn't leave
much room for this sort of delay.
This patch brings up timeouts for ntetwork tests 20s -> 60s
- Remove write set of functions
- Caused confusion with small benefit
- Trivial to add later
- Remove unused error codes
- Initial expirementation indicates most of these may not be useful
- Trivial to add later
- Removed bd_error_t
- Carries to additional type information, int already carries
sufficient connotation
- Trivial to add later
per @c1728p9, @sg-
- Fixing code formatting errors with astyle tool.
- Replaced use of TOOLCHAIN_xxx macros with compiler emitted macros.
- Added const to BlockDevice::get_xxx_size() member functions.
- Added documentation for FAT filesystem thread support.
- Added documentation for fat_filesystem_set_errno().
- Added documentation clarifying the reasons for errno/stat symbol definitions in retarget.h.
- Removed FAT filesystem from mbed 2 testing.
- Fixed FATMisc.h Copyright (c) 2016 year to 2017 as its a new file.
- Removed #ifndef NDEBUG from HeapBlockDevice.cpp.
- Removed unnecessary todo comment in retarget.cpp.
- renaming FATFileSystemSetErrno() fat_file_system_set_errno.
- changing FATFileSystem::format() to be mount fs internally in function, rather than expecting fs to be mounted.
- requested const char *filename change.
* Updated docs
* Re-factored vMPU drivers
* Non-backwards-compatible API change: uvisor_ctx is now called
__uvisor_ctx and requires the user to explicitly cast it to their own
private context structure.
This only affects applications with uVisor enabled.
* Use "public box" instead of main box for box 0.
The core_cmSecureAccess.h file contains secure-access APIs that are a
good candidate for a proposal to CMSIS. At the moment we maintain these
APIs ourselves in ARMmbed/uvisor, and will push updates to
ARMmbed/mbed-os when running our usual importer script.
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.
The speed of packets on the local network exceeds even the speed of
the ethernet hardware on some of the less powerful devices. Adding
a small delay which can be expected from a real DTLS handshake prevents
this condition from occuring.
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
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.
Note, the registered callback is still disabled by a call to
socket_attach. This will avoid being called after the socket is closed
unless close is called from the attached callback, which is in irq
context.
As pointed out by kjbracey-arm, the previous behaviour was broken
for sockets that started out listening.
Add sleep/deepsleep functions to platform layer which are replacing HAL
functions with the same name, rename existing symbols in HAL layer
to hal_sleep/hal_deepsleep. This way sleep functions
are always available, even if target doesn't implement them, which makes
the code using sleep clearer. It also enables us to make decision on in
which builds (debug/release) the sleep will be enabled.
This commit reduces the thread stack from 2k to 1k for each thread in
the parallel network tests. This allows the test to run on more
constrained devices (like the LPC1768).
*_packet_pressure_parallel tests are useful for checking for synchronization
errors, but push the practical limitations of the network stack. Failing
these tests is not unreasonable.
*_packet_pressure tests are a little bit less unreasonable, but also
push the practical limitations of the network stack. Hopefully these
will become stable in the near future.
Generalized handling of dns servers when brought up with both ipv4 and
ipv6 addresses. Falls back to google dns servers if not dns server is
found through dhcp.
Also added support for the `add_dns_server` method to lwip to support
custom servers.
depending on timing and HW, there might be some delay before the master
request gets notified, so better loop in while than a single call
to slave.receive()
To allow a network stack to support both NSAPI and its own options, try to make
sure the NSAPI levels don't collide with level numbers likely to be used by
network stacks.
Distinguish between socket and stack options, and tighten up documentation. Add
IP MRU stack options as an example (implementation not immediately planned for
any stack, but could be useful).
Despite being able to buffer an arbitrary stream of data,
TCP send is still limited by the available buffer space in the
network stack. Errors from TCP send are perfectly reasonable
and should be handled by reducing the buffer that is attempted.
These tests could adopt the dynamically sized buffers used for the
packet-pressure tests, however throughput is not an important feature
of these tests.
Printing out dropped packets caused significantly more overhead in the
parallel tests due to increased noise on the network. This noise would
push the tests past their provided timeouts.
Dynamic buffers gives the network stack the maximum throughput while
still supporting smaller devices. This should expose the largest number
of issues across differently sized platforms.
Additionally, restructured the UDP tests to avoid unintentionally flooding
the recieving side with bad data after failed packets.
Also, added a bit more documentation
A larger buffer gives the network stack the best options for maximizing
throughput. However, the initial buffer size did not fit on small
targets. Resized 8192 -> 1024.
Added test for the pattern of packets used during the DTLS
handshake. This pattern (5x ~300 byte packets) has been very
problematic for new network interfaces.
Attempt to maximize the devices bandwidth with an exponentially growing
transaction of random sequences. Also prints the time taken and bandwidth
reached during the tests.
A few new error codes are added to nsapi_error_t and
support for non-blocking socket connect is added.
Nanostack's connect call will be non-blocking.
Whereas LWIP connect call is currently blocking, and it could be changed now
to be non-blocking.