Commit Graph

5945 Commits (b9d824d67cb15cf43a205aa5c78336aaa2aaeecf)

Author SHA1 Message Date
Mukund Ghonasgi 67fdf6c6f9 Address ARM Code review feedback. 2019-11-18 15:42:08 +00:00
Mukund Ghonasgi 64be6a7604 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-11-18 15:42:08 +00:00
Alexandre Bourdiol 5418d70813 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-11-18 15:42:08 +00:00
Kimmo Vaisanen a7868daa89 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-11-18 15:42:08 +00:00
Sathish Kumar Mani 9acdd53144 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-11-18 15:42:08 +00:00
Ron Eldor 463f00e723 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-11-18 15:42:08 +00:00
Jarkko Paso 9051e21f39 Merge commit 'ffb05c770964013a9f1ee9fb89d25e9fd09e886d'
* commit 'ffb05c770964013a9f1ee9fb89d25e9fd09e886d':
  Squashed 'features/nanostack/coap-service/' changes from e9edb1b..b919a33
2019-10-16 12:06:09 +01:00
Jarkko Paso a8c0491173 Merge commit '3e6cb31659a56d343c7b8fe37645f195eb87ffcf'
* commit '3e6cb31659a56d343c7b8fe37645f195eb87ffcf':
  Squashed 'features/nanostack/sal-stack-nanostack/' changes from c473148..0824752
2019-10-16 12:05:57 +01:00
Kyle Kearney 65def89e94 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-16 11:58:32 +01:00
Michal Paszta 2eb2dcf923 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-16 11:58:32 +01:00
Kimmo Vaisanen a0b33ee1a4 Cellular: Remove old deprecated tests
Cellular tests have been replaced with generic mbed-os netsocket and network interface tests.
2019-10-16 11:58:32 +01:00
Matthew Macovsky 08a2709993 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-10-16 11:58:32 +01:00
mudassar-ublox d12a051068 setting timeout before send command 2019-10-16 11:58:32 +01:00
Ari Parkkila 5b9741094f Cellular: Fix CellularStateMachine to not loop on power state 2019-10-16 11:58:32 +01:00
Ari Parkkila 2eab0fbee4 Cellular: Fix resolving of DNS server IPv4/6 address 2019-10-16 11:58:32 +01:00
int_szyk 95766d71ac thread_mle_message_handler: fix null comparison.
Fixes Coverity issue about comparing nullptr.
2019-10-16 11:53:52 +01:00
int_szyk e7b5a4f32b sn_coap_builder: remove unnecessary code.
Fixes Coverity issue about unused variable.
2019-10-16 11:53:52 +01:00
int_szyk 85f104755f CellularStack: remove unnecessary assignment.
Fixes Coverity issue about unused variable.
2019-10-16 11:53:52 +01:00
int_szyk 2d2fdf7cf9 CellularUtil prefer_ipv6: check length.
Fixes Coverity issue about not checking the length of string before copying it.
2019-10-16 11:53:52 +01:00
Janne Kiiskila 04767f3022 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-10-16 11:53:52 +01:00
Ari Parkkila 78f3292036 Cellular: Fix setting of PDP context ID (cid) 2019-10-16 11:53:52 +01:00
Mirela Chirica 9dab079d33 Cellular: Removed not used variable 2019-10-16 11:53:52 +01:00
Mirela Chirica d48ea364ff Cellular: Include of errno.h needed for Mac OS X 2019-10-16 11:53:52 +01:00
Kimmo Vaisanen f295272b3b 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-10-16 11:53:52 +01:00
Mukund Ghonasgi 1eb85aefab Adapt to Target that don't support 3M BT Uart Baud 2019-10-16 11:53:52 +01:00
Mukund Ghonasgi 8bd35cc039 Update Cordio BT Driver to support without BT Device Wake and Host Wake pins defined. 2019-10-16 11:53:52 +01:00
Mukund Ghonasgi f6507b7140 Cypress Cordio Driver Update 2019-10-16 11:53:52 +01:00
Balaji 1d69501012 TCP Packet loss when TCP Receive mailbox is full. 2019-10-16 11:53:52 +01:00
Kyle Kearney 477f5636e2 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-10-16 11:53:52 +01:00
Kimmo Vaisanen 5ae3b078d4 Add UT for AT_CellularNetwork::is_active_context 2019-10-16 11:53:52 +01:00
Kimmo Vaisanen a6eed00d5b Add UT for CellularUtil::hex_to_char and ::hex_str_to_char_str
Also added checks for pointer validity.
2019-10-16 11:53:52 +01:00
Kimmo Vaisanen 76171e54e7 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-10-16 11:53:52 +01:00
Mirela Chirica 2d967dacbf Cellular: Enable IPV6 for WISE_1570 2019-10-16 11:53:52 +01:00
Kimmo Vaisanen 2bf62bf4c5 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-10-16 11:53:52 +01:00
Ari Parkkila 31528016b5 Cellular: Add flow control (IFC) in BG96 AT driver 2019-10-16 11:53:52 +01:00
Kimmo Vaisanen c5c0261737 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-10-16 11:53:52 +01:00
Darryl Green c4bc75661b Remove Mbed Crypto source files before importing 2019-10-16 11:53:52 +01:00
Kostiantyn Tkachov 7dc92567f9 Updated mbedTLS CRYPTO target to be more flexibly configured for supported boards 2019-10-16 11:53:52 +01:00
Mirela Chirica 2cc2d690be Cellular: Enable IPv6 stack property for BG96 2019-10-16 11:53:52 +01:00
Mirela Chirica 1b43450607 Cellular: Check IP version of send to address 2019-10-16 11:53:52 +01:00
Mirela Chirica 4078b6f398 Cellular: IP stack property redefined 2019-10-16 11:53:52 +01:00
Mirela Chirica a846eb3c3c Cellular: Stack type based on assigned IP addresses versions 2019-10-16 11:53:52 +01:00
Tymoteusz Bloch 85919ba596 Fixed msc9220_emac link_out memory management. 2019-10-16 11:53:52 +01:00
Seppo Takalo fb0c22fc23 Include ns_types.h before mbed_trace.h in Nanomesh 2019-10-16 11:53:52 +01:00
Seppo Takalo 4b84664267 Remove mbed_trace dependency to Nanomesh headers
This library only uses standard types from C99, and
thus does not need compiler specific tweaks from ns_types.h
2019-10-16 11:53:52 +01:00
Amanda Butler c505987b07 Edit Readme.md
Edit file, mostly for active voice, formatting and parallel construction.
2019-10-16 11:53:52 +01:00
Ron Eldor a9cc06536a Fix typo
suipport -> support
2019-10-16 11:53:52 +01:00
Ron Eldor 0d6fc46086 Explaining how to opt in modules
Add a section in the CC Readme file explaining how to enable the optional module.
2019-10-16 11:53:52 +01:00
Ari Parkkila aea8d824cb Cellular: Fix BG96 power on and connect 2019-10-16 11:53:52 +01:00
George Psimenos 499bc28a32 Avoid potential overflow 2019-10-16 11:53:52 +01:00