Commit Graph

6164 Commits (097f3b49695f818d53c7b87f0be3f7dabe535f68)

Author SHA1 Message Date
Martin Kojtal c93c181b6a
Merge pull request #11687 from Patater/update-to-mbedtls-2.20.0d0
Update to Mbed TLS 2.20.0d0 and Mbed Crypto 2.1.0d0
2019-10-31 17:12:31 +01:00
Veijo Pesonen b01fe020cd Deprecates NVStore 2019-10-31 14:54:54 +02:00
jeromecoutant d7d0d0b8cb STM32H7 FLASH and DEVICE_KEY
- Enable FLASHIAP for all H7 boards
- Use "TDB_INTERNAL" for all H7 boards
- Define specific internal_base_address only for DISCO_H747I_CM7
  (default address is the end of FLASH which is correct for other H7 boards)
- Correct GetSectorBase function with Dual Bank information
2019-10-31 13:04:49 +01:00
Martin Kojtal da6b336391
Merge pull request #10978 from vmedcy/lwip-rawsocket
LwIP: add ICMPv4 Socket support
2019-10-31 11:50:21 +01:00
Janne Kiiskila 3ab36cb934 Add default TDBStore location for DISCO_H747I (end of BANK1)
Place it at the end of the bank1, last two erase sectors.
As erase sector is 128 kB, default size must be double of that.

This can't be in bank2 as that is apparently dedicated to the M4 core.

Memory map is available in;

https://github.com/ARMmbed/mbed-os/blob/master/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/flash_data.h

Memory map does not have this information, but issue [11617](https://github.com/ARMmbed/mbed-os/issues/11617) has.
2019-10-30 15:25:13 +02:00
Janne Kiiskila 655274a16e DISCO_H747I - define default storage (TDB_INTERNAL)
DeviceKey needs the definition of the default storage place,
define it to be TDB_INTERNAL (as for the other boards).
2019-10-30 15:25:13 +02:00
Martin Kojtal 419556b84a
Merge pull request #11735 from michalpasztamobica/dns_unittest_preparation
Dns unittest preparation
2019-10-30 11:04:19 +01:00
Martin Kojtal f1392d6b6b
Merge pull request #11695 from jeromecoutant/PR_GREENTEA_TRACE
GREENTEA: init trace if trace is enabled in json
2019-10-29 15:13:31 +01:00
Martin Kojtal 3c9853af61
Merge pull request #11754 from mirelachirica/athandler_write_hex_string
Cellular: Added write_hex_string to AT handler
2019-10-29 10:00:46 +01:00
Martin Kojtal bc2162ab19
Merge pull request #11718 from desmond-blue/fix-ex-sm-fail-nrf52840
Handle legacy process event first on connection complete
2019-10-28 09:54:44 +01:00
Mirela Chirica beeccbe52c Cellular: Added write_hex_string to AT handler 2019-10-28 10:34:05 +02:00
Martin Kojtal 98072b24c8
Merge pull request #11748 from cydriftcloud/pr-dev/fix-spurious-link-down-up
Fix spurious link up/down when AP IP address range change
2019-10-28 09:28:54 +01:00
Balaji 5b9291628e rebase mbed_lib.json to upstream/master 2019-10-25 12:39:27 -07:00
Balaji 948e989d27 fix mbed_lib.json add , 2019-10-25 12:14:31 -07:00
Balaji d9045b4840 index on lwip-rawsocket: 6905b1b547 Incorporate review comments from @kjbracey-arm 2019-10-25 11:00:55 -07:00
Balaji 6905b1b547 Incorporate review comments from @kjbracey-arm 2019-10-25 10:51:50 -07:00
Balaji 5168bbdcd0 Add InternetDatagram Base Class 2019-10-25 10:48:13 -07:00
Balaji ab883350a0 Incorporate review comments from @kjbracey-arm 2019-10-25 10:48:12 -07:00
Balaji 90e188b23a fix a style convention 2019-10-25 10:48:12 -07:00
Balaji b91836a94d fix astyle convention 2019-10-25 10:48:12 -07:00
Balaji 1a7288d220 fix astyle convention 2019-10-25 10:48:12 -07:00
Balaji d92a946b78 fix astyle convention 2019-10-25 10:48:12 -07:00
Balaji 0b5dea5f99 Changes to the PR 10978 (LWIP: Add RAWIPSocket support) 2019-10-25 10:48:12 -07:00
Martin Kojtal e1c3de649d
Merge pull request #11747 from miteshdedhia7/pr/fix-kvstore-statictests
Update the internal kvstore flash reservation size to from 7k to 65K for Cypress Devices
2019-10-25 14:42:10 +02:00
Martin Kojtal a44fd827c2
Merge pull request #11578 from cydriftcloud/pr-dev/ap-sta-op-sync
Add synchronization and switching between WhdSoftAPInterface and WhdSTAInterfaces
2019-10-25 13:36:10 +02:00
Lei Zhang d411d72196 MIDDLEWARE-2134: Fix spurious link up/down when AP IP address range changes
Fixed additional link down/up events in whd_wifi_link_state_change_handler by checking additional condition during the transition.
2019-10-24 18:43:07 -07:00
Martin Kojtal ab931ee27c
Merge pull request #11662 from cydriftcloud/pr-dev/sta-extended-scan
Allow WhdAccessPoint scan results with extended parameters
2019-10-24 10:26:07 +02:00
Martin Kojtal acf576a9ab
Merge pull request #11725 from OpenNuvoton/nuvoton_devicekey_entropy_alt
DeviceKey: Fix random key doesn't generate with custom entropy source
2019-10-24 09:22:37 +02:00
Lei Zhang 28884b589c Add synchronization and switching between SoftAP/STA
- A shared mutex is added for synchronization
- ScopedMutexLock is used to to protect
  - SoftAP: start, stop
  - STA: scan, join, disconnect
- Fix switching issue between SoftAP and STA mode for primary interface
  - Avoid reinit primary interface by getting mapping the current interface to the other one which is already on
  - In concurrent mode, STA is the default if it is up, otherwise SoftAP is default.
  - For non-concurrent mode, the most recent started interface is set as default.
2019-10-23 18:31:20 -07:00
Lei Zhang 7b16166d51 Allow WhdAccessPoint scan result with extended parameters
- Add WhdAccessPoint to include additional WHD scan info
- To save memory, only move assignment is supported for WhdAccessPoint
- Add scan_whd to scan for WhdAccessPoint
- Set set_blocking(false) to unsupported by return NSAPI_ERROR_UNSUPPORTED
2019-10-23 14:43:07 -07:00
midd 6fbc610448 Update the internal kvstore size to from 7k to 65K for device that use the internal flash for kvstore 2019-10-23 12:26:07 -07:00
Martin Kojtal bb48dd35c6
Merge pull request #11624 from geky/littlefs-v1.7.2
LittleFS: Update to v1.7.2
2019-10-23 14:55:10 +02:00
Martin Kojtal e7d95f5f2a
Merge pull request #11536 from jeromecoutant/PR_STM32_EMAC
STM32 EMAC configuration update
2019-10-23 13:10:10 +02:00
Michal Paszta 45976419b8 DNS: unified parameter type of nsapi_dns_query_async_cancel 2019-10-23 11:58:15 +03:00
Michal Paszta 83af4e0b36 DNS: Cast void* to intptr_t in nsapi_dns.cpp
This is for portability reasons. If this code was compiled to a 64-bit architecture, then the cast from void* to int would lose precision.
2019-10-23 11:58:00 +03:00
Martin Kojtal c018b2bd46
Merge pull request #11677 from MukundGitHub/bt_firmware_update
Update BT Firmware to version 128.
2019-10-23 09:38:22 +02:00
Chun-Chieh Li 1bb351f410 DeviceKey: Fix random key doesn't generate on MBEDTLS_ENTROPY_HARDWARE_ALT
Originally, when DEVICE_TRNG is defined, MBEDTLS_ENTROPY_HARDWARE_ALT will also be defined
accordingly to provide entropy source. This is fine for targets supporting TRNG. However, for
targets without TRNG, it is also possible to provide non-TRNG entropy source solution via the
define MBEDTLS_ENTROPY_HARDWARE_ALT. Related discussion can be found at:

https://github.com/ARMmbed/mbed-os/issues/11680
2019-10-22 17:06:12 +08:00
Martin Kojtal 02c722af42
Merge pull request #11620 from jainvikas8/ISSUE-11256
Fix enum type to align with psa-arch-tests
2019-10-22 09:42:13 +02:00
mudassar-ublox fa6c69c824 updated cellular context flags and cid in ublox-api 2019-10-22 11:17:46 +05:00
Mukund Ghonasgi 84f7e6a2f0 Update BT Firmware to version 128.
Fixes issues in BT firmware operation in low power mode.
2019-10-21 17:11:07 -07:00
Wajahat Abbas c5f164d75f Ensure modem echo is off 2019-10-21 15:02:08 +05:00
Martin Kojtal 95343276a5
Merge pull request #11717 from iliapenev/master
Fix Quectel M26 context hang
2019-10-21 11:54:50 +02:00
desmond.chen d9e6110577 Handle legacy process event first on connection complete 2019-10-21 15:57:09 +08:00
Martin Kojtal bfb435a899
Merge pull request #11657 from u-blox/ubx_apn_setting
Cellular: Fix apn check
2019-10-21 09:36:27 +02:00
Martin Kojtal f6c28e54b6
Merge pull request #11586 from AnttiKauppila/lwip_improvements
Cleaned up Mbed LWIP configurations
2019-10-21 09:35:52 +02:00
Ilia Penev ad1387b2fd Fix Quectel M26 context hang 2019-10-21 00:48:22 +03:00
Martin Kojtal 9e87200809
Merge pull request #11556 from mikter/master
modified Wi-SUN tasklet to return success when calling connect twice
2019-10-18 16:07:25 +02:00
Martin Kojtal 4af05bb370
Merge pull request #11648 from rohfle/target-olimex-stm32e407
OLIMEX_STM32E407_F407ZG: Added new target platform
2019-10-18 16:05:05 +02:00
Martin Kojtal 0efea30377
Merge pull request #11644 from MukundGitHub/cypress_cordio_driver_host_wake_logic_changes
Cypress Cordio BT Driver setting Host MCU active during Host Wake assert
2019-10-17 14:26:11 +02:00
Mukund Ghonasgi 352ac5ed47 Address ARM Code review feedback. 2019-10-16 10:27:55 -07:00
jeromecoutant 0d678e9299 GREENTEA: init trace if trace is enabled in json 2019-10-16 11:47:07 +02:00
Martin Kojtal 16568da47f
Merge pull request #11605 from ABOSTM/DISCO_H747I_DUALCORE_SUPPORT
DISCO_H747I dualcore support
2019-10-16 17:35:25 +08:00
Martin Kojtal 19606710e6
Merge pull request #11630 from kivaisan/move_is_connected_as_protected
Cellular: Change visibility of _is_connected as protected
2019-10-16 15:58:50 +08:00
Martin Kojtal fcd40ab1a5
Merge pull request #11628 from kyle-cypress/pr/directaccess-devicekey-test
Make devicekey remainder test more meaningful
2019-10-15 21:41:05 +08:00
Jaeden Amero 0573ba5fb6 Update Mbed Crypto to version 2.1.0d0 2019-10-15 14:23:26 +01:00
Jaeden Amero f2d42bfa31 Update Mbed TLS to version 2.20.0d0 2019-10-15 14:14:01 +01:00
Mika Leppänen 3c39dbd737 Corrected nanostack PAE controller 2019-10-15 09:53:36 +03:00
Martin Kojtal 7522f9c348
Merge pull request #11667 from sathishm6/pr/ipv6-multi-cast-join-fix
Fixes IPv6 multicast join issue
2019-10-15 13:15:43 +08:00
Martin Kojtal 57c4a08e48
Merge pull request #11539 from mikaleppanen/cert_key_len_supp
Enable DER coded certificate support to Wi-SUN mesh API
2019-10-15 13:05:23 +08:00
Martin Kojtal f05f03faed
Merge pull request #11512 from RonEld/fix_cc_ecdh_alt_for_mont_curve
Fix Failure in Cryptocell tests on Montgomrery curve
2019-10-15 13:03:26 +08:00
Alexandre Bourdiol adcf0e2fa5 DISCO_H747I Dualcore support
Add 2 targets for DISCO_H747I dualcore:
* DISCO_H747I      -> for CM7 core
* DISCO_H747I_CM4  -> for CM4 core

Current restrictions:
* TICKLESS deactivated
* DeepSleep not supported (DeepSleep wrapped to sleep)

Warning: use of the same IP (example I2C1) by both core at the same time is not prevented,
but is strongly not recommended.
Some Hardware Semaphore are use for common IP, to manage concurrent access by both cores: Flash, GPIO, RCC.

Warning: Drag and drop of binary to DISCO_H747I will flash CM7.
         In order to flash CM4, one can use STM32 CubeProgrammer tool.
2019-10-14 18:02:57 +02:00
Sathish Kumar Mani 5b791a4345 Fixes IPv6 multicast join issue
Problem Statement:
During multicast join sequence, InternetSocket::join_multicast_group() calls InternetSocket::modify_multicast_group(). modify_multicast_group() sets up the multicast group address (i.e., mreq.imr_multiaddr) to be joined and the interface address (i.e., mreq.imr_interface) to be used for the multicast join request. The interface address is initialized with the default value, which sets the version of interface address to NSAPI_UNSPEC. This results in LWIP::setsockopt() API to attempt IPv6 multicast join on the IPv4 interface address, hence IPv6 multicast join always fails with the protocol error.

Fix:
Initialize interface address version based on the multicast address version in LWIP::setsockopt(), before attempting multicast join operation.
2019-10-14 17:41:27 +05:30
Michal Paszta 3d596468b4 Fix memory leak on NetworkInterface destruction
We dynamically allocate memory in every add_event_listener(), but we do not free it on NetworkInterface destruction.
2019-10-14 10:58:18 +03:00
Martin Kojtal 0e7d8927f1
Merge pull request #11615 from kivaisan/remove_deprecated_cellular_tests
Cellular: Remove old deprecated tests
2019-10-14 09:28:01 +02:00
Anna Bridge 489c30f569
Merge pull request #11297 from kyle-cypress/pr/qspi-dummy-cycles
Differentiate alt and dummy cycles in QSPIF
2019-10-11 14:34:17 +01:00
Antti Kauppila 691fc5525d Fix build issue 2019-10-11 15:25:50 +03:00
Anna Bridge 64df07288c
Merge pull request #11551 from Tharazi97/Coverity
Coverity updates
2019-10-11 11:01:10 +01:00
Anna Bridge 917d982913
Merge pull request #11639 from JarkkoPaso/nanostack_release_for_mbedos_5_14_1
Nanostack patch release for mbedos 5.14.1
2019-10-11 10:59:16 +01:00
Anna Bridge 22951d7378
Merge pull request #11616 from u-blox/ubx_cellular_api
Cellular: Setting timeout before send command in gethostbyname.
2019-10-11 10:45:41 +01:00
Anna Bridge 319fd671b1
Merge pull request #11618 from AriParkkila/cell-stm-pwr
Cellular: Fix CellularStateMachine to not loop between init/power states
2019-10-11 10:44:36 +01:00
Rohan Fletcher 02df759c37 OLIMEX_STM32E407_F407ZG: Added new target platform
Added Olimex STM32-E407 (STM32F407ZG) evaluation board.
USB, UART, External HS XTAL and Ethernet are all working correctly.
2019-10-10 09:20:28 +13:00
mudassar-ublox c8ade9032b fix apn check 2019-10-09 12:31:53 +05:00
Tymoteusz Bloch b8a18e29bd NSAPI DNS query IP version check for non LWIP stacks. 2019-10-08 17:50:51 +02:00
Mukund Ghonasgi f50417a3a0 Update Target Cypress Specific Cordio BT Driver to keep Host MCU active for the duration BT device asserts HOST WAKE. This change fixes race condition in Cypress Cordio driver. 2019-10-07 14:42:53 -07:00
Anna Bridge ad891d9658
Merge pull request #11548 from AriParkkila/cell-dns-ip
Cellular: Fix resolving of DNS server IPv4/6 address
2019-10-07 16:46:47 +01:00
Anna Bridge 5108f9188d
Merge pull request #11558 from Tharazi97/Coverity_fixes
Coverity fixes
2019-10-07 14:52:11 +01:00
jeromecoutant af8ab49a74 Avoid compilation if target doesn't support EMAC 2019-10-07 14:01:48 +02:00
Jarkko Paso 4cab344c59 Merge commit 'ffb05c770964013a9f1ee9fb89d25e9fd09e886d'
* commit 'ffb05c770964013a9f1ee9fb89d25e9fd09e886d':
  Squashed 'features/nanostack/coap-service/' changes from e9edb1b..b919a33
2019-10-07 13:08:20 +03:00
Jarkko Paso c15478021b Merge commit '3e6cb31659a56d343c7b8fe37645f195eb87ffcf'
* commit '3e6cb31659a56d343c7b8fe37645f195eb87ffcf':
  Squashed 'features/nanostack/sal-stack-nanostack/' changes from c473148..0824752
2019-10-07 13:00:49 +03:00
jeromecoutant 587393bb45 STM32 EMAC: move from TARGET_STM_EMAC to TARGET_STM 2019-10-07 10:57:31 +02:00
Kimmo Vaisanen 1279c20ce6 Cellular: Change visibility of _is_connected as protected
AT_CellularContext::do_connect() is a virtual API and therefore can be overwritten in
inherited class. The problem was that it sets AT_CellularContext::_is_connected flag but
earlier it was set as private member making it impossible to set in overwritten do_connect()
method.

This commit fixes the problem by changing _is_connected as protected enabling its use
in inherited class.
2019-10-04 10:29:56 +03:00
Kyle Kearney 1cb6f7b31c Make devicekey remainder test more meaningful
As of 722628be02, the "remainder" configuration
also uses the default location near the end of flash. Which makes the two tests
nearly identical with the exception that the "last two sectors" test correctly
handles parts with a low (possibly 1:1) erase size to program size ratio.
Therefore, change the "remainder" test to instead be a "default" test that uses
the tdb_internal_address/size values, so that it
a.) tests something meaningfully different and
b.) tests using the custom TDB address/size values if they are provided.
c.) functions correctly on devices where the default sector-based size computation
    does not work (e.g. because of the low erase size to program size ratio)
    and therefore a custom location and size has been specified.
The is_conf_tdb_internal variable is unused and therefore removed.
2019-10-03 16:04:30 -07:00
Christopher Haster de8df75ec0 Merge commit '70cb12e72bef7a1f220b0e5f21457b6930d984b2' into littlefs-v1.7.2 2019-10-03 09:56:09 -05:00
Anna Bridge eeb033f814
Merge pull request #11357 from kivaisan/offloaded_tlssocket_bg96
Offloaded TLSSocket and BG96 support for it
2019-10-03 11:54:32 +01:00
Ari Parkkila 73145fd551 Cellular: Fix CellularStateMachine to not loop on power state 2019-10-03 01:12:14 -07:00
Kimmo Vaisanen b6ebfeea2c Cellular: Remove old deprecated tests
Cellular tests have been replaced with generic mbed-os netsocket and network interface tests.
2019-10-03 10:24:12 +03:00
mudassar-ublox b2d0448351 setting timeout before send command 2019-10-03 12:22:17 +05:00
Vikas Katariya c1486eaf41 Fix enum type to align with psa-arch-tests
This is related to https://github.com/ARMmbed/mbed-os/issues/11256
When TARGET_PSA is enabled on Cortex-A boards, the SECURE
is redeclared. So to minimize the impact we can redeclare this in
val.h which is used only by Mbed. And `security_t` itself is used in
mbed-os\components\TARGET_PSA\TESTS, but the SECURE string is not used.

Renamed to `caller_security_t` which aligns with
https://github.com/ARM-software/psa-arch-tests
2019-10-02 16:37:58 +01:00
Martin Kojtal 31114ba343
Merge pull request #11598 from JanneKiiskila/AT_Cell_err_warn
AT_CellularDevice.cpp - unused variable err warning
2019-10-01 13:35:03 +02:00
Martin Kojtal 828fd2378a
Merge pull request #11581 from AriParkkila/cell-pdp-cid
Cellular: Fix setting of PDP context ID (cid)
2019-10-01 13:32:47 +02:00
Martin Kojtal f5b5989fc8
Merge pull request #11595 from SeppoTakalo/IOTSTOR-944
Check return of BlockDevice::init() in TDBStore.
2019-10-01 11:33:39 +02:00
Matthew Macovsky baf375f8cb Allow for arbitrary QSPI alt sizes
The QSPI spec allows alt to be any size that is a multiple of the
number of data lines. For example, Micron's N25Q128A uses only a
single alt cycle for all read modes (1, 2, or 4 bits depending on
how many data lines are in use).
2019-09-30 14:45:08 -07:00
Janne Kiiskila 55f6518853 AT_CellularDevice.cpp - unused variable err warning
We get this compiler warning;

Compile [  7.9%]: AT_CellularDevice.cpp
[Warning] AT_CellularDevice.cpp@206,18: variable 'err' set but not used [-Wunused-but-set-variable]

Due to the fact, that the code that would actually use this variable
is behind trace flags. Based on review feedback from Antti Kauppila and
Kimmo Väisänen, adding same flagging also for that.
- Reason being - the operation needs to be within the locks.
2019-09-30 17:11:23 +03:00
Martin Kojtal c385e141e2
Merge pull request #11535 from AnttiKauppila/DNS_cleanup
DNS manual cleanup mechanism added
2019-09-30 15:55:49 +02:00
Martin Kojtal dc64165f34
Merge pull request #11597 from mirelachirica/errno_include_macosx
Missing errno.h include
2019-09-30 15:54:16 +02:00
Martin Kojtal f30f7633e0
Merge pull request #11596 from kivaisan/fix_loramac_initialization_order
LoRa: Fix build warning about _ongoing_tx_msg
2019-09-30 15:38:17 +02:00
Martin Kojtal d9a141e50a
Merge pull request #11518 from MukundGitHub/origin
Cypress Cordio Driver Update
2019-09-30 15:27:26 +02:00
Mika Tervonen 86e3a5a021 Modified Wi-SUN tasklet to return correct status when calling connect twice
When calling mesh connect method twice NSAPI_ERROR_IS_CONNECTED is returned
instead of NSAPI_ERROR_DEVICE_ERROR Following the mesh API documentation.
2019-09-30 14:15:14 +03:00
Mirela Chirica 0860f3e0f6 Cellular: Removed not used variable 2019-09-30 14:14:37 +03:00
Mirela Chirica 865a504542 Cellular: Include of errno.h needed for Mac OS X 2019-09-30 14:14:37 +03:00
Seppo Takalo 513891d4f6 Check return of BlockDevice::init() in TDBStore.
Return value was ignored, and TDBStore:init() ended up in a
MBED_ERROR() phase after that.

TDBStore API was limited to allow returning of only two separate
errors, which may end up hiding the actual return value. Change
the documentation slightly to allow returning of original error
code from the underlying block device.

Fixes #11591
2019-09-30 13:26:56 +03:00
Kimmo Vaisanen 4da74b6619 LoRa: Fix build warning about _ongoing_tx_msg
_ongoing_tx_msg was incorrectly initialized before _mlme_confirmation.

Fixes following build warning:
[Warning] LoRaMac.h@691,26: 'LoRaMac::_ongoing_tx_msg' will be initialized after [-Wreorder]
[Warning] LoRaMac.h@689,28:   'loramac_mlme_confirm_t LoRaMac::_mlme_confirmation' [-Wreorder]
[Warning] LoRaMac.cpp@68,1:   when initialized here [-Wreorder]
2019-09-30 12:36:55 +03:00
Antti Kauppila d34a40a745 Cleaned up Mbed LWIP configurations 2019-09-27 15:52:40 +03:00
Anna Bridge 727b089291
Merge pull request #11517 from balajicyp/tcp_pktloss
TCP Packet loss happens due to running of out of Mailbox size.
2019-09-27 13:27:27 +01:00
Ari Parkkila e449e6dcdc Cellular: Fix setting of PDP context ID (cid) 2019-09-27 02:09:36 -07:00
Balaji 4f8036b682 TCP Packet loss when TCP Receive mailbox is full. 2019-09-25 10:58:25 -07:00
Ari Parkkila 8054b8eef8 Cellular: Fix resolving of DNS server IPv4/6 address 2019-09-25 03:16:45 -07:00
Kimmo Vaisanen 6ba0efc969 Cellular: Use more specific error codes for socket open and connect
- When calling socket APIs when socket is not open, NSAPI_ERROR_NO_SOCKET will be
  returned instead of generic NSAPI_ERROR_DEVICE_ERROR

- If socket_send() is called when connection is not open, NSAPI_ERROR_NO_CONNECTION
  will be returned instead of generic NSAPI_ERROR_DEVICE_ERROR
2019-09-25 09:25:33 +03:00
Kimmo Vaisanen b319be14e8 Offloaded TLSSocket for BG96
Some external modems have an internal TLSSocket implementation which can be used
instead of mbedtls based TLSSocket. Using offloaded TLSSocket can result in
significantly reduced ROM usage.

Offloaded TLSSocket can be enabled by enabling "nsapi.offload-tlssocket" and the used
network stack (e.g. cellular modem's CellularStack class) must support the setsockopt's
defined in nsapi_types.h.

Compared to original mbedtls based TLSSocket, offloaded TLSSocket brings in one significant
API limitation. Offloaded TLSSocket requires setting of certificates and keys after open()
and before connect() calls, where mbedtls based TLSSocket allows setting these before open()
call.
2019-09-25 09:25:33 +03:00
Mukund Ghonasgi 57d4103dd8 Adapt to Target that don't support 3M BT Uart Baud 2019-09-24 16:49:54 -07:00
Kyle Kearney 832c69b1a6 Explicitly set tdb internal flash size for PSOC6
The default computation assumes that a flash sector is several times
larger than a flash page. On PSoC 6 targets this is not the case
(the two values are the same) so the computed size is too small.
This is a similar change to 1b1f14d36b,
but for devices which implement TDB in internal storage.
2019-09-24 11:31:04 -07:00
Martin Kojtal d91ed5fa42
Merge pull request #11495 from kivaisan/improve_cellular_ut
Improve cellular unittests
2019-09-24 16:37:02 +02:00
Martin Kojtal e1cfb7b908
Merge pull request #11534 from kivaisan/handle_qisend_send_fail
Cellular: Handle SEND FAIL and ERROR response
2019-09-24 13:30:32 +02:00
int_szyk a60df639fe thread_mle_message_handler: fix null comparison.
Fixes Coverity issue about comparing nullptr.
2019-09-24 12:53:53 +02:00
int_szyk 76407bc654 sn_coap_builder: remove unnecessary code.
Fixes Coverity issue about unused variable.
2019-09-24 11:35:52 +02:00
int_szyk b0b9553991 CellularStack: remove unnecessary assignment.
Fixes Coverity issue about unused variable.
2019-09-24 11:05:01 +02:00
int_szyk 7c13b8f6b9 CellularUtil prefer_ipv6: check length.
Fixes Coverity issue about not checking the length of string before copying it.
2019-09-24 10:44:38 +02:00
Mukund Ghonasgi 15ee09c4bd Update Cordio BT Driver to support without BT Device Wake and Host Wake pins defined. 2019-09-23 11:29:57 -07:00
int_szyk 62d07707c9 NFCEEPROM: fix _ndef_buffer_reader init in ctor.
Fixes Coverity issue about not initialized members.
2019-09-23 15:34:07 +02:00
int_szyk d83cbb8766 NFC-Text: fix passing null pointer to a function.
Fixes Coverity issue about passing nullptr to memcpy.
2019-09-23 15:33:29 +02:00
int_szyk 081183c11e NFC-URI: fix passing null pointer to a function.
Fixes Coverity issue about passing nullptr to memcpy.
2019-09-23 15:30:12 +02:00
Martin Kojtal daafb950d9
Merge pull request #11538 from mirelachirica/ipv6_to_wise_1570
Cellular: Enable IPV6 for WISE_1570
2019-09-20 15:29:07 +02:00
Mika Leppänen 47e5dd74e2 Enabled DER coded certificate support to Wi-SUN mesh API
Wi-SUN mesh API uses now nanostack certificate interface with length parameters.
This enables that either PEM or DER formatted certificates can be used. Using
the length configuration for certificates and keys is optional, so existing
applications using the PEM certificates do not require changes.
2019-09-20 13:15:28 +03:00
Antti Kauppila 6adc2440a3 DNS manual cleanup mechanism added 2019-09-20 10:20:48 +03:00
Kimmo Vaisanen 1768b653ec Cellular: Handle SEND FAIL and ERROR response
QISEND command can respond either SEND OK, SEND FAIL or ERROR.
If response is not SEND OK, sent bytes should not be checked but
error should be reported.
2019-09-20 10:06:32 +03:00
Martin Kojtal 11a34ec092
Merge pull request #11521 from u-blox/clear_after_sim_pin
Bux fix: Context can be cleared using CGDCONT after sim ready state
2019-09-19 17:15:55 +02:00
Mirela Chirica 090ce0358f Cellular: Enable IPV6 for WISE_1570 2019-09-19 16:19:31 +03:00
Syed Fahimuddin Alavi a269f714cc Fix added to unlock AT handler mutex 2019-09-19 16:46:00 +05:00
Martin Kojtal 1afece7f1b
Merge pull request #11488 from kivaisan/fix_cellular_get_interface_name
Cellular: Fix get_interface_name to not include leading zero
2019-09-19 12:43:45 +02:00
Martin Kojtal c1a1c22fe9
Merge pull request #11469 from AriParkkila/cell-clear-ndef
Cellular: Disable cellular.clear-on-connect by default
2019-09-19 10:37:10 +02:00
Martin Kojtal 185e380233
Merge pull request #11490 from AriParkkila/cell-bg96-ifc
Cellular: Add flow control (IFC) in BG96 AT driver
2019-09-19 10:25:47 +02:00
Martin Kojtal 15d200f3d3
Merge pull request #11499 from kivaisan/fix_quectel_m26_send
Cellular: Fix stop tag for Quectel M26 send command
2019-09-19 10:22:18 +02:00
Syed Fahimuddin Alavi 828fffbc4e Bux fix: Context can be cleared using CGDCONT after sim ready state 2019-09-19 13:01:45 +05:00
Mukund Ghonasgi 0f5e3bf126 Cypress Cordio Driver Update 2019-09-18 11:11:37 -07:00
Ron Eldor 33b7c8ea2e Fix Failure in cc ecdh_alt montgomery curve
Change the order of the input keys and output secret given and
returned from the CC API, to address correct endianity.
2019-09-18 16:48:45 +03:00
Jaeden Amero eb00fbadb4 tls: Update to Mbed TLS 2.19.1
Update Mbed TLS to Mbed TLS 2.19.1.
2019-09-17 15:24:09 +01:00
Kimmo Vaisanen ba4308344b Cellular: Fix stop tag for Quectel M26 send command
Possible responses for send command are SEND OK<cr><ln>, SEND FAIL<cr><ln> or ERROR<cr><ln>
so normal OK<cr><ln> response check does not work properly.
2019-09-17 15:52:14 +03:00
Jaeden Amero 60f383e01f tls: Update export keys callback to use const
Mbed TLS's export keys callback requires the hello.random (for both
server and client) to be const. Make the callbacks in Mbed OS that use
the key export feature use const to match.
2019-09-17 12:57:05 +01:00
Kimmo Vaisanen b6ecce0bfb Add UT for AT_CellularNetwork::is_active_context 2019-09-17 12:56:47 +03:00
Kimmo Vaisanen e824714cd8 Add UT for CellularUtil::hex_to_char and ::hex_str_to_char_str
Also added checks for pointer validity.
2019-09-17 12:15:03 +03:00
Ari Parkkila 823993e7b1 Cellular: Add flow control (IFC) in BG96 AT driver 2019-09-16 03:16:36 -07:00
Martin Kojtal 9673ac1283
Merge pull request #11474 from dgreen-arm/fix-mbed-crypto-importer
Remove Mbed Crypto source files before importing
2019-09-16 11:25:21 +02:00
Kimmo Vaisanen ab71b2dba8 Cellular: Fix get_interface_name to not include leading zero
Multihoming documentation about interface name:
"Two character name string is concatenated with 8 bit value containing index which is incremented on each netif addition"

Cellular uses context id as index and to follow LWIP (LWIP::Interface::get_interface_name), index does not include leading zeros.
2019-09-16 09:59:31 +03:00
Yogesh Pande 246f431ed4 Delaying message id random initialization to later stage.
Random initialization sequence is causing start up issues in multiple platform
when done at construction phase.
The right thing is to delay the random initialization to later stage when the
message id is actually required. This provides system to do all necessary allocation
upfront without causing any random race condition at startup phase.
2019-09-13 16:17:14 +03:00
Martin Kojtal bf1aa5c016
Merge pull request #11465 from kotkcy/pr/mxcrypto_alts
Updated mbedTLS CRYPTO target to be more flexibly configured for supported boards
2019-09-13 12:31:12 +02:00
Martin Kojtal 66c39e0bca
Merge pull request #11424 from mirelachirica/stack_type_ip_versions
Stack type ip versions
2019-09-13 11:46:06 +02:00
Darryl Green 4b0f0ed61c Remove Mbed Crypto source files before importing 2019-09-12 16:04:44 +01:00
Mirela Chirica 78f4e8b12f Cellular: Enable IPv6 stack property for BG96 2019-09-12 12:56:29 +03:00
Mirela Chirica 7aaaae121e Cellular: IP stack property redefined 2019-09-12 12:56:28 +03:00
Mirela Chirica b44ba531a1 Cellular: Check IP version of send to address 2019-09-12 12:56:28 +03:00