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
Anna Bridge
4d07bcbd6e
Merge pull request #8579 from jarvte/cellular_context
...
Major refactoring: changing Network inheritance from CellularNetwork to new class CellularContext
2018-11-14 14:37:19 +00:00
Mahesh Mahadevan
12c6b1bd88
MIMXRT1050EVK: Add ENET support
...
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-11-14 07:13:07 -06:00
Cruz Monrreal II
4a5ba7f156
Merge branch 'getpeername' of ssh://github.com/SeppoTakalo/mbed-os into rollup
2018-11-13 17:26:49 -06:00
Seppo Takalo
619bcb5b4e
Implement Socket::getpeername() API
...
This is equivalent of POSIX getpeername() function. It allows to
get remote address associated with the socket.
For example:
socket *s = server.accept();
SocketAddress remote;
s->getpeername(&remote);
2018-11-13 11:02:51 +02:00
Kevin Bracey
913103c34d
TLSSocketWrapper: decouple error requirements
...
* Don't pull in mbedtls_strerror() if trace is not enabled.
* Output error trace even if mbedtls_strerror() is not available.
2018-11-12 13:12:34 +02:00
Teppo Järvelin
3f6e088782
Cellular: Fixed backward compatibility with OnBoardCellularInterface and set default values in NetworkInterfaceDefaults.cpp.
2018-11-11 14:13:05 +02:00
Teppo Järvelin
1a047efade
Cellular: review fixes, added missing fixes from master.
2018-11-11 14:13:05 +02:00
Teppo Järvelin
9fb83024ea
Changed CellularContext to inherit from CellularBase instead of NetworkInterface. \n Changed Device constructor to take Filehandle instead of eventqueue.
2018-11-11 14:13:05 +02:00
Teppo Järvelin
ad2abbe887
Cellular: major refactoring while introducing new CellularContext class.
2018-11-11 14:12:49 +02:00
Teppo Järvelin
8880538eba
Cellular: Introduced new state machine to replace old CellularConnectionFSM
...
CellularDevice class own new state machine. Now we don't have to expose state machine
which may change and so we don't have to make API changes if that happens.
EasyCellularConnection uses now CellularDevice instead of old state machine.
2018-11-11 14:11:21 +02:00
Cruz Monrreal
9d95d46d6c
Merge pull request #8591 from 0xc0170/fix_coding_style_features
...
features: fix coding style
2018-11-09 09:40:56 -06:00
Brian Daniels
da6ce029ea
Removing cellular references to COMMON_PAL
2018-11-08 16:55:59 -06:00
Cruz Monrreal II
e40c357cb2
Merge branch 'internetsocket' of ssh://github.com/marcemmers/mbed-os into rollup
2018-11-08 13:24:14 -06:00
Martin Kojtal
0217f69511
Merge branch 'cm3ds_emac' of git://github.com/kapi90/mbed-os into dev_rollup
2018-11-08 09:21:38 +00:00
Martin Kojtal
63160d8c5b
netsocket: fix astyle coding style
2018-11-08 08:54:17 +00:00
Marc Emmers
dcb97f9f74
InternetSocket: Fixed missing unlock before return
2018-11-06 15:02:42 +01:00
Martin Kojtal
4cbcd64ca3
Merge branch 'doxy_refactor' of https://github.com/jamesbeyond/mbed-os into dev_rollup
2018-11-06 12:10:10 +00:00
Martin Kojtal
cb4924151e
Merge pull request #8621 from marcuschangarm/fix_include
...
Add missing include for TLSSocket
2018-11-05 17:18:52 +01:00
Marcus Chang
07eb6bd159
Add missing include for TLSSocket
...
TCP and UDP sockets are automatically available when mbed.h is
included in an application.
This change lets the TLSSocket be used in the same way.
2018-11-01 13:32:37 -07:00
Seppo Takalo
f92108c0f3
Make sure that close() is called before the transport is destroyed.
...
Transport is a member of TLSSocket which is derived from TLSSocketWrapper.
Make sure that TLSSocketWrapper::close() is called before the transport is
destroyed.
2018-11-01 15:30:27 +02:00
Qinghao Shi
60cc0c295d
fixed NetworkInterface Class missing in doxy
2018-10-31 14:50:59 +00:00
Martin Kojtal
2015a61b37
Merge pull request #8580 from tz-arm/fix_incorrect_comment_in_socket_h
...
Fix the incorrect comment for set_blocking()
2018-10-31 13:10:35 +01:00
Terence Zhang
2c56bd8151
Fix the incorrect comment for set_blocking()
2018-10-30 15:41:32 +08:00
Amanda Butler
eae570ef08
Edit EMAC.h
...
Change Latin abbreviation to English phrase and fix capitalization of EMAC while I'm at it.
2018-10-29 15:14:07 -05:00
kegilbert
4bc7bf3b1e
Fix typos in Features/Netsocket
2018-10-29 15:14:07 -05:00
Bence Kaposzta
9e6b1246a4
This commit adds EMAC driver for CM3DS that uses an SMSC LAN 9220
...
Ethernet controller. To ensure proper operation, some methods
needed to be updated in the SMSC9220's native driver as well.
It passes all related Greentea tests, however when supervised by
the Python environment it tends to fail because of Timeout.
The current timeout is set to 1200s that seems to be a little bit short
to finish all test cases, the timeout happens towards the end of the
last test case.
Change-Id: I914608c34828b493a80e133cd132537a297bfc84
Signed-off-by: Bence Kaposzta <bence.kaposzta@arm.com>
2018-10-29 15:30:47 +01:00
Cruz Monrreal
9403a2f16c
Merge pull request #8499 from michalpasztamobica/master
...
Socket closing improvements and tests adjustments
2018-10-29 08:47:25 -05:00
Cruz Monrreal II
e8728148ac
Merge branch 'docs-fix-networkiface' of ssh://github.com/paul-szczepanek-arm/mbed-os into rollup
2018-10-26 11:48:45 -05:00
Mel W
2bab24ffc5
Commas
2018-10-26 17:32:47 +03:00
Mel W
ae75dfcf92
Capitalization, formatting of true and false, punctuation.
2018-10-26 17:32:10 +03:00
Mel W
b165fc0f93
Articles and capitalization
2018-10-26 16:18:57 +03:00
Mel W
25b1625fff
Sentence restructuring, punctuation
2018-10-26 15:42:26 +03:00
Michal Paszta
0da0f16d60
TCPSocket accept refactored to close cleanly and icetea test added
...
Private constructor called in TCPSocket accept, when creating a new Socket.
Close() method calls moved "up" to InternetSocket.
InternetSocket::close() returns proper error code when no socket available.
Add TcpSocket::accept icetea tests.
Deleting sockets moved to teardown.
2018-10-26 12:02:25 +03:00
Cruz Monrreal II
e021ec4d08
Merge branch 'docs-fix-internetsocket' of ssh://github.com/paul-szczepanek-arm/mbed-os into rollup
2018-10-25 21:49:41 -05:00
Cruz Monrreal II
05a69de5b4
Merge branch 'docs-fix-udpsocket' of ssh://github.com/paul-szczepanek-arm/mbed-os into rollup
2018-10-25 21:49:36 -05:00
Amanda Butler
6db0f67690
Edit InternetSocket.h
...
Edit file, mostly for branding, commas and U.S. spelling.
2018-10-25 14:49:48 -05:00
Amanda Butler
c02f2164d5
Edit UDPSocket.h
...
Edit file, mostly for minor spelling to existing text.
2018-10-25 11:02:48 -05:00
paul-szczepanek-arm
446ab5d592
review fixes
2018-10-25 16:28:19 +01:00
Paul Szczepanek
85b9b23711
capitalisation
2018-10-25 11:30:59 +01:00
Paul Szczepanek
5241c3b38d
Update WiFiInterface.h
2018-10-25 11:24:11 +01:00
Paul Szczepanek
de261a4673
Update CellularBase.h
2018-10-25 11:22:13 +01:00
paul-szczepanek-arm
4f2645b3fc
incorrect doc was copy pasted
...
replaced with copydoc instead
2018-10-24 20:57:25 +01:00
paul-szczepanek-arm
3929f5630b
missing doxy
2018-10-24 20:54:08 +01:00
paul-szczepanek-arm
e31337dab7
remove redundancy and maintainance overhead
2018-10-24 20:49:28 +01:00
paul-szczepanek-arm
5837e3771e
return codes
2018-10-24 20:35:53 +01:00
paul-szczepanek-arm
6cdda58cec
doxygen fixes
2018-10-24 20:24:33 +01:00
paul-szczepanek-arm
8a7d96c75f
doxy cleanup
2018-10-24 17:45:52 +01:00
paul-szczepanek-arm
fd0612b763
update internetsocket docs
2018-10-24 16:50:35 +01:00
Cruz Monrreal
b18c819837
Merge pull request #8519 from cmonr/rollup
...
Rollup PR - UK Docathon pt1
2018-10-24 09:32:46 -05:00
Martin Kojtal
7cd1478147
Merge pull request #8003 from Taiki-San/patch-2
...
Leverage the simplification of the IPv6 parsing primitive
2018-10-24 14:13:16 +01:00
Amanda Butler
0a82253cf5
Add comma to SocketAddress.h
...
Add comma to existing text.
2018-10-23 11:27:25 -05:00
Conrad Braam
e919511d98
Explain default port number, and construction
2018-10-23 15:01:28 +01:00
Taiki
3bc33f6c3e
Use the parsing status as a way to detect if the IP string represent a valid IPv6 address
2018-10-23 11:25:52 +02:00
Seppo Takalo
c7643ea9c8
Flag certificate verification functions with MBEDTLS_X509_CRT_PARSE_C.
...
If Mbed TLS support for X509 is not compiled in, this class would
not compile anymore. However, there might be other uses for it, even
if certificates are not used. Therefore add flagging for X509 only
on specific functions.
2018-10-19 12:32:12 +03:00
Cruz Monrreal
fc41c3d8e3
Merge pull request #8311 from SeppoTakalo/secure_socket
...
Implement TLSSocket
2018-10-17 12:24:09 -05:00
Seppo Takalo
5d1cd2552b
Check that MBEDTLS_ERROR_C is defined before using mbedtls_strerror().
...
If MBEDTLS_ERROR_C is not defined, that strerror function does not
exist, or is just dummy definition if MBEDTLS_ERROR_STRERROR_DUMMY is
defined.
2018-10-17 11:45:31 +03:00
Deepika
f58e103758
Netsocket: Add required header file and namespace element instead add all
2018-10-15 10:57:21 -05:00
Cruz Monrreal
00f8ecfb7a
Merge pull request #8336 from sentinelt/socket-closed
...
Fix hard-fault when socket created using accept() is closed
2018-10-15 10:22:17 -05:00
Seppo Takalo
7f39bb4453
Implement TLSSocket
...
Provide TLSSocket implementation. This implementation allows TLSSocket
to wrap around any existing socket. Currently only TLS supported. DTLS
not yet implemented.
Design document also provided with the implementation.
Documentation submitted to Mbed OS handbook.
2018-10-15 13:31:36 +03:00
Kevin Bracey
1ef213ec89
Clean up Thread deprecation warnings
...
Static Thread methods and signal methods have been deprecated. Remove
all references in the main code, and most of the tests. Some tests of
the deprecated APIs themselves remain.
2018-10-12 14:57:13 +03:00
Cruz Monrreal
2a91a91313
Merge pull request #8219 from jeromecoutant/PR_EMAC_SLEEP
...
STM32 EMAC : lock deep sleep
2018-10-11 10:10:32 -05:00
Cruz Monrreal
21b4ecad1a
Merge pull request #8316 from michalpasztamobica/master
...
unittests: Add tests for netsocket classes
2018-10-10 10:11:12 -05:00
Cruz Monrreal
b2f00fb416
Merge pull request #8179 from kivaisan/add_default_cellular_sim_pin
...
Add missing SIM PIN configuration item
2018-10-08 10:12:41 -05:00
Michal Paszta
5b4634a1fe
unittests: Added tests for netsocket classes
...
New classes covered with unit tests: SocketAddress, EthernetInterface, EMACInterface, WiFiAccessPoint.
Also added missing namespace in front of mbed::Callback usages.
EMACInterface is covered by the EthernetInterface unit tests.
2018-10-08 14:21:01 +02:00
Sławek Piotrowski
9b89ad2fa9
Fix hard-fault when socket created using accept() is closed
...
When socket created using accept() is closed by calling the close()
method, "delete this" is executed which triggers the destructor call
on TCPSocket which in turn calls close() once again. Because _stack
is already 0 this results in a hard-fault.
Add a check that skips the rest of the close() method is the _stack
is already 0.
2018-10-06 21:15:29 +02:00
jeromecoutant
79bef6e2c8
STM32 EMAC : lock deep sleep
2018-09-21 15:14:38 +02:00
Steven
9a0fc98bdc
Hotfix for PR #7778
...
TB_SENSE_12 would have been left behind by the changes in #7778 . This commit implements the changes in mbed to allow targets to provide a default network interface for Silicon Labs targets.
2018-09-19 12:30:21 +02:00
Kimmo Vaisanen
95114fe8ed
Add missing SIM PIN configuration item
2018-09-19 12:24:46 +03:00
Cruz Monrreal
c356f1f9d4
Merge pull request #7883 from juhaylinen/fix-netsocket-warning
...
netsocket: Fix compiler warning
2018-09-18 11:42:21 -05:00
Cruz Monrreal
8475477ca7
Merge pull request #7992 from SeppoTakalo/fix-tcpsocket-accept
...
Fix TCPSocket::accept()
2018-09-14 11:49:06 -05:00
Juha Ylinen
4ea49f5580
Fix TCPServer::accept()
...
Missing lock caused Mutex unlock failure
2018-09-07 10:46:25 +03:00
Cruz Monrreal
06106297a4
Merge pull request #6293 from Taiki-San/patch-1
...
Reduce .text footprint of the network stack
2018-09-05 10:16:04 -05:00
Seppo Takalo
451852d19f
Fix TCPSocket::accept()
...
This one was actually always return NULL, and unsted because we only
have tests with one device.
We will add the testcase for this soon
2018-09-05 12:00:59 +03:00
Martin Kojtal
44925d8527
Merge pull request #7579 from u-blox/ublox_odin_driver_os_5_v3.0.0_rc1
...
Updated ODIN drivers to v3.0.0 RC1
2018-09-03 09:25:32 +02:00
Seppo Takalo
1ef04796ee
On KW24D and NCS36510 default to smaller Nanostack configuration
...
These boards do not fit the full Nanostack, so we need to select
6LoWPAN-ND as a default.
2018-09-01 12:37:46 -05:00
Ammad Rehmat
b934632653
Access Point API
2018-08-31 11:33:30 +05:00
Taiki
758f6d2e83
Switch the IPv4 parser to the one recently introduced in libservice. Return a bool value on wether parsing of the IPv4 address string was successful
2018-08-28 14:00:54 +02:00
Seppo Takalo
c5064a8e33
Fix *MeshInterface::get_default_instance()
...
This was returning object, instead of pointer.
Also it was trying to call lowpan(reference), instad of lowpan(ptr).
2018-08-28 11:02:58 +03:00
Juha Ylinen
b8b39ac3ab
netsocket: Fix compiler warning
...
[Warning] InternetSocket.h@237,10: 'InternetSocket::_factory_allocated' will be initialized after [-Wreorder]
[Warning] InternetSocket.h@236,23: 'volatile unsigned int InternetSocket::_pending' [-Wreorder]
[Warning] InternetSocket.cpp@22,1: when initialized here [-Wreorder]
2018-08-24 13:26:53 +03:00
Steven
1cfddb73b7
Fix stack size for LwIP on EFM32GG11
...
Typo in the config file made the LwIP stack way too small on EFM32GG11 STK3701 target. Additionally, the EMAC thread stack was slightly too small when debug printing is on.
2018-08-19 14:39:58 +02:00
Martin Kojtal
88a7416941
nsapi: astyle block fix
2018-08-06 09:59:08 +01:00
Martin Kojtal
b46aa6108d
netsocket: astyle fix
2018-08-03 13:34:33 +01:00
Cruz Monrreal
63f62165d8
Merge pull request #7565 from OpenNuvoton/nuc472_emac_rst
...
Nuvoton: Fix NUC472 SD-Host HW IP reset definition
2018-07-31 11:44:01 -05:00
cyliangtw
2fcbcf1789
Initialized return value of numaker_emac link-out
2018-07-31 12:01:43 +08:00
Seppo Takalo
96a90c2f2f
Allow legacy TCPServer::accept() to override inherited Socket::accept()
2018-07-24 18:06:04 +03:00
cyliangtw
7ea02d95a3
Add error handling for getting null tx buffer
2018-07-20 18:23:54 +08:00
Steven Cooreman
da377c6ed3
Add EFM32GG11 Ethernet driver
2018-07-11 18:13:04 +02:00
Cruz Monrreal
93233c4f5d
Merge pull request #7364 from 0xc0170/fix_storage_rtos
...
Fix storage rtos types - remove including internal header file
2018-07-05 14:29:46 -05:00
Tero Jääskö
2e89fa22a5
netsocket: dns: make dns-cache-size:0 remove whole DNS cache code
...
Setting ""nsapi.dns-cache-size": 0" still left some of the DNS
caching code in. Add crude #if to remove all of it.
This allows one to save 429 bytes of flash and 48 bytes of RAM on
ARMC5 builds.
2018-06-29 18:17:19 +03:00
Martin Kojtal
4d8baa7451
emac targets: fix thread cb type
2018-06-29 08:35:20 +01:00
Cruz Monrreal
cb000ceeab
Merge pull request #7336 from SeppoTakalo/fix_udp_filtering
...
Fix connected UDPSocket filtering
2018-06-28 10:06:52 -05:00
Martin Kojtal
82b490b0cf
kinetis: fix rtos storage type for thread
2018-06-28 15:11:00 +01:00
jeromecoutant
6391b7f2fa
TARGET_STM_EMAC astyle
2018-06-27 15:00:51 +02:00
Seppo Takalo
f2c0c4e248
Fix connected UDPSocket filtering
...
Was dropping all packets from connected peer
2018-06-26 17:01:19 +03:00
Seppo Takalo
1ca9ccda73
Filter incoming UDP packets based on connected peer address.
2018-06-20 12:38:07 +03:00
Seppo Takalo
e7cb4752fa
Fix small issues from the review
2018-06-20 12:38:07 +03:00
Seppo Takalo
2b60e42756
Close Doxygen group at the end of file
2018-06-20 12:38:07 +03:00
Seppo Takalo
96ef8e345d
Move string allocation to a point where get_ip_address() is called
...
This saves RAM/stack on typical socket usage where human readable
format is not exchanged so often.
2018-06-20 12:38:07 +03:00
Seppo Takalo
407b2f275d
Move accept() to abstract socket class and implement in TCPSocket
...
Deprecate TCPServer in favor of just TCPSocket::accept()
2018-06-20 12:38:07 +03:00
Seppo Takalo
cdbe43c0d5
Refactor Sockets by moving functions up into common base.
...
* Move IP Socket stuff to InternetSocket class which is inherited by TCP/UDP
* Implement sendto() and recvfrom() on TCP socket
* Implement connect() call on UDP
* Implement send() and recv() calls on UDP socket
2018-06-20 12:38:06 +03:00