Commit Graph

5931 Commits (5cfee6588183431f21e1ef75de0afca92277ca45)

Author SHA1 Message Date
Mika Leppänen 3951422824 lwIP adds now PPP DNS servers to default interface
If PPP interface is the lwIP default interface, adds the PPP DNS
servers to default DNS server storage. If PPP is not default
interface, then adds DNS servers to interface specific storage.
2019-08-20 13:37:12 +03:00
Mika Leppänen 3102bb1340 Removed pbuf operations that were commented out 2019-08-20 13:37:12 +03:00
Mika Leppänen a2df462f65 Nanostack changes for PPP service
Created PPP interface for PPP service. Re-used the ethernet tasklet
and PHY driver structure for PPP.
2019-08-20 13:37:12 +03:00
Mika Leppänen 3864e12172 lwIP changes for PPP service
Created (a new) PPP interface for PPP service. Removed lwip
dependencies to PPP (memory allocations etc.). Moved PPP
configuration options away from lwIP mbed_lib.json to new
PPP service. For backwards compatibility, using the old
options is also currently supported.
2019-08-20 13:37:12 +03:00
Mika Leppänen c9cb8f8296 Created netsocket classes for PPP service and PPP interface
PPP service encapsulates the PPP protocol. PPP interface can be used as
helper class to bind PPP protocol with network stack (similar to
EMAC and L3IP interface). Added PPP interface to onboard network
stack class.
2019-08-20 13:27:54 +03:00
Mika Leppänen a1e3a5d901 Created PPP service class
Created PPP service class that encapsulates the PPP protocol.
Class is similar to EMAC and L3IP classes with additional methods
to read IP and DNS server addresses negotiation using PPP and
to set PPP specific parameters (file handle for modem access etc.).

PPP service can use on its own thread or in run in mbed os event
Queue thread.

Added ppp_nsapi.cpp module that implements the nsapi_ppp.h
services.

Added ppp_nsapi.cpp module that implements the nsapi_ppp.h
services.
2019-08-20 13:27:54 +03:00
Kari Haapalehto c518319fa3 Moved PPP from lwip directory to under netsocket
Moved PPP and renamed files and constants.
2019-08-20 13:27:54 +03:00
Martin Kojtal 0b49952b9e
Merge pull request #11249 from dextero/get-sms-zero
Make AT_CellularSMS::list_messages support index 0 in SMS inbox
2019-08-20 10:27:57 +02:00
Martin Kojtal 9ccfe49d12
Merge pull request #11247 from dextero/international-numbers
AT_CellularSMS: set "international" flag in PDU when applicable
2019-08-20 10:27:13 +02:00
Martin Kojtal 63084ad874
Merge pull request #11241 from teijokinnunen/lorawan-uplink-rx-fix
LoRaWAN: Terminate RX when receiving uplink messages
2019-08-20 10:24:51 +02:00
Martin Kojtal 083824807c
Merge pull request #11239 from Patater/import-mbedtls-crypto-from-mbedcrypto
crypto: Copy legacy crypto from Mbed Crypto
2019-08-20 10:24:41 +02:00
Martin Kojtal 7ee382bdc0
Merge pull request #11216 from paul-szczepanek-arm/fix-ad-parser
BLE: make advertising data parser handle early termination
2019-08-20 09:59:18 +02:00
Martin Kojtal b849bc1e3d
Merge pull request #11201 from mirelachirica/bug_virtual_in_constructor
Cellular: Fixed improper AT handler setup through virtual calls in co…
2019-08-20 09:52:28 +02:00
Martin Kojtal 5904614696
Merge pull request #11183 from OpenNuvoton/nuvoton_m252kg_test
M252KG: Fix kvstore-static_tests failing with OOM
2019-08-20 09:49:58 +02:00
Martin Kojtal 64fb49e4ec
Merge pull request #11169 from dmaziec1/TLSSocketWrapper_recvfrom_modified
TLSSocketWrapper::recvfrom sets SocketAddress output variable
2019-08-20 09:41:39 +02:00
Martin Kojtal a5a2036c65
Merge pull request #11224 from AnttiKauppila/Coverity_fixes
Coverity issues fixed
2019-08-20 09:40:20 +02:00
Jarkko Paso 2aacb1c527 hal fhss timer: all static functions inside anonymous namespace 2019-08-19 13:20:46 +03:00
Martin Kojtal 2e09a27e05
Merge pull request #11165 from VeijoPesonen/fix_internal_kvstore_config
Allows placing KVStore and update images on separate storage devices - to internal and external flash
2019-08-19 11:46:39 +02:00
Martin Kojtal cc7e2f8279
Merge pull request #11222 from paul-szczepanek-arm/fix-recursive
BLE: fix recursive call
2019-08-19 10:24:26 +02:00
Marcin Radomski 17f6f1c0e3 Make AT_CellularSMS support index 0 in SMS inbox
When AT+CGML is used to retrieve list of SMS stored in modem inbox,
every message has an associated index. ETSI TS 127 005 v7.0.0 does not
specify what is the allowed range of such indices - all it says is
"integer type; value in the range of location numbers supported by the
associated memory".

Usually, AT modems use positive indexes (starting at 1). Quectel BG96
modem takes a different approach, indexing messages starting at 0.

Current implementation of `AT_CellularSMS::list_messages()` considers
index 0 invalid and ignores such message, effectively making it
impossible to access using mbed-os API.

This commit changes the behavior so that value of 0 is handled as any
other positive message index.
2019-08-16 14:19:29 +02:00
Marcin Radomski 726eace763 Do not fail on trailing data in read_int
Some tests depend on that behavior.
2019-08-16 14:14:58 +02:00
Marcin Radomski c0032c9055 ATHandler::read_int: allow returning 0 successfully 2019-08-16 14:14:58 +02:00
Marcin Radomski 2bfa4e9b8d AT_CellularSMS: set "international" flag in PDU when applicable
Currently, create_pdu receives a destination address without '+' prefix,
and always sets the "type of address" to "unknown". That means, the
number needs to contain appropriate international number prefix (00/011)
if necessary - which is not the case if the leading + is simply
stripped.

This changes send_sms behavior so that when a SMS is sent to an
international number (indicated by leading +):

- AT+CMGS command receives the number with + prefix,
- created PDU has the "international" flag set.
2019-08-16 13:30:59 +02:00
Marcin Radomski f3e9501ac6 Increase PDU buffer size to fit 8-bit-encoded hex string 2019-08-16 13:20:37 +02:00
Ari Parkkila 2934a692c9 Netsocket: Change DNS retry and total attempt counts 2019-08-16 03:51:43 -07:00
Marcin Radomski 14f8d15242 Add option to set up SMS encoding 2019-08-16 12:24:54 +02:00
Teijo Kinnunen 10c0f20317 LoRaWAN: Terminate RX when receiving uplink messages
This prevents RX2 window to be enabled at the same time when repeating
transmission, when QoS repeated TX is in effect. Failure to do so
seems to place the LoRaWAN stack in a state where send() always fails
with WOULD_BLOCK error.
2019-08-16 12:56:58 +03:00
Jarkko Paso 3e9d7b3598 hal fhss timer: removed unnecessary and potentially unsafe memset 2019-08-16 11:46:10 +03:00
Jaeden Amero b6c24e2e09 crypto: Copy legacy crypto from Mbed Crypto
Mbed TLS no longer provides legacy crypto C or H files. Obtain the files
from Mbed Crypto instead.
2019-08-16 09:20:03 +01:00
Jaeden Amero 82927057b9 lwip: Use correct include path for mbedtls
The portable and correct way to include Mbed TLS header files is
"mbedtls/someheader.h". It's Mbed OS specific, unecessary, and incorrect
to use "mbedtls/inc/mbedtls/someheader.h".
2019-08-16 09:20:03 +01:00
Mirela Chirica 75c823c1a3 Cellular: Fixed improper AT handler setup through virtual calls in constructor
Added AT handler setup method to be used for initialisation routines
that are virtual and therefore cannot be called from constructor.
2019-08-16 10:57:37 +03:00
Anna Bridge f9eb870a47
Merge pull request #11198 from RonEld/remove_redundant_file
Remove redundant file accidentally added
2019-08-15 12:59:57 +01:00
Anna Bridge 2af2b1b18b
Merge pull request #11190 from jarvte/fix_wise1570_netsocket_tests
Cellular: failure when deleting created context is not considered error
2019-08-15 12:58:32 +01:00
Anna Bridge 797e58a2b3
Merge pull request #11148 from AriParkkila/cell-sim-pin
Cellular: Fix SIM pin enter command
2019-08-15 12:49:24 +01:00
Chun-Chieh Li 500221c6a0 Fix kvstore-static_tests failing with OOM
Forked 3 threads plus misc, so minimum (4 * OS_STACK_SIZE) heap are required.
2019-08-15 17:53:31 +08:00
Veijo Pesonen 722628be02 [TDBStore] changes the default TDBStore location
Thus far the default position has been after the application plus two
spare sectors. For simplicity and to have a predictable location for the
TDBStore with the default configuration the location is now switched to
the end of the flash. Two last sectors to be exact.
2019-08-15 09:26:57 +03:00
Paul Szczepanek 71f59eaf6c
add comments 2019-08-14 17:11:52 +01:00
Antti Kauppila 84063bf222 Coverity issues fixed 2019-08-14 16:22:05 +03:00
Martin Kojtal 0a73eda9d4
Merge pull request #11200 from jarvte/move_string_to_pdp_type
Cellular: moved string_to_pdp_type from AT_CellularContext to Cellula…
2019-08-14 12:53:20 +02:00
Teppo Järvelin 6a17d74b55 Cellular: notify global up after we have IP address
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.
2019-08-14 12:54:13 +03:00
paul-szczepanek-arm 280c55d57a fix recursive call 2019-08-14 09:39:04 +01:00
paul-szczepanek-arm 8acd127640 handle early termination of ad struct 2019-08-13 14:49:18 +01:00
Martin Kojtal b82cfcc38b
Merge pull request #11193 from michalpasztamobica/fat_stat
FATFileSystem::stat() enabled for all compilers
2019-08-13 11:23:10 +02:00
Mahesh Mahadevan 9ebbdbf1bb MCUXpresso: Update KW41 nanostack drivers to not enter deep sleep when active
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-12 10:57:11 -05:00
Mahesh Mahadevan 85ef683bfc MCUXpresso: Update ENET drivers to not enter deep sleep when active
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-08-12 10:57:08 -05:00
paul-szczepanek-arm c79ffd112f add nonscannable connectable type 2019-08-12 16:38:42 +01:00
Teppo Järvelin 3c1bf0a9e2 Cellular: moved string_to_pdp_type from AT_CellularContext to CellularUtil
string_to_pdp_type is a common method for AT and other layers.
Without moving there will be duplicate methods.
2019-08-12 10:27:57 +03:00
Ron Eldor 0b1b4cc908 Remove redundant file accidently added
Remove unneeded redundant file that was accidentally added.
2019-08-11 14:26:52 +03:00
Ron Eldor d09e3ef3b4 Style fixes
1. Remove redundant extra lines.
2. Have the function parameters aligned.
3. Remove redundant white spaces.
2019-08-11 14:03:34 +03:00
Michal Paszta 406fcdc9b7 FATFileSystem::stat() enabled for all compilers
Macro which restricted compilation to GCC_ARM is removed.
Existing read_write() test is amended to call stat() and check that correct size is returned.
2019-08-09 15:52:49 +03:00
Teppo Järvelin 6e71932baf Cellular: move RAT reading to better support ublox custom boards
AT commands used in read_radio_technology() function are not supported
by all boards so moving the function where it's actually used. Usage was
already inside of the #ifdef's.
2019-08-09 13:23:50 +03:00
Teppo Järvelin 10251ab3b2 Cellular: failure when deleting created context is not considered as an error
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.
2019-08-09 12:27:25 +03:00
Seppo Takalo 9bf85ef67e
Merge pull request #11179 from ARMmbed/storage_coverity_fixes
Zero initialise all NVStore&kvstore members
2019-08-07 17:23:03 +03:00
Seppo Takalo 3b0053c234
Merge pull request #11161 from desmond-blue/feature-fix-path-cloud-client
Fix include path issues on NRF5x with Cordio
2019-08-07 16:22:24 +03:00
Seppo Takalo 7d7416558a
Merge pull request #11073 from ARMmbed/feature-public-headers
Feature public headers
2019-08-07 16:04:45 +03:00
Seppo Takalo a5e3336c19 Zero initialise all NVStore&kvstore members 2019-08-07 14:17:15 +03:00
Seppo Takalo 5f6379a55d
Merge pull request #11119 from Reda-RM/master
Riot Micro cellular device
2019-08-07 14:07:27 +03:00
Seppo Takalo 976c30c52b
Merge pull request #11162 from AriParkkila/cell-dns
Add DNS servers from cellular PDP to nsapi
2019-08-07 14:06:49 +03:00
Seppo Takalo 6781c793b6
Merge pull request #11173 from michalpasztamobica/coverity_fixes
Coverity and compilation warnings fixes
2019-08-07 14:06:04 +03:00
Michal Paszta 73b122b2c4 Coverity and compilation warnings fixes 2019-08-07 10:30:52 +03:00
Dominika Maziec e9059c214c TLSSocketWrapper::recvfrom sets SocketAddress output variable
UNITTEST added. TLSSocketWrapper unittest does not use stoip4_stub anymore.
2019-08-06 15:07:39 +02:00
Teja Narahari d84b47728a Enterprise security support 2019-08-06 14:46:37 +05:30
Seppo Takalo 46a56fb47b
Merge pull request #11154 from AriParkkila/cell-shutdown-stm
Cellular API shutdown to stop state machine
2019-08-06 11:34:44 +03:00
Seppo Takalo dd2d585f30
Merge pull request #11149 from mirelachirica/remove_local_stack_types
Cellular: Remove unnecessary local variables
2019-08-06 11:29:56 +03:00
Seppo Takalo 13ee14c624
Merge pull request #11156 from artokin/nanostack_patch_for_mbed_os_5_13_x
Nanostack patch release for Mbed OS 5.13.x
2019-08-06 11:28:36 +03:00
Veijo Pesonen 9222e15848 Allows having KVStore in internal and update image in external flash
Fixes a bug where it has not been possible to have KVStore in internal
flash while an update image image has been kept in external storage.
2019-08-06 09:49:14 +03:00
Ari Parkkila e1124668db Cellular: Add DNS servers from PDP contexts to nsapi_dns 2019-08-05 21:53:24 -07:00
Seppo Takalo 937e791ae0
Merge pull request #10980 from vmedcy/tcpip-thread-priority
LwIP: make TCPIP_THREAD_PRIO configurable
2019-08-05 16:12:01 +03:00
Ari Parkkila 3f74a7f6f9 Fix nsapi_dns_add_server to add a server just once 2019-08-05 03:11:06 -07:00
desmond.chen 3880ae3e81 Fix include path issues on NRF5x with Cordio 2019-08-05 15:17:30 +08:00
Reda Maher 022b99325b Cellular: Support Riot Micro cellular device 2019-08-03 23:42:26 +02:00
Hugues Kamba f0f408b2d8 Upstream PR #11073 review request changes (#11135)
* Modify Doxygen grouping of `drivers` Public/Internal APIs
* Correct classification of `mbed_events.h`
* Amend name of Doxygen group containing Device Key API
* Classify `CallChain.h` as public API and relocate file
* Remove Doxygen group from `equeue_platform.h` as it has no Doxygen compliant documentation
* Move USB target specific code back to `usb/device/targets`
2019-08-02 12:32:40 +01:00
George Psimenos 3b23edb78c Fix CI for branch feature-public-headers (#11093)
* Fix rtos include path in NRFCordioHCIDriver
* Flatten USB driver directory structure
* Add missing include for us_ticker
* Add more missing includes for us_ticker
* Fix mbed_hal_fpga_ci_test_shield/uart test
* Fix bare-metal build
* Fix Watchdog UNITTEST
* Fix Mbed OS 2 build for Public/Internal headers relocating
2019-08-02 12:32:40 +01:00
Hugues Kamba bfa1b4dd84 Drivers/Events/RTOS Public and internal APIs cleanup (#10955)
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"
2019-08-02 12:23:47 +01:00
Arto Kinnunen d902c1a135 Merge commit 'c51a57a0334645b14794f6082737b11d8b8c56db' into prepare_for_mbedos_5_13_3
* commit 'c51a57a0334645b14794f6082737b11d8b8c56db':
  Squashed 'features/nanostack/sal-stack-nanostack/' changes from 0345477..3c7d50e
2019-08-02 13:52:37 +03:00
Arto Kinnunen dac37a8994 Merge commit '489fa3adeb46ef38d46db4339dfe8935c9444b02' into prepare_for_mbedos_5_13_3
* commit '489fa3adeb46ef38d46db4339dfe8935c9444b02':
  Squashed 'features/nanostack/coap-service/' changes from 3c79829..3b447d2
2019-08-02 13:51:07 +03:00
Seppo Takalo 818c1d6f0f
Merge pull request #11130 from Tharazi97/NotSupportedTest
Updated testcases
2019-08-02 13:27:54 +03:00
Seppo Takalo 2ca8487371
Merge pull request #11082 from AriParkkila/cell-bg96-dns
Cellular: Add BG96 AT driver with DNS support
2019-08-02 13:27:09 +03:00
Seppo Takalo 4a1f00a081
Merge pull request #10877 from u-blox/ubx_context_activation
Cellular: Ublox cellular context activation updated for C030_R412M
2019-08-02 13:24:37 +03:00
Ari Parkkila ed3562e764 Cellular: Fix shutdown to stop statemachine 2019-08-02 02:26:12 -07:00
Ari Parkkila cbe2b50a32 Cellular: Fix SIM pin enter command 2019-08-01 03:46:33 -07:00
Mirela Chirica 341cc2be03 Cellular: Remove unnecessary local variables 2019-08-01 13:26:05 +03:00
Seppo Takalo 54d7d7e4c3
Merge pull request #10913 from RonEld/sha512_cc310_porting
Port CC 310 sha 512 driver
2019-08-01 13:13:11 +03:00
int_szyk ae6f8be146 Newline at the end of files 2019-08-01 08:44:58 +02:00
int_szyk a8d8bd6c18 Astyle 2019-07-31 12:27:41 +02:00
int_szyk 8b68a1ea58 Updated testcases 2019-07-31 10:46:38 +02:00
Ari Parkkila 71c7ed2fb4 Cellular: Add BG96 AT driver with DNS support 2019-07-31 00:19:05 -07:00
mudassar-ublox 6cd60178fa UBLOX cellular context activation updated for C030_R412M and updated AUTH configuration 2019-07-30 12:19:20 +05:00
Seppo Takalo 2c6280b9c7
Merge pull request #11066 from AriParkkila/cell-fix-restart
Cellular: Fix cellular statemachine stop and BG96 power up
2019-07-29 17:40:35 +03:00
Seppo Takalo e88101f3d6
Merge pull request #10947 from RonEld/cc310_cmac_porting
Port the cryptocell 310 cmac driver
2019-07-29 17:39:17 +03:00
Ari Parkkila 742bfd3709 Cellular: Fix statemachine stop 2019-07-26 00:34:45 -07:00
Seppo Takalo 6ce2439c0f
Merge pull request #11086 from Tharazi97/Greentea_compile_without_serial
Mbed-os compile without DEVICE_SERIAL
2019-07-25 12:45:37 +03:00
Ron Eldor a1c5fcd9f7 Add a deinit function
Add a deinit function that will be called and check inside
whether context is initialized. This function is called for
freeing the CC context, instead of every time check that it's
initizliaed and free it.
2019-07-24 15:23:46 +03:00
Seppo Takalo 8881da964c
Merge pull request #11090 from AriParkkila/cell-delete-context
Cellular: Fix to delete context just once
2019-07-24 11:15:50 +03:00
Ron Eldor 4e29c8f939 Make the cmac context a typedef
Make the cmac context a typedef, to be compatible with c code.
2019-07-23 16:05:33 +03:00
Ron Eldor f492ce8405 Handle CC context correct
Initiate the CC context in the starts function and in the reset.
In the reset function, free aes context before.
Free the context in the finish function and reset function.
2019-07-23 16:05:27 +03:00
Seppo Takalo 0b8ae1b098
Merge pull request #11084 from mtomczykmobica/IOTSTOR-832
NVStore.cpp (and KVStore) - run-time failure handling missing
2019-07-23 15:28:26 +03:00
Ron Eldor 4cf3e1c1bc Style fixes
Remove redundant extra lines.
2019-07-23 13:54:09 +03:00
Ari Parkkila ac78b5ab16 Cellular: Fix to delete context just once 2019-07-23 03:04:24 -07:00
Seppo Takalo 3a96f436ea
Merge pull request #10847 from davidsaada/david_ps_add_sec_flags
PSA storage: Conform to "PSA 1.0.0" spec release
2019-07-23 12:05:22 +03:00
int_szyk 4c13c469d9 Can compile without serial 2019-07-22 16:17:52 +02:00
Marcin Tomczyk 6cdb8f0f49 NVStore.cpp (and KVStore) - run-time failure handling missing 2019-07-22 15:04:20 +02:00
Seppo Takalo bec388ffb1
Merge pull request #11078 from bentcooke/52840_patch2
NRF52840: fix include path issues for ble pal cordio ll and gcc
2019-07-22 14:11:50 +03:00
Seppo Takalo 0e33dd7e62
Merge pull request #11080 from kyle-cypress/pr/cy8ckit-062s2-43012
Add target for CY8CKIT_062S2_43012
2019-07-22 14:09:33 +03:00
Kyle Kearney 40557cefeb Add target for CY8CKIT_062S2_43012 2019-07-19 15:44:27 -07:00
Ben Cooke 4273221919 NRF52840: fix include path issues for cordio ll and gcc 2019-07-19 12:09:31 -05:00
Seppo Takalo 77786926bc
Merge pull request #11039 from kjbracey-arm/mstd
Add <mstd_xxx> C++ headers
2019-07-19 13:00:41 +03:00
Seppo Takalo 8006d5f3c3
Merge pull request #11035 from Patater/update-to-mbedtls-2.18.1rc1
mbedtls: Update to Mbed TLS 2.18.1
2019-07-19 11:22:13 +03:00
Ari Parkkila 7a5e4ca5da Cellular: Fix BG96 power up 2019-07-18 23:13:36 -07:00
Kevin Bracey 0bb4c050b7 SingletonPtr: API extensions, make constexpr
* Adjust definition to make the default constructor `constexpr`.
  This permits use in classes that want lazy initialization and their
  own `constexpr` constructor, such as `mstd::mutex`.

* Add `get_no_init()` method to allow an explicit optimisation for
  paths that know they won be the first call (such as
  `mstd::mutex::unlock`).

* Add `destroy()` method to permit destruction of the contained object.
  (`SingletonPtr`'s destructor does not call its destructor - a cheat
  to omit destructors of static objects). Needed if using in a class
  that needs proper destruction.
2019-07-18 20:02:04 +03:00
Seppo Takalo 2f136b977f
Merge pull request #11058 from paul-szczepanek-arm/make-weak-fix
BLE: allow overriding event signal
2019-07-17 23:30:16 +03:00
Balaji 69782a4ca6 LwIP: make TCPIP_THREAD_PRIO configurable 2019-07-17 18:51:45 +03:00
paul-szczepanek-arm 67c7a06a86 fix macro usage 2019-07-16 16:59:02 +01:00
Amanda Butler 5ca5e74806
Edit Readme.md
Edit file, mostly for active voice, formatting and parallel construction.
2019-07-16 09:46:10 -05:00
paul-szczepanek-arm f13318df60 make event signal weak so it can be overridden 2019-07-16 13:49:20 +01:00
Kevin Bracey a522dcfa0a Replace deprecated wait calls 2019-07-15 10:13:50 +03:00
Kevin Bracey fc8e8f67c6 Deprecate wait/wait_ms APIs 2019-07-15 10:13:50 +03:00
David Saada fb3559d841 PSA storage: Conform to "PSA 1.0.0" spec release
- Add the no confidentiality & no replay protection flags
- Add actual size parameter in PS/ITS get APIs
- Change a few size parameters from uint32_t to size_t
2019-07-14 18:50:47 +03:00
Jaeden Amero 045cd67e6d mbedtls: Update to Mbed TLS 2.18.1
Update to Mbed TLS 2.18.1 and Mbed Crypto 1.1.1.
2019-07-12 16:07:43 +01:00
Kevin Bracey d53bd6120d
Merge pull request #10274 from kjbracey-arm/atomic_template
Add Atomic<T> template
2019-07-12 14:26:03 +03:00
Evelyne Donnaes 0f39f01595
Merge pull request #11027 from vmedcy/pr/cy-lwip
PSOC6: add LwIP configuration for Cypress boards
2019-07-12 11:22:11 +01:00
Volodymyr Medvid 579cd9a355 PSOC6: add LwIP configuration for Cypress boards 2019-07-11 15:47:38 +01:00
Kevin Bracey 607856ee9a Set unit tests to C++14
Adjust some non-C++11-compatible code that failed as a result.
2019-07-09 19:08:57 +03:00
Ron Eldor 2dcaecea3c Fix typo
suipport -> support
2019-07-09 11:42:37 +03:00
Ron Eldor a08b150546 Explaining how to opt in modules
Add a section in the CC Readme file explaining how to enable the optional module.
2019-07-08 18:43:39 +03:00
Ron Eldor 6b17df7685 Make the alternative sha512 optional
Have the alternative sha512 undefined by default,
in order not to break backwards compatability.
2019-07-08 18:32:18 +03:00
Ron Eldor a99ce834bd Make the alternative aes optional
Have the alternative aes undefined by default,
in order not to break backwards compatability.
`MBEDTLS_CTR_DRBG_USE_128_BIT_KEY` remains defined for better usability.
2019-07-08 18:29:52 +03:00
Ron Eldor 77d8b067bf Make the alternative cmac optional
Have the alternative cmac undefined by default,
in order not to break backwards compatability.
2019-07-08 18:27:54 +03:00
Ron Eldor a5aac1e4b6 Fix functionality issues
FIx some functionality issues for better visibility:
1. Allocate the context only for 128 bit key
2. Change oreder of freeing the resources.
2019-07-08 18:12:47 +03:00
Ron Eldor f5956ce90b Style fixes
Fix minor style fixes and typos:
1. Change file name to correct one.
2. Change copyright year.
3. Insert whitespaces before and after paranthesis.
4. Put `*` next to pointer name.
2019-07-08 18:10:48 +03:00
Volodymyr Medvid 85a5bc0bf9 PSOC6: apply astyle to WHD EMAC driver implementation 2019-07-08 15:58:46 +03:00
Volodymyr Medvid 5cc66282dd PSOC6: remove PSA targets 2019-07-08 14:49:26 +03:00
Volodymyr Medvid 1926ba8e18 TARGET_CYW43XXX: Added Bluetooth firmware 2019-07-08 14:49:26 +03:00
Volodymyr Medvid 572221446f PSOC6: add WHD EMAC driver 2019-07-08 14:49:26 +03:00
Arto Kinnunen faf7f79e03
Merge pull request #10971 from artokin/nanostack_libservice_update
Nanostack: sync libservice with changes in master copy
2019-07-08 11:42:57 +03:00
Martin Kojtal 4b7fd707f1
Merge pull request #10867 from teijokinnunen/lora_phy_freq_print_fix
LoRaPHY: Pass frequency set in rx_config() to caller
2019-07-05 11:22:18 +01:00
Martin Kojtal eadc799584
Merge pull request #10919 from jeromecoutant/PR_AT_MUTEX
AT Cellular Network: mutex lock issue
2019-07-05 09:03:07 +01:00
Arto Kinnunen 51d37d5da4 Merge commit '8730005927c6e12a78957c2eda92dc5a9698cdea' into nanostack_libservice_update
* commit '8730005927c6e12a78957c2eda92dc5a9698cdea':
  Squashed 'features/frameworks/nanostack-libservice/' changes from dd98c37..9af7568
2019-07-05 10:44:37 +03:00
Martin Kojtal 5bc30dff9f
Merge pull request #10948 from AGlass0fMilk/stop-flexing
BLE: Stop flexing on Tesla
2019-07-04 15:35:46 +01:00
Martin Kojtal d2e5941bc3
Merge pull request #10894 from dgreen-arm/update-mbedtls-makefile
Add adjust-check-config script to mbedtls importer
2019-07-04 15:01:12 +01:00
Martin Kojtal 7059221817
Merge pull request #10925 from AnttiKauppila/buff_size_fix
Doubled ATHandler's BUFF_SIZE
2019-07-03 11:48:02 +01:00
George Beckstein bb60251fdf Remove flexing on Tesla 💪💪💪 2019-07-02 13:05:18 -04:00
Ron Eldor 641c518c4e Port the cryptocell 310 cmac driver
Add support for CC310 CMAC driver returning
`MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED` for key size other than 128 bits,
and for crypto algorithms other than AES( e.g. DES).
2019-07-02 18:50:28 +03:00
Martin Kojtal 149d53cc89
Merge pull request #10619 from jamesbeyond/fm-iap
Fastmodel: enable flashIAP and kvstore
2019-07-02 14:23:00 +01:00
Antti Kauppila c315672413 Doubled ATHandler's BUFF_SIZE 2019-07-02 10:17:06 +03:00
Philipp Steiner 3b904d580b Solve bug: Low frequency clock will now selected by given "lf_clock_src" setting. 2019-07-01 15:38:22 +02:00
Ron Eldor 50d75394d3 Code improvements
1. Make common function for setting key, which receives
the direction as parameter.
2. Remove rediundant extra lines.
2019-07-01 13:37:26 +03:00
Martin Kojtal d2c73f2bcd
Merge pull request #10842 from ghseb/cellular-stack-type-fixes
Cellular: Stack type fixes
2019-07-01 09:23:21 +01:00
Martin Kojtal 755c6b8c2f
Merge pull request #10861 from pauluap/lwip_use_recursive_mutex
Make the sys_arch_protect() mutex be recursive.
2019-07-01 09:19:29 +01:00
Martin Kojtal 6be510daa4
Merge pull request #10900 from TeroJaasko/armcc5_compilation_fixes
Armcc5 compilation fixes
2019-07-01 09:16:56 +01:00
Martin Kojtal 76f085bf2f
Merge pull request #10908 from kivaisan/fix_armc6_netconn_recv_tcp_pbuf
Fix netconn_recv_tcp_pbuf ARMC6 linker error
2019-07-01 09:16:36 +01:00
Martin Kojtal 193ba0fdea
Merge pull request #10910 from kivaisan/increase_dns_response_wait_time
Increase dns-response-wait-time
2019-07-01 09:16:10 +01:00
Martin Kojtal 60d047cae3
Merge pull request #10840 from u-blox/socket_flag_update
Cellular: cellular socket flags updated
2019-07-01 09:04:16 +01:00
jeromecoutant 758a4bb56a AT Cellular Network: mutex lock issue 2019-06-28 16:08:52 +02:00
Ron Eldor a060c7b0cb Port CC 310 sha512 driver
Port the cc310 SHA512 driver, even though it is sw implementation.
Because the linker could not remove the cc310 sha512 implementation,
there was duplicate implementation of SHA512, without enabling
the sha512 alternative implementation.
2019-06-27 18:23:26 +03:00
Kimmo Vaisanen df1d36ebb2 Increase dns-response-wait-time
In some cellular networks or with some modems, DNS response can take longer than 5 seconds to arrive.
2019-06-27 15:27:01 +03:00
Ron Eldor a58457d8a5 Port aes cc310 driver
Add support for CC310 AES driver,
returning `MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED` for key size
other than 128 bits, and for AES modes not supported by the driver.
Use `MBEDTLS_CTR_DRBG_USE_128_BIT_KEY`.
2019-06-27 14:24:53 +03:00
Kimmo Vaisanen ff88a751f7 Fix netconn_recv_tcp_pbuf ARMC6 linker error
If "lwip.tcp-enabled" is set to false, ARMC6 compilation fails to error
Error: L6218E: Undefined symbol netconn_recv_tcp_pbuf

LWIP::socket_recv() is TCP socket specific method so implementation can be
enabled only when LWIP_TCP flag is set.
2019-06-27 14:18:07 +03:00
Tero Jääskö bae3043e92 cellular: AT: fix build on ARMCC5
ARMC5 failed to compile the code with debug-profile (!!) as va_list
is getting into std:: namespace when one includes <cstdarg>. Other
compilers seem to be more relaxed, and so is ARMC5 if compiled
with other profiles.

Add the explicit std:: to references of va_list.

While here, remove one extra copy of "#include "PlatformMutex.h""
and a "#include <stdarg.h>" which is kind of duplicate of
"#include <cstdarg>".

Error being fixed:
--8<--8<--8<--
Compile [ 81.8%]: ATHandler.cpp
[Error] ATHandler.h@552,0:  #20: identifier "va_list" is undefined
[Error] ATHandler.cpp@1226,0:  #147: declaration is incompatible with "void mbed::ATHandler::handle_args(const char *, <error-type>)"  (declared at line 552 of "./mbed-os/features/cellular/framework/AT/ATHandler.h")
[ERROR] "./mbed-os/features/cellular/framework/AT/ATHandler.h", line 552: Error:  #20: identifier "va_list" is undefined
"./mbed-os/features/cellular/framework/AT/ATHandler.cpp", line 1226: Error:  #147: declaration is incompatible with "void mbed::ATHandler::handle_args(const char *, <error-type>)"  (declared at line 552 of "./mbed-os/features/cellular/framework/AT/ATHandler.h")
./mbed-os/features/cellular/framework/AT/ATHandler.cpp: 0 warnings, 2 errors
2019-06-26 19:58:34 +03:00
Tero Jääskö 14bb4399b3 nanostack: silence compiler warnings for implicit virtual call_in
ARMCC reminds of the missing virtual declaration of call_in in the
Nanostack.h.

Warnings silenced:
---8<---8<---
Compile [ 52.3%]: LoWPANNDInterface.cpp
[Warning] Nanostack.h@278,0:  #1300-D: call_in inherits implicit virtual
Compile [ 52.4%]: NanostackEMACInterface.cpp
[Warning] Nanostack.h@278,0:  #1300-D: call_in inherits implicit virtual
Compile [ 52.5%]: MeshInterfaceNanostack.cpp
[Warning] Nanostack.h@278,0:  #1300-D: call_in inherits implicit virtual
Compile [ 52.6%]: NanostackEthernetInterface.cpp
[Warning] Nanostack.h@278,0:  #1300-D: call_in inherits implicit virtual
Compile [ 52.7%]: ThreadInterface.cpp
[Warning] Nanostack.h@278,0:  #1300-D: call_in inherits implicit virtual
ompile [ 53.0%]: WisunInterface.cpp
[Warning] Nanostack.h@278,0:  #1300-D: call_in inherits implicit virtual
2019-06-26 16:55:10 +03:00
Darryl Green 8f6667d3d2 Add adjust-check-config script to mbedtls importer
In Mbed OS, there are configuration options with Mbed TLS that we
are more comfortable allowing than we do with Mbed TLS on its own.
Add a check-config adjusting script to enable removing or changing
options in check_config.h
2019-06-26 13:26:18 +01:00
Martin Kojtal 68c3dc6161
Merge pull request #10864 from anttiylitokola/tlssocket-cert-debug-info
TLSSocket: print certificate info only when tracing is enabled
2019-06-26 09:09:15 +01:00
Martin Kojtal e9e9bf3f8d
Merge pull request #10879 from Patater/mbed-crypto-everywhere
PSA Crypto for all targets
2019-06-25 15:21:38 +01:00
Martin Kojtal 4b438ac1de
Merge pull request #10834 from tymoteuszblochmobica/udp
Fixed UDP sendto if IP version not match
2019-06-25 11:03:03 +01:00
Martin Kojtal 63d1ea36f1
Merge pull request #10821 from kivaisan/refactor_apn_db
Cellular: Refactor APN db implementation to reduce memory usage
2019-06-25 11:02:24 +01:00
Martin Kojtal 34eefb49fa
Merge pull request #10858 from LMESTM/fix_cellular_properties
Check Cellular Properties have been set
2019-06-25 10:58:23 +01:00
Sebastian Stockhammer 142a223cf9 Fix astyle 2019-06-25 07:51:27 +02:00
Martin Kojtal c9bdcd6b16 cellular: fix file permission 2019-06-24 22:23:10 +01:00
Martin Kojtal 979f26f74d
Merge pull request #10875 from mirelachirica/revert_ipv6_bg96
Cellular: Remove IPV6 and IPV4V6 as supported properties for BG96
2019-06-24 14:55:50 +01:00
Martin Kojtal 66b7165f38
Merge pull request #10845 from jeromecoutant/PR_TIMEOUT
Wrong timeout value in greentea tests
2019-06-24 12:18:34 +01:00
Martin Kojtal 13081a21ab
Merge pull request #10808 from mirelachirica/bg96_pdpdeact
Cellular: Added handling for BG96 network PDP context deactivation
2019-06-24 11:23:40 +01:00
Anna Bridge 15b5b5da23
Merge pull request #10694 from jarvte/set_authentication_type
Cellular: add method to set authentication type to CellularContext
2019-06-21 12:19:04 +01:00
mudassar-ublox 26f1d0b659 cellular socket flags updated 2019-06-21 10:05:35 +05:00
Jaeden Amero 24b1768f53 crypto: Enable use on non-PSA targets
Move PSA Crypto implementation files outside of a TARGET_PSA folder,
enabling use of PSA Crypto APIs on more Mbed OS targets.
2019-06-20 16:11:22 +01:00
Mirela Chirica ce6415bfce Cellular: Remove IPV6 and IPV4V6 as supported properties for BG96
IPV6 and IPV6V4 support is also network dependent not only modem.

Having these properties enabled for a modem requires a fallback
mechanism during PDP context activation. This mechanism is missing
at the moment and that can result in imposibility to establish
succesfull connection when network only supports IPV4 contexts.
2019-06-20 14:48:07 +03:00
Laurent Meunier 3286472de9 Check Properties have been set 2019-06-20 09:23:48 +02:00
Paul Thompson 91402f4d77 Make the sys_arch_protect() mutex be recursive.
Fixes #9744

Appears to be a lwIP porting bug. Comments in our porting layer say:

    This function should support recursive calls from the same task or interrupt. In other words, sys_arch_protect() could be called while already protected.
2019-06-19 21:49:33 -07:00
Anna Bridge 363ad8ab14
Merge pull request #10825 from kivaisan/fix_plmn_debug_trace
Cellular: Fix PLMN debug trace for IAR
2019-06-19 15:04:24 +01:00
Anna Bridge 37640301e0
Merge pull request #10812 from jarvte/fix_multiple_urc_athander
Cellular: fix athandler to use correct timeout in case of multiple urc's
2019-06-19 15:03:36 +01:00
Anna Bridge b8f413a4a2
Merge pull request #10811 from u-blox/ubx_socket_close_callback
socket close callback
2019-06-19 15:02:17 +01:00
Anna Bridge 5b0f45f685
Merge pull request #10807 from kjbracey-arm/lwip_tcp_pbuf
NSAPI/lwIP: Use netconn_recv_tcp_pbuf
2019-06-19 14:57:18 +01:00
Tymoteusz Bloch b272c5f149 Fixed LWIPStack socket_sendto member to fail if interface IP4/6 version differ from destination adress IP version 2019-06-19 14:03:48 +02:00
Teijo Kinnunen feb19eb035 LoRaPHY: Pass frequency set in rx_config() to caller
In AU/CN/US PHY, RX1 slot frequency is calculated in rx_config().
Since the caller is printing it to log, modify the frequency in
parameter structure so that the correct value will be printed.
2019-06-19 14:24:21 +03:00
Anna Bridge 2fd7f80f35
Merge pull request #10484 from trowbridgec/telit-me910-driver
Cellular: Telit ME910 driver
2019-06-19 12:07:25 +01:00
Anna Bridge 6000724de6
Merge pull request #10703 from AnttiKauppila/optimisation
Cellular: Removed boilerplate code
2019-06-19 12:06:10 +01:00
Antti Yli-Tokola b5661ff16c TLSSocket: print certificate info only when tracing is enabled
Flagging these functions out will reduce flash size more than 3k.
2019-06-19 10:05:10 +03:00
Anna Bridge 46be52636c
Merge pull request #10659 from LDong-Arm/replace_ArrayView
Replace uses of ArrayView with mbed::Span
2019-06-18 16:26:46 +01:00
jeromecoutant bfd8bfdbc9 Wrong timeout value in greentea tests 2019-06-17 13:07:20 +02:00
Sebastian Stockhammer 7dc4c99b23 Allow IPV4V6 stack type 2019-06-17 10:06:27 +02:00
Sebastian Stockhammer 402c471e70 Require exact context type match 2019-06-17 10:03:06 +02:00
Chris Trowbridge 28f7a4e6a6 Moved DEFAULT_DELAY_BETWEEN_AT_COMMANDS constant to cpp file 2019-06-14 08:02:33 -04:00
Kimmo Vaisanen d7858f6184 Cellular: Refactor APN db implementation to reduce memory usage
Reduce memory usage by moving actual APN database into single object file
instead of having it defined in header as a static.
2019-06-14 13:31:54 +03:00
Kimmo Vaisanen b26314a799 Cellular: Fix PLMN debug trace for IAR
IAR does not allow printing from null pointer as parameter for %s. PLMN string
can be null depending on user configuration.
2019-06-13 15:35:37 +03:00
Antti Kauppila 1ed338ef28 Valgrind & unittest fixes 2019-06-13 15:15:53 +03:00
mudassar-ublox 3ad1ee1fe4 Style issue fixed 2019-06-13 16:58:50 +05:00
Anna Bridge 3e6f5eba6c
Merge pull request #10764 from mirelachirica/bg96_sockid_fix_ipv6_support
BG96 ipv6 support and socket id fix for BG96 and M26
2019-06-12 17:04:46 +01:00
Anna Bridge 4ad71c4d65
Merge pull request #10802 from Patater/update-to-mbedtls-2.18.0rc4
Update to mbedtls 2.18.0rc3
2019-06-12 16:09:02 +01:00
Anna Bridge cda2031d1b
Merge pull request #10809 from kjbracey-arm/ns_list_stdint
ns_list: avoid UINT_FAST8_MAX (fix ARM C 5 builds)
2019-06-12 14:49:47 +01:00
Chris Trowbridge ea5d8cf26d Remove unnecessary init AT commands 2019-06-12 09:36:22 -04:00
Teppo Järvelin 6b11ca1371 Cellular: fix athandler to use correct timeout in case of multiple urc's
Start time was not updated when multiple urc's were found and so timeout
was set to zero. Now that start time is updated, timeout is correct.
2019-06-12 11:21:00 +03:00