Commit Graph

2154 Commits (1dfe716b56850053583cc8c88b3d1eb7dccf0d31)

Author SHA1 Message Date
Vincent Coubard d586f7f9d2 BLE: update SecurityDB comments. 2018-02-23 13:54:41 +00:00
Tero Jääskö 09b8245cba nanostack-hal: remove connection from event loop init and dispatch thread
The thread flag signaling mechanism is problematic if a separate event
loop thread is not used. The problem is, that one needs to know the
thread id of the loop dispathcer, and that knowledge can be derived
only from the caller thread of the initialization function.

Remove the magic connection from caller thread to dispatcher thread
by using event flags instead of thread flags on signaling. As the
event flags require the massive amount 20 bytes of RAM whereas
thread flags requires none, keep the code behind flag.
2018-02-23 15:37:33 +02:00
Tero Jääskö aed2a0cd9f nanostack-hal: modify eventloop to allow running it in a main thread
The separate eventloop thread may not be necessary on all uses, as one
can use the existing main thread for event dispatching. Add a
conditional nanostack-hal.event-loop-dispatch-from-application, which
disables the thread creation.

Note: the ns_hal_init must be ran from the same thread which will be
used to execute the event loop later.
2018-02-23 15:37:32 +02:00
Vincent Coubard e91570e4ba
BLE: Fix default connection params type. 2018-02-23 13:30:16 +00:00
Paul Szczepanek 268655a028
Merge pull request #17 from pan-/security-db-rework
Security db rework
2018-02-23 13:24:15 +00:00
Vincent Coubard 11a809ee1c BLE: remove MorySecurityDb include from generic security manager. 2018-02-23 11:19:21 +00:00
Vincent Coubard 1ded0d7198 BLE: Split security manager control block from the secure DB. 2018-02-23 11:15:08 +00:00
Vincent Coubard 52910af33e BLE: Add mock for SecurityManagerEventHandler. 2018-02-23 11:13:42 +00:00
Vincent Coubard 7db6aeb19b BLE: Add mock and stub for ConnectionEventMonitor. 2018-02-23 11:13:42 +00:00
Vincent Coubard 2bb73fd8bb BLE: Cleanup includes of pal::ConnectionEventMonitor. 2018-02-23 11:13:42 +00:00
paul-szczepanek-arm c8f77259ed Merge https://github.com/ARMmbed/mbed-os 2018-02-23 10:11:49 +00:00
Cruz Monrreal 1d1eef47ff
Merge pull request #6160 from TeemuKultala/status_callback_fix
fix issue 6150
2018-02-22 21:56:42 -06:00
Christopher Haster 453a1b6815 Merge commit '451c3d137fbd49ce5e00e765af66c16bb5169ee9' into lfs-update 2018-02-22 18:43:04 -06:00
Christopher Haster f67a795ef0 littlefs: Fixed handling of root as target for create operations
Before this patch, when calling lfs_mkdir or lfs_file_open with root
as the target, littlefs wouldn't find the path properly and happily
run into undefined behaviour.

The fix is to populate a directory entry for root in the lfs_dir_find
function. As an added plus, this allowed several special cases around
root to be completely dropped.
2018-02-22 15:56:24 -06:00
Antti Yli-Tokola 1b27317e6c Update mbed-coap to version 4.3.0
Add new api to clear whole sent blockwise message list
2018-02-22 17:57:12 +02:00
paul-szczepanek-arm 02f01f0e1d Merge branch 'palsm' of https://github.com/paul-szczepanek-arm/mbed-os into palsm 2018-02-22 11:53:00 +00:00
Vincent Coubard 1698c2d5be BLE: Add missing encryption implementation in cordio pal SM. 2018-02-22 11:51:02 +00:00
paul-szczepanek-arm 1da5d74470 temporary key encryption mitm quality reflected 2018-02-22 11:50:11 +00:00
Martin Kojtal 414b2d971d
Revert "Update Mbed TLS HW acceleration partner code to new hashing API" 2018-02-22 11:20:35 +00:00
Teemu Kultala 34ef11630c fix issue 6150 by always setting net interface UP in mbed_set_dhcp 2018-02-22 13:00:46 +02:00
paul-szczepanek-arm 6b0ba64ee2 SM fixes to init and register the event handler correctly 2018-02-21 18:35:44 +00:00
Hugues de Valon ef7b16d9c5 CM3DS: fix non aligned access in Ethernet driver
This patch changes the way data is put in the TX_DATA_PORT register when
sending packet over Ethernet.
When this driver is compiled with release compilation profile
(space optimization compiler options) with Arm compiler version 5,
the line:
SMSC9220->TX_DATA_PORT = *pktptr;
generates the assembly instruction to get the pktptr pointed value:
LDM r2!, {r3}
with pktptr = r2
However, the code does not prevent the pktptr value from being unaligned
(to a 32 bits boundary) in that zone and the LDM instruction causes a
HardFault if this is the case. When the compiler option is not activated
(debug and develop compilation profiles), the compiler generates LDR
instruction instead which does not cause a HardFault.
The ARM v7-M states page B3-601: "Unaligned load-store multiples and
word or halfword exclusive accesses always fault."

To face that problem, we check if the data pointer is aligned or not. If
it is, we apply the same algorithm than before. If not, a local variable
is created and we copy in it, byte per byte, the contents at the
unaligned pointer. However, it will impact performances adding 8
instructions (one LD and one ST for each copied byte).

Change-Id: I11f6e82ce5521960d2ecf499f718f76fec29c0b0
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
2018-02-21 17:54:12 +00:00
Galanakis, Minos 5b8ff81e02 CM3DS: fix a minor bug in the ethernet LWIP driver
This patch fixes a memory bug. `eth_arch_enetif_init` method call
would attempt to write to un-initialized area of memory.

Change-Id: I9881de71d58fa14db609fe3e24617a210b896471
Signed-off-by: Galanakis, Minos <minos.galanakis@arm.com>
2018-02-21 17:51:09 +00:00
Vincent Coubard 9e98a72198 BLE: Move cordio default scan and connection params in global memory. 2018-02-21 17:43:39 +00:00
Vincent Coubard ad78b3e023 BLE: Handle NULL parameters in Gap::connect. 2018-02-21 17:43:38 +00:00
Vincent Coubard 9c6f44de91 BLE: Force stop scan before connection initiation. 2018-02-21 17:43:38 +00:00
Vincent Coubard c5be493bb7 BLE: Add address type in AdvertisementCallbackParams_t. 2018-02-21 17:41:14 +00:00
Vincent Coubard 0158971387 BLE: Move cordio default scan and connection params in global memory. 2018-02-21 15:00:17 +00:00
Martin Kojtal 5c7cd1f689
Merge pull request #6139 from VeijoPesonen/eth_n_wifi-drv_n_tc_fixes
LWIP PBUF_POOL_BUFSIZE increased to fit also IPv6 header
2018-02-21 15:19:55 +01:00
Vincent Coubard e3d7f2bb05 BLE: Add address type in AdvertisementCallbackParams_t. 2018-02-21 14:14:31 +00:00
Vincent Coubard f3c453b077 BLE: Handle NULL parameters in Gap::connect. 2018-02-21 12:42:54 +00:00
Vincent Coubard 7941a6fcc7 BLE: Force stop scan before connection initiation. 2018-02-21 12:13:24 +00:00
Veijo Pesonen a7ef67a92a fixup! LWIP PBUF_POOL_BUFSIZE increased to fit also IPv6 header 2018-02-21 08:25:46 +02:00
Cruz Monrreal 24a3acd647
Merge pull request #6141 from hasnainvirk/dr_bug_fix
Verifying datarate bug fix
2018-02-20 13:44:51 -06:00
Cruz Monrreal e66cc74b8f
Merge pull request #6046 from geky/fix-lookahead-noack-pop
littlefs: Fix incorrect lookahead population before ack
2018-02-20 13:19:13 -06:00
paul-szczepanek-arm c65419239f fixed compiler errors for pal after its update 2018-02-20 18:01:21 +00:00
Cruz Monrreal 817f9a569c
Merge pull request #5812 from OpenNuvoton/nuvoton_crypto
M487: Support ECP H/W accelerator
2018-02-20 11:53:23 -06:00
Veijo Pesonen e1d9d8783d LWIP PBUF_POOL_BUFSIZE increased to fit also IPv6 header
IPv6 header requires 20 more bytes compared to IPv4 header.
2018-02-20 15:45:44 +02:00
Hasnain Virk b163057da7 Verifying datarate bug fix
A patch was missed from the feature PR.
verify_channel_DR() in LoRaPHY class had a loop with uninitialized
loop counter.
2018-02-20 15:08:04 +02:00
Vincent Coubard 4ce0ed9c0c BLE: Remove dependency of GenericSecurityManager towards gap. 2018-02-19 17:46:41 +00:00
Vincent Coubard 28f2f46974 BLE: Hide event monitor inside pal. 2018-02-19 17:41:18 +00:00
Vincent Coubard 8b9e08e128 BLE tests: Add stub for device.h . 2018-02-19 17:32:10 +00:00
Vincent Coubard bcea06fb32 BLE: Fix inclusion of mbed_error.h 2018-02-19 17:32:10 +00:00
Vincent Coubard cc896f1b52 BLE: Add mock for the security db. 2018-02-19 17:32:10 +00:00
paul-szczepanek-arm 396ca2ca20 removed redundant cast 2018-02-19 17:29:45 +00:00
paul-szczepanek-arm 990e21247c pull in cordio security manager into BLE 2018-02-19 17:26:24 +00:00
paul-szczepanek-arm dd7bc50e4b Merge branch 'master' into palsm 2018-02-19 16:39:10 +00:00
paul-szczepanek-arm ecacbda507 compiler errors fixed after the merge 2018-02-19 16:28:01 +00:00
Martin Kojtal 3fec23e505
Merge pull request #6115 from andrewleech/nRF5XPalGattClient_include_new
NRF5x: Fix `error_t` conflict with gcc std>=gnu++11
2018-02-19 17:19:09 +01:00
paul-szczepanek-arm 8cf7b3b06f Merge branch 'palsm' of https://github.com/paul-szczepanek-arm/mbed-os into palsm 2018-02-19 15:35:39 +00:00
paul-szczepanek-arm d9156a28e2 connection monitor 2018-02-19 15:32:07 +00:00
Vincent Coubard 9b12c6b11d BLE: Add SecurityManager tests to the build script. 2018-02-19 14:44:30 +00:00
Vincent Coubard 15cfcba16a BLE: Move security DB into PAL. 2018-02-19 14:43:56 +00:00
Vincent Coubard c7672994d2 BLE tests: Mock pal::SecurityManager. 2018-02-19 14:34:07 +00:00
Vincent Coubard 6529d677c1 BLE: Fix include prefixes. 2018-02-19 13:46:46 +00:00
Vincent Coubard 863bdfbb75 BLE: Add unit test for the Generic GattClient.
These tests are build around gtest and gmock and solely run on a host; cmake is
used as a build system:

- cd features/FEATURE_BLE/tests
- mkdir build
- cd build
- cmake ..
- make
- ./gatt-client-tests
2018-02-19 13:23:23 +00:00
Cruz Monrreal 1e1a1787d4
Merge pull request #6087 from ARMmbed/feature-lorawan
Integrating Mbed LoRaWAN Stack in Mbed-OS 5.8
2018-02-16 10:46:53 -06:00
Christopher Haster b548fd8a39 fatfs: Update error code mapping
A lot of the error codes in fatfs were mapped incorrectly. This patch
revisits the error code mapping to try to correct these mistakes
2018-02-16 00:29:22 -06:00
Andrew Leech d001fb1c66 Avoid importing <memory> as this causes a typedef conflict on `error_t` whien compiling with gcc "-std=gnu++11" or above 2018-02-16 12:10:44 +11:00
Kevin Bracey d5dc655a6d Correct LoRaWAN license header 2018-02-15 15:40:18 +02:00
Kevin Bracey 984cc1ab50
Merge pull request #6032 from jarlamsa/status-callbacks
Status callbacks
2018-02-15 13:02:10 +02:00
Cruz Monrreal f9cd95f30d
Merge pull request #6095 from ARMmbed/g-note-mbr-limits
mbr: Add note about limitations
2018-02-14 14:10:41 -06:00
Cruz Monrreal 06b618447f
Merge pull request #5973 from k-stachowiak/IOTSSL-1727-update-to-new-md-api
Update Mbed TLS HW acceleration partner code to new hashing API
2018-02-14 12:58:08 -06:00
Cruz Monrreal 975b940001
Merge pull request #6053 from deepakvenugopal/master
Nanostack release for Mbed OS 5.8
2018-02-14 12:44:53 -06:00
Christopher Haster db965c1652
mbr: Added note about limitations 2018-02-14 10:31:14 -06:00
Krzysztof Stachowiak 2e9243f2e1 Expand guards for conditional compilation of ALT MD API 2018-02-14 16:33:58 +01:00
Christopher Haster 5b09daf0f9 mbr: Added checks for extended partitions 2018-02-13 14:03:02 -06:00
paul-szczepanek-arm 2f1e211da1 set entry state on connect 2018-02-13 16:41:36 +00:00
Hasnain Virk d7c22a6b09 A few Cosmetics & methods for mask manipulation
LoRaMacChannelPlan class provides APIs which are not usable for
PHY layer implementations who do not support custom channel plans.
So we had some code in APIs which was explicitely using magic numbers
for the channel mask. Although it turned out to be not a bug as a layer
down we were checking for custom channel support. However, we now
check for custom channel support before going deep into PHY layer that will
make the code run faster and we have done some cosmetics to the code for
readability.

Channel mask is manipulated with inline methods
2018-02-13 15:09:58 +02:00
paul-szczepanek-arm d44af8c40a don't handle event handler memory by the SM 2018-02-13 12:11:17 +00:00
paul-szczepanek-arm 55045010d6 fixed all the compilation errors and recent pal changes 2018-02-13 11:01:30 +00:00
Krzysztof Stachowiak 8c412ed886 Resolve compiler and linker issues in MD APIs
The features/mbedtls/targets/TARGET_STM/* files include constant needed
for the error codes returned from the MD functions.

The features/mbedtls/targets/hash_wrappers.c provides thin redirection
layer for the hardware accelerated MD implementations that rely on the
old API.

The TESTS/mbedtls/multi/main.cpp has been changed to use the new API
as its build environment does not rely on the translation unit
containing the necessary wrappers.
2018-02-13 10:07:28 +01:00
Christopher Haster fd9e4c12fd Added test to catch multiple nested MBRs 2018-02-12 18:57:41 -06:00
Christopher Haster 70cfef8630 fatfs: Removed extra MBR block
Regression after ChanFS update: Due to parameter changes in the f_mkfs
function, the option to use a separate block for MBR (FDISK) was turned
back on. This should be off as it conflicts with an explicit MBR when
using the MBRBlockDevice.
2018-02-12 17:16:10 -06:00
Cruz Monrreal cf60266584
Merge pull request #6058 from pan-/fix-gap-type-static
Ble: fix size function in advertising_data_t and address_t.
2018-02-12 10:28:32 -06:00
Cruz Monrreal bab8cc4de7
Merge pull request #6018 from bmcdonnell-ionx/fix-dir_seek-warn
fix compiler warning
2018-02-12 10:25:54 -06:00
paul-szczepanek-arm 35b4ae4bc7 typos 2018-02-12 14:42:31 +00:00
paul-szczepanek-arm 581b5755b8 removed duplicate event handler, removed redundant using statements 2018-02-12 13:40:04 +00:00
paul-szczepanek-arm 2c1fcc7235 style 2018-02-12 10:27:27 +00:00
Kimmo Vaisanen 90c02f2843 Check correct return value
mib_get_request() returns lorawan_status_t value so comparing
return value to boolean is incorrect.
2018-02-12 12:09:16 +02:00
Jarno Lamsa 8bea5ef438 Add some documentation for the callback 2018-02-12 11:02:07 +02:00
ccli8 03f0ea1117 [M487] Refine internal_mpi_write_eccreg in ECP alter. 2018-02-12 14:11:15 +08:00
paul-szczepanek-arm 90c30c9022 typo 2018-02-11 18:19:56 +00:00
paul-szczepanek-arm c93e800eea missing ref 2018-02-11 18:13:54 +00:00
paul-szczepanek-arm 934d8f9235 pointers changed to references for a consistent PAL 2018-02-11 18:08:21 +00:00
paul-szczepanek-arm 68db4dd52f avoiding compiler issues 2018-02-11 15:37:23 +00:00
Hasnain Virk 7224fbae1c Style Changes in MAC layer
Style changed according to Mbed-OS guidelines.
2018-02-11 00:31:47 +02:00
Hasnain Virk 20bce2f21c Style changes for LoRaWANTimer & a warning fix
Method naming, doxygen style etc are made to follow Mbed-OS guidelines.
A warning fix in LoRaWANstack.
2018-02-11 00:31:47 +02:00
Hasnain Virk f0fe1229cf Moving LoRaRadio and LoRaWANBAse to lorawan
LoRaRadio and LoRaWANBase use to exist under netsocket/.
However, their logical location should be where the actual stack exists.
2018-02-11 00:31:47 +02:00
Hasnain Virk 4432ad9ae7 Major PHY layer modifications
The PHY layer had a lot of duplicated code in various geographic regions.
In this commit we have tried to concentrate all common functionaliy into
one single class which LoRaPHY that provides three kind of methods:

i) Non virtual base methods which are there for upper layer use, e.g.,
   providing access to driver or generic PHY layer functionality which
   needs to be exposed to upper layers.

ii) Virtual methods (no hard limit on implementation) that can be overriden
    in derived classes. Some PHY implementations will need that as they may
    come with very peculiar channel schemes, e.g., dynamic channel schemes
    in US bands.

iii) Protected methods which are only available for the derived PHYs

We have adopted a mechanism for the dervied PHYs to announce their differenmtiating
parameters in their constructors by filling up a data structure known as lora_phy_params_t
which exists at base level. Access modifier for this data structure is protected so it can only be
used by the base or derived classes, i.e., no exposure to upper layers.

For extra functionality and differentiating controls, a derived PHY can override any virual method as necessary.

In addition to that we have adopted the Mbed-OS style guide and have changed data structures and code to reflect that.
Some data structures are removed.

* Algorithm to get alternate DR is modified. Current scheme, works as multiples of 6 as EU and EU like PHYs
provide 6 datarates. We make sure that we try a datarate at least once. If nuber of join retries is a multiple
of 6, we may try multiple times on each data rate.

* Most of the PHYs with dynamic channel plans, always override the above mentioned algorithm as the rules governing
  this algorithm do not hild in their case.

* band_t data structure is enhanced with lower band frequency and higher band frequency. That enables us to validate
  frequency based upon the band and hence we can have a single function for all PHYs to validate frequency.

* In some PHYs, there were some extra channel masks were defined which were not being used. Hence removed.

* EIRP table corrected in some PHYs based upon spec.

* PHY functions in response to Mac commands are renamed to reflect what they exactly do.
  for example accept_rx_param_setup_req() because that's what they do. they can either accept
  the mac command or reject it.# Please enter the commit message for your changes.
2018-02-11 00:31:47 +02:00
Kimmo Vaisanen 5d98839092 Improve error handling & robustness
This commit also introduces API change for disconnect(). disconnect() will
now return LORAWAN_STATUS_DEVICE_OFF for successfull disconnect.

 * LoRaWANStack::handle_tx() can be called with NULL buffer when length is 0.
   This commit fixes the case where user has provided NULL buffer and length
   is > max_possible_size.

handle_tx() now always returns LORAWAN_STATUS_PARAMETER_INVALID if given
buffer is NULL pointer and length > 0.

General error checking is added and some asserts are added for events.
2018-02-11 00:31:47 +02:00
Kimmo Vaisanen 35045f19cc Implement LoRaMac::disconnect
In order to reset LoRaMac's state in disconnect, we need to implement
an API which can be used to cancel all outstanding requests and reset
LoRaMac's internal state to idle.

This commit introduces LoRaMac::disconnect() which can be used for
this purpose.
2018-02-11 00:31:47 +02:00
Kimmo Vaisanen 44bca596c5 Use EventQueue for timers
Instead of initiating own timer objects we can use EventQueue::call_in() method
as we already have handle to EventQueue object.

Also setting timeout and starting timer has been combined to TimerStart method.
2018-02-11 00:31:47 +02:00
Kimmo Vaisanen f2bdef8543 Add includes for used data types 2018-02-11 00:31:47 +02:00
Hasnain Virk 7369cbd649 [IOTCELL-346] Removing default value storage
We now save roughly 500 bytes by removing storage of default
parameters in the loramac_params_t data structure. We use Mib to
get default values from PHY whenever needed instead.

loramac_sys_arams_t now contains only the runtime values set during operation
whenever defaults are needed we directly query the PHY layer or via Mib as the
need maybe.
2018-02-11 00:31:47 +02:00
Hasnain Virk c02774343a [IOTCELL-282] Code cleanup/simplification and rules
Baseline is changed to use a single set of data structures that simplifies the
code in the LoRaWANStack and Mac layer. We are now following certian rules for naming
data structures.

- All structures visible outside their domain are prefixed as 'lorawan_'
- All mac structures are prefixed as 'loramac_'
- All subsystem or module strucutures carry their name in prefix, like 'mcps_'

PHY layer still have legacy camel case data structures which will be entertained
later while we will be simplifying PHY layer.
Test cases are also updated with the new data structure naming conventions.

One major difference from the previous baseline is the removal of static buffer
from mcps indication. And we do not copy data from stack buffer to rx_msg buffer.
This saves at least 512 bytes.

It may look like now that if we have received something but the user have not read
from the buffer, then the buffer will be overwritten and we will lose previous frame.
Yes, we will. But the same will happen even if we would have copied the buffer into rx_msg
because then the rx_msg gets overwritten. So we decide to abandon copying the buffer at
multiple locations. We inform the user about reception, if the user doesn't read and
the data gets overwritten, then so be it.
2018-02-11 00:31:47 +02:00
Hasnain Virk 6ea541c054 [IOTCELL-286] Adding Channel Plan subsystem
Channel planning was distributed over LoRaWANStack and LoRaMac previously.
We now centralize it by allocating the service to its own class.

Thus making the workflow consistent, i.e.,

Request for channel plan = Application->Interface->stack->Mac->ChannelPlan

Major change apart from adding the channel plan subsystem are the API changes
in LoRaMac class.
2018-02-11 00:31:47 +02:00
Kimmo Vaisanen 34c034dfff Remove duplicate configuration flags
This commit changes code to use directly mbed os configuration system generated
compilation flags.
2018-02-11 00:31:47 +02:00
Hasnain Virk b47c59ce2a [IOTCELL-288] Adding MIB subsystem
As a part of MAC layer breakdown into independent subsystems, we have
introduced a class for MIB service.

Major changes from the baseline are:

- making OpenRxWindow() public in LoRaMac.cpp
- Moving various data structures to central protocol data structure
2018-02-11 00:31:47 +02:00
Hasnain Virk 49885d2bba Changing MLME data access methods to inline
As indicated in one of the reveiws, it makes more sense
to change the data access methods to inline as they are
just one liners.
2018-02-11 00:31:47 +02:00
Hasnain Virk 255bd30a48 [IOTCELL-290] Adding MCPS subsystem
Like MLME, MCPS has also been alloted its own class. This is the
2nd stage of breaking down the MAC services into subsystems.
2018-02-11 00:31:47 +02:00
Hasnain Virk a100ab0226 [IOTCELL-289] Adding Mlme class handle
MAC layer will services will be broken down into independent
subsystems. This is the first of those efforts. We have introduced
LoRaMacMlme class that handles everything related to MLME subsystem or
subservice. To accomodate subsystems we have grouped all protocol level
variables into one big data structure. A pointer to that data structure
will be passed around the subsystems in order to regulate the entire
system.

LoRaMac::Send() and LoRaMac::SetTxContWave*() APIs are made public as
they are needed to be accessed by the subsystems.
2018-02-11 00:31:47 +02:00
Hasnain Virk a3106d2fe6 Timer SingletonPtr & mac protocol data structure
Ticker objects embeded in TimerEvent_t data structure were getting constructed
even for the non LORAWAN builds. And that's what was bloating the builds.
We now lazy initialize them using Mbed-OS utility clas SingletonPtr.

A central data structure has been created that carries all the protocol level
variables for the Mac layer. This is important as we are going to break down
MAC services into subsystems and we will pass around common data using that data structure.
2018-02-11 00:31:47 +02:00
Hasnain Virk f62253ca0e Changing Timer callback to Mbed Callback
Time handler class had a c style callback attached to it which
had been hampering us to be fully object oriented.
That particular callback is changed to Mbed Callback which is attatched
to a specific object hence allowing us to be fully object oriented.
2018-02-11 00:31:47 +02:00
Kimmo Vaisanen e18d76aa7e Change LoRaWANTimer to a C++ class
LoRaWANTimer is now called as LoRaWANTimeHandler class as this class handles both
current time and timer functionalities.

Some refactoring on how LoRa objects are created was needed:
- LoRaWANTimeHandler object is created by LoRaWANStack and shares with LoRaMac and PHY.
- LoRaPHY object is now member of LoRaWANStack class instead of static variable in source file.
2018-02-11 00:31:47 +02:00
Hasnain Virk b634ca49dd Architecture rework, bug fixing & missing features
MAC layer is now a class rather than being a blob.
In addition to that Mac commands are now being handled in
a seperate subsystem (a class of its own). In future we
will do the same with othe sublayers of MAC like MLME, MCPS etc.

The drive behind this exercise is to make MAC and supporting layers
into an object oriented system.

Major bug fixes include:

- last join time inclusion in band parameters
- disabling rx2 window if we missed the slot already
- MLME uplink schdule hook
- nbRep according to spec
- maintaining datarate after successful joining
- suppressing MLME requests if MAC is in TX_DELAYED state
- Uplink dwell time verification

Some missing features are implemented. Details are as follows.

Support for LinkCheckRequet:

An application API is added, add_link_check_request() to delegate a
request for Link Check Request MAC command.

* Application provides a callback function that needs to be called on reception of
  link check response.

* Mac command is piggybacked with data frames.

This API makes the sticky MAC command stick with the application payloads until/unless
the application un-sticks the said mac command using remove_link_check_request() API.

Handling fPending bit:

If in the Downlink, we get the fPending bit set in fctrl octet,
we attempt to send an empty message back to Network Server to
open additional Receive windows. This operation is independent
of the application. An RX_DONE event is queued bedore generating
the said empty message. Specification does not mention what can be the
type of that empty message. We have decided it to be of CONFIRMED
type as it gives us an added benefit of retries if the corresponding
RX slots are missed.

Radio event callbacks as Mbed callbacks:

radio_events_t structure has been carrying C-style callbacks which was
inherited from the legacy code. These callbacks has now been changed to
Mbed Callbacks that makes sure that we can be object oriented from now
on.
2018-02-11 00:31:47 +02:00
Kimmo Vaisanen 1eedadd52d Change region configuration help format
New mbed os configuration parser no longer seems to allow multiline help description.
2018-02-11 00:31:47 +02:00
Hasnain Virk 5e8d8e1c08 Bug fix in setting data rate
Setting up user defined data rate was found broken maybe because of
some rebase issue. Code has been setting always the default data rate
and ignoring used defined values.
2018-02-09 11:00:56 -06:00
Hasnain Virk f7c0ce6221 Making static objects SingletonPtr
We had a lot of static objects which would get constructed and hence
pull in some of the LoRaWAN code into the builds for other technologies.
Such objects have been now lazily initialized using utility class
SingletonPtr.
2018-02-09 11:00:56 -06:00
Kimmo Vaisanen 7872b6a29c Use EventQueue for elapsed time
Current implementation uses high resolution timers to calculate elapsed time.
This prevents for example deep sleep completely and causes unnecessary timer
events.

This commit changes implamentation to use EventQueue::tick() to get elapsed time.
2018-02-09 11:00:56 -06:00
Kimmo Vaisanen b0889f7d21 Move all compliance test code inside compilation flag
All compliance test related codes are now inside LORAWAN_COMPLIANCE_TEST
build flag. This will reduce memory usage in when compliance test codes
are not needed.
2018-02-09 11:00:56 -06:00
Hasnain Virk 97f1680586 [IOTCELL-270] Detaching TxNextPacketTimer
TxNextPacketTimer callback was being used for testing only (compliance testing to be precise).
Now there are independent methods and direct calls to automatic timers for the
compliance testing so there is no particular need for this timer anymore.
2018-02-09 11:00:56 -06:00
Hasnain Virk 05e2d29238 Reworking callback API
Application should be able to add some optional callbacks if it needs to.
Ofcourse there is a penalty of 8-12 bytes per callback, but there can be
certain needs of the application that needs to be met for example setting
up a link check request etc.

We have introduced a structure that contains callbacks for the application use.

 - 'events' callback is mandatory, user must assign it. Because this callback brings
   state changes for the application. We cannot segregate this into individual handlers
   because of RAM penalty.
- Other calbacks (none of them are implemented yet are optional).

Example of using the API is provided with doxygen
2018-02-09 11:00:56 -06:00
Hasnain Virk e60227cf4d Receive API typo fix
Receive API should return the length of data written to the user buffer
as the Posix APIs suggest rather than sending the pending length of data
back.
That has actually been a typo mistake which actually wnt in even with doicumentation :)
2018-02-09 11:00:56 -06:00
Hasnain Virk 6281073d8b [IOTCELL-279] Using Application provided EventQueue
The EventQueue thread in LoRaMac.cpp is disbanded and the LoRaWAN
protocol is redesigned to store a pointer for an application
provided EventQueue. It means that now the stack runs in the
same thread as application. Application provided EventQueue is used
to defer ISRs from radio driver and timer callbacks as well as the
application events are queued to the same event loop.
2018-02-09 11:00:56 -06:00
Hasnain Virk 29353a8380 Adding license text and BSD-Clause 3 2018-02-09 11:00:56 -06:00
Hasnain Virk f33ef6528b Adding LoRaWANInterface - implementing, LoRaWANBase
This class is the doorway for the user application into the
Mbed-OS implementation of LoRaWAN protocol. It implements LoRaWANBase
and hence would work with any stack implementation underneath, ensuring
seemless portability for applications.

It takes a pre-constructed object of LoRaRadio and delegates it in the
downward direction. Before calling connect() user must call initialize() function
in order to initialize stack and mac layers.

connect() APIs can be used to either provide relevent keys and connection method at
runtime or compile time (using Mbed config system).

enable_adaptive_datarate() and disable_adaptive_datarate() are used to turn on/off
automatic rate control. Otherwisem set_datarate() could be used to set a particular
data rate on the current channel.

set_confirmed_msg_retries() is valid only for CONFIRMED messages. It means that the stack will
retry for a given number of times before timing out.

set_channel_plan() and get_channel_plan() are used to set or get a particular channel plan.
These APIs are particularly useful in case of ABP (activation by personalization). Because
in case of OTAA(over the air activation), by default the stack takes in a CF List (carrier frequency list)
sent by the base station in conjunction with Network server. This list overwrites all user configured
channels or channel plan. set_channel_plan() can be used to set a single channel as well by setting the
parameter for number of channels to 1.

remove_channel_plan() or remove_channel() are used to remove a currently active channel plan or a specific
channel.

send() and receive() APIs follow posix design except the socket descriptor is replaced with port number here.

lora_event_callback() API is used to set a callback function from the application side which is used by the stack
to inform user of particular events like CONNECTED, DISCONNECTED, CRYPTO_FAILURE, TX_TIMEOUT etc.
2018-02-09 11:00:56 -06:00
Hasnain Virk 2f860d2be5 Adding LoRaWANStack class to control MAC and PHY
LoRaWANStack class is our controller layer on top of our
current MAC and PHY layer. It provides services to an implementation
of LoRaWANBase class.

It is a singleton class owing to the fact that the mac layer underneath
is not a class object. Instead, it uses the MAC via setting mib, mlme, mcps
requests and getting responses back from the mac layer using confirmations and
indications.

In essense this class is a special handle for
mac layer underneath which is predominantly reference design based.
In future we may refactor the LoRaMac.cpp code to make it object oriented
and cleaner.

At one end, it binds the application selected radio driver with the PHY layer
and at the other end it provides services to upper layers handling the mac via
well defined APIs.

For proper selection of a PHY layer, user must use Mbed config system.
For this purpose an mbed_lib.json is provided which can be overriden by the
user defined mbed_app.json. By default the EU868 band is selected as a PHY layer.
User must set relevant keys for the selected connection mechanism.
2018-02-09 11:00:56 -06:00
Hasnain Virk 5734b57c0a Adding MAC layer for LoRaWAN implementation
The actual mac algorithms are being used as it is in the reference
implementation.

We introduce an internal class that starts a thread and constructs an event queue
to handle deffered calls from interrupt context for RTOS. The code base is
compatible with Mbed-OS 2 as well.

GetPhyEventHandlers() API provides mac callback funtions for PHY layer,
which are in turn delegated to radio driver from the PHY layer.

LoRaMacInitialization() is augmented with LoRaPHY parameter which let's
the MAC layer know which particular PHY layer is in use.

LoRaMacSetTxTimer() and LoRaMacStopTxTimer() are used when duty cycle is
off for testing purpose or to support custom application timers.

If the duty cycle is off, mac and phy layer work togather to figure
out the next possible transmission time.

LoRaMacCrypto APIs are provided which provide seemless integration of
mbedTLS into mac layer for cryptography. User application is supposed to
provide proper mbedTLS configuration file.

All other APIs are retained as it is.
2018-02-09 11:00:56 -06:00
Hasnain Virk c861c321be Adding PHY layer for LoRaWAN
LoRaPHY is the abstract class for the LoRa PHY layer which governs
the LoRaRadio and provides some common functionality to all regional
implementations.
We support 10 regions and every region comes loaded with default parameters.
These parameters can be changed by the Mac layer or explicitely by the stack
controller layer using APIs provided. This layer in essence detaches Mac completely
from PHY and provides more modular approach to the entire system.
Apart from class structure, the internal functionality is directly deduced from
semtech reference implementation that's why most of the internal data structures are
used on 'as is' basis.
In addition to that, the PHY layer provides APIs to control the LoRaRadio layer, i.e.,
the lora radio driver, ensuring that the radio is accessed from a single entry point.
A seperate data structure file is added which is common to PHY layers only.
2018-02-09 11:00:56 -06:00
Hasnain Virk c9804bd167 Adding base class for LoRaWAN interfaces
All network interfaces for LoRaWAN protocol must implement this
class. In order to be compatible with Mbed-OS applications, any
implementation of this class must use the data structures and
Mbed-OS timers provided.

lorawan_data_structures may look repetitive but this is essential
as we have a plan to use a reference implementation for LoRaWAN mac
layer from Semtech. Some of the data structures provide seemless
transition from semtech implementation (as MAC layer) to the Mbed-OS
control layers above.

features/lorawan/lorastack is the placeholder for future items like mac and
phy layers. system/ will contain all the common bits.
2018-02-09 11:00:56 -06:00
Hasnain Virk 69664c5394 Adding base class for all LoRa radio drivers
All Mbed-OS drivers for LoRa radio devices must implement
this pure virtual class in order to be compliant with Mbed-OS
applications.

This class comes loaded with all necessary data structures.
The implementations of this class can come out of tree.
2018-02-09 11:00:56 -06:00
Vincent Coubard 2e64b710a1 Ble: fix size function in advertising_data_t and address_t. 2018-02-09 16:43:29 +00:00
Paul Szczepanek 379c86dd66
Merge pull request #11 from pan-/palsm-orig
Cordio update
2018-02-09 16:40:16 +00:00
paul-szczepanek-arm e91ab466ea doxygen added 2018-02-09 16:39:01 +00:00
paul-szczepanek-arm 18062fc9de GAP integration for connection and disconnection events 2018-02-09 16:35:16 +00:00
paul-szczepanek-arm e7cf1529ec remobed todo, will be handled by db 2018-02-09 14:21:24 +00:00
paul-szczepanek-arm e0c308f8f2 fix buffer not being moved in random number generation 2018-02-09 13:59:03 +00:00
paul-szczepanek-arm 769c97e32c random data generation 2018-02-09 13:55:33 +00:00
paul-szczepanek-arm fe9b558a2a init random number on local device for OOB data 2018-02-09 13:29:37 +00:00
paul-szczepanek-arm 564749674f cmac using the tls implementation 2018-02-09 12:54:08 +00: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
paul-szczepanek-arm 947c6ed239 implement oob data store in db 2018-02-09 11:11:35 +00: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
andreas.larsson 34099ba294 Added missing lwip_md5_init and lwip_md5_free as suggested by:
https://github.com/ARMmbed/mbed-os/issues/6003#issuecomment-364127671
2018-02-09 12:55:10 +02:00
paul-szczepanek-arm 0806584e45 oob presence set correctly for legacy pairing 2018-02-09 10:52:39 +00: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
Juha Ylinen 38ceb9339e lwip: enable EMAC IPv6 support 2018-02-09 10:11:44 +02:00
Christopher Haster df1896b6c0 littlefs: Fix incorrect lookahead population before ack
Rather than tracking all in-flight blocks blocks during a lookahead,
littlefs uses an ack scheme to mark the first allocated block that
hasn't reached the disk yet. littlefs assumes all blocks since the
last ack are bad or in-flight, and uses this to know when it's out
of storage.

However, these unacked allocations were still being populated in the
lookahead buffer. If the whole block device fits in the lookahead
buffer, _and_ littlefs managed to scan around the whole storage while
an unacked block was still in-flight, it would assume the block was
free and misallocate it.

The fix is to only fill the lookahead buffer up to the last ack.
The internal free structure was restructured to simplify the runtime
calculation of lookahead size.
2018-02-08 18:53:19 -06:00
paul-szczepanek-arm a2cff3079e move oob to db, add cmac helper func 2018-02-08 21:48:43 +00:00
paul-szczepanek-arm 0a54ca39d0 move pairing under its own heading to match other parts 2018-02-08 18:41:35 +00:00
paul-szczepanek-arm 56530d4917 sc oob verification needs local random value 2018-02-08 18:35:02 +00:00
paul-szczepanek-arm d061c89e31 storing sc oob, checking for its presence 2018-02-08 18:23:23 +00:00
paul-szczepanek-arm cba77ad5d1 saving public keys 2018-02-08 16:36:06 +00:00
paul-szczepanek-arm 0b15798673 style and moved for clarity 2018-02-08 16:03:52 +00:00
Martin Kojtal 65e751bafb
Merge pull request #6025 from karsev/thread_api_adds
Mesh-api setters for eui64 and pskd
2018-02-08 15:22:02 +00:00
Martin Kojtal b7908a64c4
Merge pull request #6033 from anttiylitokola/master
Update mbed-coap to version 4.2.0
2018-02-08 15:20:37 +00:00
paul-szczepanek-arm b5b86b72fe oob handling inside genric for secure connections 2018-02-08 15:17:12 +00:00
Cruz Monrreal 1c5c1c79d0
Merge pull request #6027 from ithinuel/fix-target-names-for-murata-abz-and-adv-wise-1510
rename MURATA type ABZ & WISE 1510 to their expected name
2018-02-07 20:06:50 -06:00
Cruz Monrreal 1ac115d794
Merge pull request #6013 from kivaisan/add-wise-1570
Add MTB_ADV_WISE_1570 target
2018-02-07 20:05:38 -06:00
Kari Severinkangas f63dbf56db Mesh-api setters for eui64 and pskd 2018-02-07 16:45:39 +02:00
Antti Yli-Tokola 47e0922830 Update mbed-coap to version 4.2.0
* Add new API to remove sent blockwise message from the linked list
2018-02-07 13:03:12 +02:00
paul-szczepanek-arm 1b6a84d5a4 oob data propagated to pal 2018-02-07 10:16:44 +00:00
paul-szczepanek-arm 20444c8dd7 missing implementations 2018-02-07 08:59:48 +00:00
paul-szczepanek-arm 4c56f8980d removed redundancy in types 2018-02-06 23:08:32 +00:00
paul-szczepanek-arm 8cc36650df added OOB to interface, moved address type to common 2018-02-06 22:59:21 +00:00
paul-szczepanek-arm b6be4df162 doxygen 2018-02-06 22:01:54 +00:00
paul-szczepanek-arm 1446142b60 ltk for secure connections 2018-02-06 21:50:57 +00:00
Cruz Monrreal f0273ecb28
Merge pull request #6026 from orenc17A/update_uvisor_tests
Update uvisor-tests.txt to disable EFM32 in Jenkins
2018-02-06 15:35:14 -06:00
Wilfried Chauveau 6c9fcf3dd8 rename MURATA type ABZ & WISE_1510 to their expected name 2018-02-06 21:23:37 +00:00
paul-szczepanek-arm 3236eada5e multiple ltks single irk and csrk 2018-02-06 21:16:22 +00:00
Cruz Monrreal 8ae80892b7
Merge pull request #5975 from ashok-rao/br-xDOT
Adding MTB_MTS_XDOT as a new target
2018-02-06 13:05:12 -06:00
Oren Cohen b6be492751 Update uvisor-tests.txt to disable EFM32 in Jenkins 2018-02-06 18:41:19 +02:00
paul-szczepanek-arm 7aa9ae7888 fix typos 2018-02-06 15:39:31 +00:00
paul-szczepanek-arm aba65d7fd5 added doxygen 2018-02-06 14:32:47 +00:00
Krzysztof Stachowiak 256e1de28a Modify Silicon Labs target code to use MD API with the return values 2018-02-06 12:58:27 +01:00
paul-szczepanek-arm 9bc8c56df3 address types added, secure connectins oob added 2018-02-06 10:17:31 +00:00
ccli8 25253529ae [M487] Support internal self-test for ECP alter. 2018-02-06 11:15:48 +08:00
ccli8 95d4110e31 [M487] Remove mbedtls_internal_ecp_mul in ECP alter.
MbedTLS doesn't support point multiplication for MBEDTLS_ECP_INTERNAL_ALT acceleration configuration.
2018-02-06 09:58:36 +08:00
ccli8 df76e297b4 [M487] Remove mbedtls prefix for internal functions in ECP alter. 2018-02-06 09:43:53 +08:00
ccli8 c9cc357734 [M487] Check divisor is not zero in MODOP_DIV operation in ECP alter. 2018-02-06 09:30:57 +08:00
Brendan McDonnell 88cd13b115 cast to resolve signed/unsigned comparison compiler warning in FATFileSystem::dir_seek() 2018-02-05 15:16:02 -05:00
Kimmo Vaisanen 41490f48d0 Add MTB_ADV_WISE_1570 target 2018-02-05 14:31:20 +02:00
Christopher Haster dcd0e6b82e Workaround for insufficient heap on IAR+MTB_xDOT_GT
We currently don't have a mechanism for selecting tests based on the
available ram/heap, so the best solution right now is to disable these
tests specifically for this target.
2018-02-01 10:51:16 -06:00
paul-szczepanek-arm 32e91ac168 removed idenitty list as resolution will be done insite the db asynchronously 2018-02-01 10:00:10 -06:00
Krzysztof Stachowiak 174530b5fe Resolve conflicts after master update 2018-02-01 14:30:56 +01:00
paul-szczepanek-arm f53359f60c doxygen 2018-01-31 16:42:35 -06:00
paul-szczepanek-arm 132b9e01bf fix encryption call to accept 16 octets 2018-01-31 16:23:45 -06:00
paul-szczepanek-arm 714069b965 deal with failed LTK retrieval, remove unused functionality, more doxygen 2018-01-31 14:16:56 -06:00
Cruz Monrreal 5cd30b965c
Merge pull request #5925 from geky/bd-erase-value
bd: Add get_erase_value function to the block device API
2018-01-31 12:13:54 -06:00
Cruz Monrreal c06a42b05d
Merge pull request #5630 from adustm/fix5079_sha1_md5_sha256_hwcrypto
Fix #5079. Support of call to mbedtls_x_finish without calling mbedtls_x_update
2018-01-31 12:08:44 -06:00
paul-szczepanek-arm 5498b79f55 doxygen, moved types to common 2018-01-31 12:06:01 -06:00
paul-szczepanek-arm 62502fe1c8 more doxygen and naming consistency 2018-01-31 11:27:32 -06:00
paul-szczepanek-arm 2060ad5df0 we don't need two event handler since now the generic security manager implements the interface 2018-01-30 17:01:30 -06:00
paul-szczepanek-arm e686eec048 missing implementation for whitelist from bond table and more doxygen 2018-01-30 16:49:35 -06:00
Cruz Monrreal b87e98c57b
Merge pull request #5904 from ithinuel/add-wise-1510
add support for STM32L443RC & WISE-1510
2018-01-30 15:01:00 -06:00
Cruz Monrreal 101fc62495
Merge pull request #5926 from geky/bd-sync
bd: Add sync function to the block device API
2018-01-30 14:55:59 -06:00
paul-szczepanek-arm 322ee90797 doxygen fixes 2018-01-30 14:00:21 -06:00
paul-szczepanek-arm 9e79ba4ee4 doxygen 2018-01-30 11:27:12 -06:00
Krzysztof Stachowiak 876a3b1a74 Update Mbed TLS HW acceleration partner code to new hashing API 2018-01-30 14:49:53 +01:00
adustm 88c3b3ee28 Remove last code redundancy 2018-01-30 11:06:15 +01:00
adustm 53027fd590 Improve fix calling Accumulate function every time in finish function 2018-01-30 09:41:23 +01:00
adustm cba538854d Fix MD5 link issue 2018-01-30 09:41:23 +01:00
adustm 3250e2d6d4 Fix #5079. Add the support of call to mbedtls_xxx_finish even if mbedtls_xxx_udate
was not called since mbedtls_xxx_start
2018-01-30 09:41:23 +01:00
Amanda Butler e6949db802 bd: Copy edit BlockDevices
Copy edit SlicingBlockDevice.h
Copy edit ReadOnlyBlockDevice.h
Copy edit ProfilingBlockDevice.h
Copy edit ObservingBlockDevice.h
Copy edit MBRBlockDevice.h
Copy edit ExhaustibleBlockDevice.h
Copy edit ChainingBlockDevice.h
Copy edit BlockDevice.h

Copy edit files for active voice and consistent tense.
2018-01-29 18:45:36 -06:00
paul-szczepanek-arm faf134ae60 move helper funcitons under their own heading 2018-01-29 17:16:47 -06:00
paul-szczepanek-arm 9786244386 removed redundant const 2018-01-29 16:00:53 -06:00
Christopher Haster 88aad81345 bd: Adopted the get_erase_value function in the util block devices 2018-01-29 15:33:02 -06:00
Christopher Haster 7707c8b8b8 bd: Added get_erase_value function to the block device API
Default implementation returns -1 and is backwards compatible
2018-01-29 15:31:07 -06:00
paul-szczepanek-arm d0c4186b9e moved fucntion impl to match position in header 2018-01-29 21:20:15 +00:00
paul-szczepanek-arm eb899bc798 split identity away from meta data and csrk, moved privacy feature from db to security manager 2018-01-29 21:10:08 +00:00
paul-szczepanek-arm f4d29bbef6 clear up private address resolution 2018-01-29 19:22:08 +00:00
paul-szczepanek-arm 647aa1eebe split security manager into a header and moved types to common types
plus a bit of extra doxygen comments
2018-01-29 17:57:00 +00:00
Cruz Monrreal 49cdb0bb07
Merge pull request #5945 from kjbracey-arm/dns_multiple
Correct return value of nsapi_dns_query_multiple
2018-01-29 10:09:42 -06:00
paul-szczepanek-arm ed0722c303 upgraded oob data to octet type 2018-01-28 10:08:15 +00:00
paul-szczepanek-arm 724aef96a3 moved types to common header 2018-01-28 07:07:54 +00:00
Wilfried Chauveau e6b19d838c add support for STM32L443RC & WISE-1510 2018-01-26 17:06:39 +00:00
Cruz Monrreal fe87499af8
Merge pull request #5874 from c1728p9/usb_fixes_and_improvements
USB fixes and improvements
2018-01-26 10:37:13 -06:00
Kevin Bracey 15a3922f58 Correct return value of nsapi_dns_query_multiple
Documentation states that nsapi_dns_query_multiple returns the number of
addresses found on success - it was returning 0.

Overloads using SocketAddress are relying on the return value, meaning
those calls didn't work at all.

Fixes #5921.
2018-01-26 14:08:29 +02:00
Christopher Haster 6e5f2439a3 littlefs: Adopted the block device sync function
Required to garuntee that data is flushed all the way down to the disk
level when a file is synced or closed.
2018-01-24 18:07:47 -06:00
Christopher Haster a4f8af9d5b bd: Adopted the sync function in the util block devices 2018-01-24 18:07:35 -06:00
Christopher Haster 3f5d618c89 bd: Add sync function to the block device API
/** Ensure data on storage is in sync with the driver
 *
 *  @return         0 on success or a negative error code on failure
 */
virtual int sync()
2018-01-24 17:58:20 -06:00
bcostm 352ac7a2be Use RawSerial in MBED_11 test 2018-01-24 14:45:18 +01:00
paul-szczepanek-arm 1cc5312d1e octet type for keys 2018-01-24 10:22:53 +00:00
Cruz Monrreal 8e683d5f1d
Merge pull request #5864 from JaniSuonpera/CoAP_v4.0.11
CoAP v4.1.1
2018-01-23 11:31:39 -06:00
paul-szczepanek-arm 38f8a5b8d5 separate live state from stored state in entry 2018-01-23 17:01:44 +00:00
paul-szczepanek-arm 8ef3311be0 naive memory implementation for verification purposes 2018-01-23 16:01:54 +00:00
paul-szczepanek-arm c476fceba3 correct naming for private members 2018-01-23 15:36:57 +00:00
paul-szczepanek-arm 92965baaa8 removed redundant mitm field 2018-01-23 12:27:03 +00:00
paul-szczepanek-arm 56ea4202d7 read mitm of the csrk key not pairing 2018-01-23 12:21:32 +00:00
paul-szczepanek-arm bc1e809ca3 keeping state of connection, storing mitm quality of keys 2018-01-23 12:20:12 +00:00
paul-szczepanek-arm f635555a74 refresh not needed, done through requesting encryption on encrypted link 2018-01-23 12:19:38 +00:00
paul-szczepanek-arm f1044fe2b6 internal function naming 2018-01-23 11:25:28 +00:00
paul-szczepanek-arm 4aa7158c4b temporary code for use during verification before we integrate with gap 2018-01-23 10:47:16 +00:00
paul-szczepanek-arm 10b5e648fd slave request handling 2018-01-22 21:01:05 +00:00
paul-szczepanek-arm 8b84b93b2c fix to apply defaults for pairing response 2018-01-22 17:32:13 +00:00
paul-szczepanek-arm 2b7db78d7b pairing through a single function to keep settings 2018-01-22 17:27:01 +00:00
paul-szczepanek-arm b4e85b3d06 moved db into its own file 2018-01-22 16:50:15 +00:00
paul-szczepanek-arm 2d8451f770 block legacy pairing when requested 2018-01-22 16:39:41 +00:00
Cruz Monrreal 5af1d8fca6
Merge pull request #5800 from abougouffa/feature_unsupported_usbhost
Some enhancements for the USBHost feature and small bug fix
2018-01-22 10:26:07 -06:00
Cruz Monrreal 6a708d1cf8
Merge pull request #5878 from c1728p9/lpc_usb_stability_fixes
LPC USB stability fixes
2018-01-22 10:25:13 -06:00
Cruz Monrreal ff08b10a90
Merge pull request #5877 from c1728p9/kinetis_usb_stability_fixes
Kinetis USB improvements and fixes
2018-01-22 10:24:23 -06:00
paul-szczepanek-arm 305975b15a hint role reversal, set the correct ltk keys 2018-01-22 16:21:30 +00:00
paul-szczepanek-arm 69aac8abee const fix 2018-01-22 14:55:49 +00:00
paul-szczepanek-arm 2ae05ea6aa enabling signing 2018-01-22 14:54:17 +00:00
paul-szczepanek-arm 1208dc7c34 readability 2018-01-22 14:37:34 +00:00
paul-szczepanek-arm 533f6a464a restructure cases to avoid warnings 2018-01-22 14:35:02 +00:00
paul-szczepanek-arm 4c56d4c90b returning ref to array for csrk 2018-01-22 14:30:22 +00:00
paul-szczepanek-arm cba92fe82c db changes to suport peer and local keys 2018-01-22 14:11:22 +00:00
paul-szczepanek-arm 5e0ed3db01 pul events to retrieve local ltk edvi rand 2018-01-22 13:50:30 +00:00
paul-szczepanek-arm d1c29faaa8 added slave security request 2018-01-22 11:49:42 +00:00
paul-szczepanek-arm 3300395468 missing init, removed redeclaration 2018-01-22 09:57:35 +00:00
Jani Suonpera e0e3dbb7f8 CHANGELOG updated 2018-01-22 10:53:14 +02:00
ccli8 17280372a7 [M487] Refine code in ECP alter.
1. Add comment for unnecessary parameter 'n' in mbedtls_internal_run_eccop
2. Fix warning message with goto which causes `bypass initialization`
3. Fix comment
2018-01-22 11:21:19 +08:00
paul-szczepanek-arm d880f6238d encryption needs ltk rand and ediv 2018-01-21 22:57:05 +00:00
paul-szczepanek-arm e301f7a1c3 removed redundant checks 2018-01-21 21:43:02 +00:00
paul-szczepanek-arm 9be7dbef78 mitm quality added 2018-01-21 19:54:41 +00:00