Commit Graph

609 Commits (4b3cddff2a66d5b13ad861e8782d1d630c2479c1)

Author SHA1 Message Date
jeromecoutant 587393bb45 STM32 EMAC: move from TARGET_STM_EMAC to TARGET_STM 2019-10-07 10:57:31 +02: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
Antti Kauppila d34a40a745 Cleaned up Mbed LWIP configurations 2019-09-27 15:52:40 +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
Antti Kauppila 6adc2440a3 DNS manual cleanup mechanism added 2019-09-20 10:20:48 +03:00
Martin Kojtal 3297bf4062
Merge pull request #11420 from tymoteuszblochmobica/cm3ds
Fixed smsc9220_emac link_out memory management.
2019-09-10 19:52:44 +02:00
Tymoteusz Bloch 2626d90266 Fixed msc9220_emac link_out memory management. 2019-09-04 13:59:36 +02:00
Martin Kojtal 208d703b7e
Merge pull request #11338 from cydriftcloud/pr/psoc6-softap-bringdown
Bring down interface when stopping softap
2019-09-04 11:54:23 +02:00
Antti Yli-Tokola 1708ec2a3f nsapi_dns: cleanup dns queue when running out or memory 2019-09-03 13:56:21 +03:00
Lei Zhang 5a3562a76b Bringdown interface when stopping softap
The interface should be brought down when stopping softap.
2019-08-30 08:59:36 -07:00
Martin Kojtal c99b150bcf
Merge pull request #11356 from kyle-cypress/pr/whd-link-state-fix
Fix WHD link state change event handling
2019-08-30 07:44:40 +02:00
Martin Kojtal a65ed8c3d8
Merge pull request #11303 from jeromecoutant/PR_H743ZI2_480
NUCLEO_H743ZI2 : increase system clock from 400 MHz to 480 MHz
2019-08-29 17:10:06 +02:00
Lei Zhang 0b2e7bbef9 Use event handlers for link state callback
Allows DHCP to listen for device disconnect and refresh ip lease on reconnect.
2019-08-29 07:19:46 -07:00
Martin Kojtal 8ef742a49c
Merge pull request #11370 from u-blox/ublox_odin_driver_os_5_v3.7.1_rc1
Driver Updates + ARMC6 driver support + WIFI fixes
2019-08-29 13:35:06 +02:00
aqib-ublox 7f36fbc86e Driver Updates + ARMC6 driver support + wifi fixes 2019-08-29 11:33:29 +05:00
Kyle Kearney 8abada11f6 Add missing newlines to end of files 2019-08-28 10:56:15 -07:00
Lei Zhang b27653af6f Use individual headers instead of "mbed.h" 2019-08-28 10:56:15 -07:00
Kyle Kearney 26940e5c22 Add support for DHCP server with WHD 2019-08-28 10:56:15 -07:00
Kyle Kearney e64fdba7fc Update BSP and WifiInterface for WHD Changes 2019-08-28 10:56:14 -07:00
Martin Kojtal 7eb97be5a3
Merge pull request #11358 from 0xc0170/dev_rollup
Rollup PRs for 5.14
2019-08-28 16:39:36 +02:00
Martin Kojtal 67d1bb180b
Merge pull request #11319 from kyle-cypress/pr/whd-1.30-update
Update WHD to 1.30.0
2019-08-28 16:11:24 +02:00
Antti Kauppila 2aac56f79a NetworkInterface set_blocking() doxygen corrected 2019-08-28 13:12:07 +01:00
Kyle Kearney 33493b12d9 Update WHD clients for interface changes 2019-08-26 16:05:47 -07:00
Martin Kojtal 02d1873c06
Merge pull request #11266 from u-blox/feature_adc_temp_conf
ADC internal temperature support and EMAC header fix
2019-08-26 11:08:47 +02:00
jeromecoutant 11e39febf6 STM EMAC : NUCLEO_H743ZI2 add 2019-08-23 09:46:56 +02:00
jeromecoutant b705a9894a STM EMAC : STM32H7 directory restructure 2019-08-23 09:46:17 +02:00
Martin Kojtal edcde1ce8c
Merge pull request #10796 from NXPmicro/tickless
NXP: Enable MBED_TICKLESS on various NXP platforms
2019-08-22 10:30:14 +02:00
Martin Kojtal d0c917cb32
Merge pull request #11274 from VVESTM/vve_eth_h7
Add ethernet support on NUCLEO_H743ZI board
2019-08-22 09:42:45 +02:00
Vincent Veron 8ab6aecbe9 Move stm32xx_emac_config.h to family specific folder
This allows to specify which hal version to use for each family.
It can also be used to modify the thread stack size.

Signed-off-by: Vincent Veron <vincent.veron@st.com>
2019-08-21 15:02:45 +02:00
Martin Kojtal 399b517a47
Merge pull request #10974 from mikaleppanen/nano_ppp
Created PPP interface and PPP service classes to netsocket
2019-08-21 14:54:31 +02:00
Martin Kojtal 476ce097b9
Merge pull request #11104 from tejanarahari/pr/enterprise-security-feature-support-pr2
Enterprise security support
2019-08-21 14:52:56 +02:00
Vincent Veron 9f2e9aa576 Add EMAC support for NUCLEO_H743ZI
This port is based on :
    * CurryGuy ethernet branch :
        https://github.com/CurryGuy/mbed-os/tree/feature-stm32h7-emac
    * STM32 Cube example :
        Applications/LwIP/LwIP_HTTP_Server_Netconn_RTOS example

Signed-off-by: Vincent Veron <vincent.veron@st.com>
2019-08-21 11:40:48 +02:00
Martin Kojtal ff4dac9853
Merge pull request #11244 from AriParkkila/cell-dns-count
Netsocket: Change DNS retry and total attempt counts
2019-08-21 09:44:19 +02:00
aqib-ublox 80e30f4258 ADc internal temperature suuport and EMAC header fix 2019-08-20 18:44:22 +05:00
Mika Leppänen 4e60d2f39c Corrected PPP thread stack sizes and network interface
Corrected PPP thread stack size for RZ_A1_EMAC, CYW943012P6EVB_01,
CY8CPROTO_062_4343W, CY8CKIT_062_WIFI_BT and CY8CKIT_062S2_43012
that have special configuration for PPP thread size. Removed
pppInterface() helper call from network interface. It causes binary
compatibility break with precompiled network interface classes. Call
is helper function to check network interface type in case it is
unknown, and is not mandatory or used with PPP.
2019-08-20 13:37:13 +03:00
Mika Leppänen 3b20d9ea42 Increased PPP stack size based on testing
Increased stack size from 768 to 816.
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 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 64fb49e4ec
Merge pull request #11169 from dmaziec1/TLSSocketWrapper_recvfrom_modified
TLSSocketWrapper::recvfrom sets SocketAddress output variable
2019-08-20 09:41:39 +02:00
Ari Parkkila 2934a692c9 Netsocket: Change DNS retry and total attempt counts 2019-08-16 03:51:43 -07: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
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
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
Ari Parkkila 3f74a7f6f9 Fix nsapi_dns_add_server to add a server just once 2019-08-05 03:11:06 -07:00
Volodymyr Medvid 85a5bc0bf9 PSOC6: apply astyle to WHD EMAC driver implementation 2019-07-08 15:58:46 +03:00
Volodymyr Medvid 572221446f PSOC6: add WHD EMAC driver 2019-07-08 14:49: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
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 fc645bc3ed
Merge pull request #10805 from kjbracey-arm/armc5_blinky
Fix ARMC5 compilation
2019-06-11 15:07:43 +01:00
Kevin Bracey 6df6decdfc Fix ARMC5 compilation
Minor tweaks to fix ARM C 5 compatibility.

Pushing "ns_list.h" include to first makes sure "ns_types.h" is included
first, meaning it gets to define `__STDC_LIMIT_MACROS` before the first
include of <stdint.h>, which ensures that UINT8_MAX etc are defined.
2019-06-11 13:00:14 +03:00
Tymoteusz Bloch 4005c77f21 LWIP DNS servers setting/getting fixed. 2019-06-07 18:58:05 +02:00
Kevin Bracey 2fbbd9d2ca Introduce Semaphore::acquire methods
Deprecate wait() in favour of acquire(), try_acquire(),
try_acquire_for() and try_acquire_until().

Brings Semaphore more into line with CMSIS-RTOS 2 (which uses "acquire"),
itself (as it has "release"), and other classes having "try", "try for"
and "try until".

Also steps away from vague "wait" term - the primary operation here is
to acquire the semaphore, and this will of course sleep.
2019-05-28 17:02:06 +03:00
Arto Kinnunen 9687f59555 Update mesh related configuration help texts
-Update mbed-mesh-api nanostack heap-size configuration help
-Add WISUN to netsocket default-mesh-type configuration help
2019-05-20 13:29:53 +03:00
Martin Kojtal d4122b0b3a
Merge pull request #10454 from u-blox/ublox_odin_driver_os_5_v3.7.0_rc1
Enterprise_mode_+_wifi_configuraiton_api: update ODIN drivers to v3.7.0 RC1
2019-05-20 10:54:45 +01:00
Martin Kojtal 3ea1c56124
Merge pull request #10147 from kjbracey-arm/atomic_bitwise
Assembler atomics
2019-05-13 14:18:05 +01:00
aqin 43759c0c4b Enterprise mode + wifi configuraiton api 2019-05-08 17:52:04 +05:00
Kevin Bracey 87396e0bf6 Assembler atomics
Reimplement atomic code in inline assembly. This can improve
optimisation, and avoids potential architectural problems with using
LDREX/STREX intrinsics.

API further extended:
* Bitwise operations (fetch_and/fetch_or/fetch_xor)
* fetch_add and fetch_sub (like incr/decr, but returning old value -
  aligning with C++11)
* compare_exchange_weak
* Explicit memory order specification
* Basic freestanding template overloads for C++

This gives our existing C implementation essentially all the functionality
needed by C++11.

An actual Atomic<T> template based upon these C functions could follow.
2019-04-26 13:12:35 +03:00
蔡雪 (Xue Cai) d6730f5afc Update wifi driver for rda target UNO_91H 2019-04-24 11:29:50 +08:00
Kevin Bracey 6fe50763f3 i.MX RT1050: Reactivate data cache
Since commit 12c6b1bd8, the i.MX RT1050 has effectively had its data
cache disabled, as the SDRAM was marked Shareable; for the Cortex-M7,
shareable memory is not cached.

This was done to make the Ethernet driver work without any cache
maintenance code. This commit adds cache maintenance and memory barriers
to the Ethernet driver, and removes the Shareable attribute from the
SDRAM, so the data cache is used again.

Cache code in the base fsl_enet.c driver has not been activated - the
bulk of it is in higher-level Read and Write calls that we're not using,
and there is one flawed invalidate in its initialisation. Instead
imx_emac.cpp takes full cache responsibility.

This commit also marks the SDRAM as read/write-allocate. As the
Cortex-M7 has its "Dynamic read allocate mode" to automatically switch
back to read-allocate in cases where write allocate is working poorly
(eg large memset), this should result in a performance boost with no
downside.

Activating write-allocate is also an attempt to provoke any flaws in
cache maintenance - the Ethernet transmit buffers for example will be
more likely to have a little data in the cache that needs cleaning.
2019-04-04 12:06:24 +03:00
Mahesh Mahadevan 65942ba906 MIMXRT1050: Fix ENET issues
This is a fix for Issue 10239. The change aligns
the receive buffer lengths

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-04-03 08:18:58 -05:00
Kevin Bracey 9ad90691a3 CellularBase -> CellularInterface tidy
Remove remaining references to deprecated CellularBase in code, avoiding
one warning.

Add deprecation to Doxygen.
2019-03-20 10:12:14 +02:00
Cruz Monrreal dbb33ef423
Merge pull request #9801 from vmedcy/fix-eventqueue-h
Correctly include EventQueue.h
2019-03-16 22:52:40 -05:00
Martin Kojtal 5252163534
Merge pull request #9900 from michalpasztamobica/dns_async_handle_would_block
DNS send returning WOULD_BLOCK forces delayed retry
2019-03-14 13:01:20 +01:00
Martin Kojtal c0c02e2bd8
Merge pull request #9872 from KariHaapalehto/burst_nonblock_test_fix
Fix for NUCLEO_F207 UDPSOCKET_ECHOTEST_BURST_NONBLOCK fails.
2019-03-14 09:16:59 +01:00
Michal Paszta ee056daf86 DNS recv/send returning WOULD_BLOCK force delayed retry 2019-03-11 13:33:06 +02:00
kegilbert 194fa129fb Update recently added previous macro name uses in tests 2019-03-01 13:53:47 -06:00
kegilbert 8cef1904c5 Move socket-stats-enable to socket-stats-enabled.
This conforms with the other stats config option names
2019-03-01 13:31:33 -06:00
Martin Kojtal 6bdbe754cd
Merge pull request #9799 from VeijoPesonen/bugfix-esp8266-dns
Increase events.share-eventsize to 768B because of ESP8266 AT driver and asynchronous DNS
2019-02-27 11:30:38 +01:00
Kari Haapalehto 7de864c465 Fix for NUCLEO_F207 UDPSOCKET_ECHOTEST_BURST_NONBLOCK fails.
Increase eth-rxbufnb from 1 to 2 will fix the problem
2019-02-27 10:33:24 +02:00
Veijo Pesonen 517799fd06 NetworkStack: halts if unable to add an event to the event queue 2019-02-26 09:44:15 +02:00
d-kato 78923d8135 Add missing license description to RZ/A1 driver 2019-02-26 11:52:29 +09:00
Cruz Monrreal 044d0c9cb1
Merge pull request #9778 from michalpasztamobica/add_missing_wifi_config_params
Add missing wifi parameters to test configs
2019-02-25 17:30:36 -06:00
Michal Paszta 42404be824 Change all wifi and WiFi occurences to Wi-Fi 2019-02-25 14:54:18 +02:00
Seppo Takalo 7a33700bb4 Replace Copyright ARM with a proper Apache 2 license header 2019-02-25 14:17:42 +02:00
Seppo Takalo b14df9e0de Add missing copyright header to STM32 driver 2019-02-25 14:09:36 +02:00
Michal Paszta 08b06e25d0 Document network parameters in netsocket/mbed_lib.json 2019-02-22 10:13:21 +02:00
Volodymyr Medvid b0a33273ff Correctly include EventQueue.h
There are two EventQueue.h in mbed-os codebase:
events/EventQueue.h
features/FEATURE_BLE/ble/pal/EventQueue.h

By accident, `mbed compile` generates includes.txt with the correct
order of include search paths. This is not the case for the CMake
exporter: targets with FEATURE_BLE enables fail to compile with errors:

mbed-os/features/cellular/framework/AT/ATHandler.h:99:60: error:
'events' has not been declared

Update all places to always include either "events/EventQueue.h"
or "ble/pal/EventQueue.h": to always find the correct header.
2019-02-21 17:59:05 +02:00
Martin Kojtal dbd92c746b
Merge pull request #9387 from tymoteuszblochmobica/Sockets
Multihoming initial release
2019-02-21 13:50:03 +01:00
Cruz Monrreal b088bd493a
Merge pull request #9759 from michalpasztamobica/memory_handling_fixes
Multiple memory handling fixes
2019-02-20 12:07:45 -06:00
Martin Kojtal 5ada4bf9af
Merge pull request #9746 from blind-owl/retire_cellularbase_class
Cellular: retire CellularBase class
2019-02-20 15:30:43 +01:00
Tymoteusz Bloch 641189c357 Multihoming change parameter orded in gethostbyname 2019-02-20 14:37:33 +02:00
Michal Paszta fa6a3f5604 Multiple memory handling fixes
Based on valgrind reports running on unit tests following changes were introduced:
* TLSSocketWrapper frees allocated cert buffer in case of errors from mbedtls,
* nsapi_addr has a mem_init() function, initializing all of its memory during construction.
2019-02-20 14:15:57 +02:00
Jari Poyhonen 7a195ae227 Cellular: fix for binary compability requirement for CY8CKIT_062_4343W 2019-02-20 10:03:34 +02:00
Cruz Monrreal e3bc37b4de
Merge pull request #9655 from mirelachirica/nonip_doxygen_updates
Cellular: Non-IP doxygen updates
2019-02-19 15:29:14 -06:00
Cruz Monrreal feae56eea1
Merge pull request #9493 from RonEld/add_platform_initialization_in_trng_test
Initialize platform in trng test
2019-02-19 15:27:40 -06:00
Tymoteusz Bloch 49141376ee Multihoming initial release
Added Multihoming feature to LWIP (ability to use more than one network interfaces) for increasing networking reliability.
This involves:

    LWIP interface
    LWIP IP routing
    DNS storage
    Sockets (bind to interface name possibility)
    possibility to add non default network interface
    cellular middleware modifications if cellular connection is used
2019-02-19 17:39:46 +02:00
Martin Kojtal 723236f855
Merge pull request #9307 from mtomczykmobica/ONME-3949
Configuration options for STM_EMAC buffer counts
2019-02-19 14:09:24 +01:00
Jari Poyhonen b0c7c266c6 Cellular: add SPDX identifier 2019-02-19 10:42:04 +02:00
Marcin Tomczyk a5f93e0b07 ONME-3949 Configuration options for STM_EMAC buffer counts 2019-02-19 08:18:18 +01:00
Jari Poyhonen 90c9a85397 Cellular: retire CellularBase class
It was decided to retire CellularBase class which served as a pure
virtual interface class from which Cellular network stack
implementations would get inherited. However, the current view is that
we may be the only user of it so we could retire CellularBase.
2019-02-18 11:50:43 +02:00
Ron Eldor c94b5861e4 Add mbedtls platform setup and teardown to modules
Add calls to `mbedtls_platform_setup()`
and `mbedtls_platform_teardown()` to all modules and tests using Mbed TLS.
2019-02-18 11:43:32 +02:00
Mirela Chirica 57a93bbd0a Cellular: Non-IP doxygen updates 2019-02-18 09:53:59 +02:00
Cruz Monrreal 3e6cd4e89d
Merge pull request #9501 from caixue1102/mbed-os-rda
Add WIFI support for RDA target UNO_91H
2019-02-12 20:05:27 -06:00
Cai d92e33dcee Add WIFI support for RDA target UNO_91H 2019-02-12 22:59:53 +08:00
Cruz Monrreal 92e1464024
Merge pull request #9584 from michalpasztamobica/tlssocket_would_block
TLSSocket send/recv return WOULD_BLOCK error instead of NO_CONNECTION
2019-02-11 18:45:50 -06:00
Martin Kojtal 10bb66a053
Merge pull request #9424 from SeppoTakalo/ONME-4125
Allows multiple network status listeners
2019-02-11 10:41:35 +01:00
Nir Sonnenschein 8c2ad14ace
Merge pull request #9568 from ARMmbed/feature-cellular-refactor
Merge feature cellular refactor
2019-02-07 18:17:32 +02:00
Michal Paszta 9db97247a2 TLSSocket returns WOULD_BLOCK error instead of ALREADY
In case mbedtls fails to execute handshake advertising
MBEDTLS_ERR_SSL_WANT_READ or MBEDTLS_ERR_SSL_WANT_WRITE,
TLSSocketWrapper::continue_handshake returns NSAPI_ERROR_WOULD_BLOCK.
2019-02-07 10:33:37 +02:00
Seppo Takalo 2744200cb7 Add NetworkInterface::attach() back, as it might be referred from binaries 2019-02-01 16:02:45 +02:00
Seppo Takalo 06aea98f99 Call "new" instead of no-throw version and the MBED_ERROR.
Standard new operator already calls MBED_ERROR in failure.
2019-01-31 15:21:12 +02:00
Seppo Takalo 9c98d1572b Allow multiple network status listeners
Allow more than one callback to be register to NetworkInterfaces.
This introduces new APIs:
void NetworkInterface::add_event_listener(...);
void NetworkInterface::remove_event_listener(...);

Which internally calls interfaces attach() functions.
2019-01-31 15:04:24 +02:00
Ari Parkkila 47a8f24b1e Cellular: Fix astyle 2019-01-31 04:15:01 -08:00
Martin Kojtal a12ab30f98
Merge pull request #9414 from SeppoTakalo/ONME-4013
Clarify asynchronous Networkinterface::connect() and disconnect() API
2019-01-31 11:30:29 +01:00
Cruz Monrreal f5730a91b2
Merge pull request #9474 from VeijoPesonen/fix-newlines_at_end-of-files
Fix newlines at end of files
2019-01-28 10:33:37 -06:00
Ari Parkkila 52ee61e1ae Fix NetworkInterface::set_default_parameters binary compatibility 2019-01-28 03:27:10 -08:00
Jan Jongboom ca987568d8
TCPSocket.cpp setting socket should terminate with semicolon 2019-01-24 14:25:34 -08:00
Veijo Pesonen a6d4c6b609 L3IPInterface: make inheriting virtual explicit 2019-01-23 17:04:42 +02:00
Veijo Pesonen 9f3830aa72 Adds newlines to avoid compiler warnings 2019-01-23 16:43:32 +02:00
Michal Paszta 2cda5d28b8 Documentation of TLSSocket behavior on AUTH_FAILURE 2019-01-22 12:40:42 +01:00
Ari Parkkila 59972b6659 Cellular: Remove netsocket/generic_modem_driver 2019-01-22 02:24:45 -08:00
Mirela Chirica 55b54f7c97 Cellular: Added API for setting default parameters to a network interface 2019-01-22 02:24:45 -08:00
Mirela Chirica ba3727b4e8 Cellular: Unit tests for Non-IP socket 2019-01-22 02:24:45 -08:00
Mirela Chirica d301e13610 Cellular: Non-IP socket and PDP context for EPS control plane data delivery 2019-01-22 02:24:44 -08:00
Martin Kojtal 31579fe4bb
Merge pull request #9328 from SeppoTakalo/ip-core-doxygen
Doxygen fixes for IP networking area
2019-01-22 10:48:10 +01:00
Seppo Takalo 58c2760e3f Fix spelling mistakes 2019-01-21 11:54:49 +02:00
Seppo Takalo 6f15b04655 Fix review findings. 2019-01-21 11:45:13 +02:00
Mel Weed 0f0469d03d editorial changes 2019-01-21 11:45:13 +02:00
Mel Weed b79b608362 mbed-tls/TLS to Mbed TLS 2019-01-21 11:45:13 +02:00
Mel Weed 40418d8ff9 grammatical corrections 2019-01-21 11:45:13 +02:00
Mel Weed ea296afec2 editorial changes, punctuation 2019-01-21 11:45:13 +02:00
Kari Haapalehto fcd497303d Review changes 2019-01-21 11:45:12 +02:00
Mel Weed f7e48f1385 typo fixes, future->present 2019-01-21 11:45:12 +02:00
Mel Weed c454ba9f60 removing 'easy to use' 2019-01-21 11:45:12 +02:00
Kari Haapalehto cabf597ab0 Hide protected start_handshake 2019-01-21 11:45:12 +02:00
Jarno Lamsa 981bfa139e SocketAddress doxygen cleanup 2019-01-21 11:45:12 +02:00
Jarno Lamsa 8f5e003a1e WifiInterface doxygen cleanup 2019-01-21 11:45:12 +02:00
Seppo Takalo 501f5ae32c Add more documentation to Socket classes. 2019-01-21 11:45:12 +02:00
Seppo Takalo db67332496 Fix DNS grouping 2019-01-21 11:45:12 +02:00
Seppo Takalo 706af114e3 Remove extra @param values 2019-01-21 11:45:12 +02:00
Kari Haapalehto 5fa13e43d1 Doxygen corrections to DTLSSocket.h, TLSSocket.h, TLSSocketWrapper.h
and DTLSSocketWrapper.h
2019-01-21 11:45:12 +02:00
Seppo Takalo 249fa7fd6f Create new netinterface Doxygen group 2019-01-21 11:43:49 +02:00
Seppo Takalo 0619b90997 Fix NetworkInterface grouping 2019-01-21 11:43:49 +02:00
Kari Haapalehto 0fbdb692e9 Doxygen corrections to:
- DTLSSocket.h
- TLSSocket.h
- TLSSocketWrapper.h
2019-01-21 11:43:49 +02:00
Seppo Takalo bfd497fe26 Fix netsocket Doxygen group 2019-01-21 11:43:49 +02:00
Kevin Bracey ab037c6f69 InternetSocket: better protect _callback
sigio callbacks can be triggered from interrupt, so changing _callback
needs critical section protection, not just a mutex.
2019-01-18 15:37:11 +02:00
Kevin Bracey 0f6a4cd0bd InternetSocket: Use atomics, not volatile
Use a better tool for the job.
2019-01-18 15:37:11 +02:00
Seppo Takalo 6c5b845517 Clarify asyncronous Networkinterface::connect() and disconnect() API
This is slight API change, as a new return code is introduced.
Intention is to properly support asyncronous drivers that might
not be able to get new operation into execution, therefore they
need to return BUSY.
2019-01-18 15:36:23 +02:00
Cruz Monrreal 92a5f2f8f2
Merge pull request #9337 from tymoteuszblochmobica/removecellular
unittest: remove cellular driver L3IP stub
2019-01-16 22:06:27 -06:00
Tymoteusz Bloch 18967a88f3 Removed cellular driver L3IP stub 2019-01-14 12:08:41 +01:00
kegilbert 70b9b753db Add doxygen spellcheck jobs to Travis
Currently tests
    - drivers
    - platform
    - rtos
    - events
    - features/netsocket
2019-01-11 10:22:15 -06:00
c_jin be65ebd038 add SPDX indentifier, modify 450zi.icf file and static definition in us_ticker.c 2019-01-09 19:03:33 +08:00
c_jin 5a1108e742 Add GD32_F450ZI as new target 2019-01-09 19:03:33 +08:00
Cruz Monrreal 54f759176b
Merge pull request #9210 from AnttiKauppila/mbed_h_fix
mbed.h includes removed
2019-01-04 10:27:30 -06:00
Seppo Takalo 50eb243762 Don't consume 36 kB just for Ethernet buffers.
Kintis EMAC is consuming 16 rinbuffers for input, and 8 buffers for output.
This is over-use because input packets are immediately allocated from
heap when passed to LwIP. Therefore the number can be creatly reduced.
2019-01-02 19:05:16 +02:00
Antti Kauppila 02b0f79e15 mbed.h includes removed 2018-12-28 14:36:10 +02:00
Tymoteusz Bloch fc88922845 L3IP Interface Implementation
LWIP L3IP interface initial implementatioon
2018-12-20 15:23:43 +01:00
Martin Kojtal 06748af2f8
Merge pull request #9079 from kegilbert/TCPSocket-accept-statelog
Add socket stat logging state change update
2018-12-18 08:06:05 +00:00
kegilbert ee3945dfa3 Add socket stat logging state change update
TCPServer was deprecated and the accept call was added to TCPSocket. Add state change update to that call
2018-12-13 14:50:56 -06:00
Martin Kojtal c387fec36b
Merge pull request #8725 from ChazJin/master
Add support for GD32F307VG
2018-12-12 14:42:20 +01:00
deepikabhavnani c272377a81 Make sure no memory overhead if statistics are disabled 2018-11-26 09:42:45 -06:00
deepikabhavnani fa6b3d2783 Corrected TCPServer reporting as per review comments 2018-11-26 09:42:45 -06:00
deepikabhavnani 068f2d14c0 Resolve IAR build issue
IAR not able to assign default zero value in array and complaints of
internal error as below:

[ERROR] Internal error: [Front end]: assertion failed at:
"..\..\Translator\compiler_core\src\parser\edg\decl_inits.c", line 2031
2018-11-26 09:42:45 -06:00
Amanda Butler 81fc940a8e Edit SocketStats.h
Edit file.
2018-11-26 09:42:45 -06:00
deepikabhavnani 117eb0bc87 Add socketstats stub functions for unittest and addressed reviews 2018-11-26 09:42:50 -06:00
Deepika f6c1a40b29 Add config options for socket statistics
1. MBED_CONF_NSAPI_SOCKET_STATS_ENABLE to enable the statistics
2. MBED_CONF_NSAPI_SOCKET_STATS_MAX_COUNT max sockets statistics cached
2018-11-26 09:42:45 -06:00
Deepika a851df66e3 Code/bug after testing
1. Fixing astyle and docs
2. Extra mutex lock was removed
3. Bytes are updated when send/recv > 0 and not in case of -ve error
4. Review comments
5. Guard statistics implementation in test with MBED_NW_STATS_ENABLED
2018-11-26 09:42:45 -06:00
Deepika 09b4bc07ce This is the initial version of stats implementation in network layer.
SocketStats Class is added to collect and provide the statistics information.
In this phase only socket information is collected and max sockets that can
be recorded at any time are configurable through 'MBED_CONF_NSAPI_SOCKET_STATS_MAX_COUNT'

Network statistics can be enabled through a macro MBED_NW_STATS_ENABLED

More information on design is captured in #8743
2018-11-26 09:42:39 -06:00
Martin Kojtal aae6bb125a
Merge pull request #8836 from SeppoTakalo/clarify_connect_docs
Clarify asynchronous NetworkInterface::connect() documentation
2018-11-25 11:27:16 +01:00
Martin Kojtal b16569dc3f
Merge pull request #8838 from 0xc0170/dev_rollup
Rollup v2 for 5.11rc1
2018-11-24 21:37:02 +01:00
Martin Kojtal cb6f5d65e7
Merge pull request #8766 from jarvte/fix_cellular_backward_com
Fix cellular backward compatibility
2018-11-24 08:05:56 +01:00
Martin Kojtal b9ea30abf1 Merge branch 'socket_open_deprecated' of https://github.com/michalpasztamobica/mbed-os into dev_rollup 2018-11-23 18:38:02 +00:00
Martin Kojtal 95b1e75202 Merge branch 'dtls' of https://github.com/SeppoTakalo/mbed-os into dev_rollup 2018-11-23 18:36:55 +00:00
Seppo Takalo 1b80f6ba5e Clarify asynchronous NetworkInterface::connect() documentation 2018-11-22 12:52:28 +02:00
c_jin a9ce7a6836 Add SPDX identifier for GD EMAC driver 2018-11-21 12:46:28 +08:00
Seppo Takalo 5459a7b5c9 Add license headers into TLSSocket files 2018-11-20 11:47:29 +02:00
Seppo Takalo 0f5cec3ebc Include TLSSocket and DTLSSocket in Doxygen 2018-11-20 11:47:28 +02:00
Jimmy Brisson f41b78c6b8 Move EMAC implementation to shared target 2018-11-19 09:37:17 -06:00
Seppo Takalo bdc355f873 Astyle fixes 2018-11-19 15:31:31 +02:00
Seppo Takalo 5d170f2b3e Clarify that TLSSocket should not be reopened. 2018-11-19 15:19:50 +02:00
Seppo Takalo 6192ed1480 Compare the intermediate timestamps as well 2018-11-19 15:19:50 +02:00
Seppo Takalo 2229a2f2f5 Need to protect members with MBEDTLS_PK_C and X509_CRT_PARSE flags.
This is dependency to X509_CRT_PARSE but just to make sure
that also the 'mbedtls_pk_context' structure is not used if that
flag is not enabled.
2018-11-19 15:19:49 +02:00
Seppo Takalo 46c46019bc Refactor DTLSSocket to use Socket::getpeername()
Also, let DTLSSocket to be a friend of InternetSocket so it can do
the name resolution from its _stack.

+ Some whitespace fixes
2018-11-19 15:19:49 +02:00
Seppo Takalo 695db63df8 Decrease verbosity of the TLSSocketWrapper 2018-11-19 15:19:49 +02:00
Michal Paszta 392bccf835 Add unit tests for TLSSocket and TLSSocketWrapper
This also includes their Datagram counterparts: DTLSSocket and DTLSSocketWrapper.
Coverage missing for timer-related functionality, but this would require more advanced stub development.
The extra (d)tls_test_config.h is necessary for successful compilation without HW support for the mbedtls features in unittests.
I reused the mbedtls stub found in features/nanostack/coap-service/test/coap-service/unittest/stub/mbedtls_stub.c and amended it slightly with a few missing functions.
2018-11-19 15:19:49 +02:00
Seppo Takalo 2ca1fe65dd Implement DTLSSocket helper
This is equivalent of TLSSocket class but for UDP and DTLS.
2018-11-19 15:19:49 +02:00
Seppo Takalo d22adbdb26 Implement DTLSSocketWrapper and fix non-blocking connections on TLSSocket
DTLSSocketWrapper is equivalent of TLSSocketWrapper but uses datagram mode
and timers for handling Mbed TLS timeouts.

Non-blocking connections were not working earlier, now fixed for both
secure socket modes.
2018-11-19 15:19:49 +02:00
Michal Paszta 42940fab3c Deprecate TCP/UDPSocket open-calling constructors
Updated Doxygen, removed the only one call of the deprecated constructor from the tests.
2018-11-19 12:19:52 +01:00
Teppo Järvelin a3589ed41f Fixed cellular backward compatiblity. 2018-11-19 09:04:22 +02:00
c_jin 5a15f810a6 Error modification 2018-11-19 09:41:17 +08:00
c_jin 2b9071afe6 conflicts resolve 2018-11-18 20:19:19 +08:00
chao_king 61d3bc804c Update licence 2018-11-18 19:30:17 +08:00
chao_king d2e731bcf5 Update licence 2018-11-18 19:30:07 +08:00
chao_king 9131b3f9ec Update licence 2018-11-18 19:29:43 +08:00
chao_king 700f3a2c69 Add EMAC driver for GD32_F307VG 2018-11-18 19:26:04 +08:00
Qinghao Shi d157e59267 reformat to following codeing style rules 2018-11-16 10:29:31 +00:00
Qinghao Shi 25e8f89567 update wait_ms() to sleep_for() 2018-11-16 10:29:31 +00:00
Qinghao Shi 78b186ec56 Update code according to the reviews
* move emac driver to COMPONENT folder
* use mbed rtos C++ API instead of CMSIS API
2018-11-16 10:29:31 +00:00
Qinghao Shi e603f1ad49 add FVP EMAC driver 2018-11-16 10:22:42 +00:00
Cruz Monrreal II 5c1c7bf71f Merge branch 'fix_astyle_error' of ssh://github.com/0xc0170/mbed-os into rollup-b.1 2018-11-15 18:26:09 -06:00
Cruz Monrreal fa2077df41
Merge pull request #8685 from bridadan/clean_up_deprecated_feature_code
Clean up deprecated feature code
2018-11-15 17:05:22 -06:00
Martin Kojtal 9a252cd218 Merge branch 'feature-emac-mxrt1050' of https://github.com/NXPmicro/mbed into dev_rollup 2018-11-15 13:58:27 +00:00
Martin Kojtal f91eed97da cellular: fix onboard cellular coding style 2018-11-15 10:47:08 +00:00
chao_king 42bffe2d89 Update licence 2018-11-15 16:01:54 +08:00
chao_king 49b25c9699 Update licence 2018-11-15 16:01:54 +08:00
chao_king cc94bfa838 Update licence 2018-11-15 16:01:53 +08:00
chao_king eb39c48841 Add EMAC driver for GD32_F307VG 2018-11-15 16:01:53 +08:00