Commit Graph

3142 Commits (361fc65f08536e54d0269e10a36992e44f1cf6a5)

Author SHA1 Message Date
Cruz Monrreal 12211178c3
Merge pull request #7179 from c1728p9/fix_unsupported_k64f
Fix USB on Kinetis devices
2018-06-11 16:46:13 -05:00
David Saada 4af2c9d483 Support erasing of more than one erase unit in the exhaustible block device 2018-06-11 19:40:35 +03:00
Cruz Monrreal 093a6066c2
Merge pull request #7158 from kjbracey-arm/thread-eui64
Add API to read Thread EUI-64
2018-06-11 10:21:22 -05:00
Cruz Monrreal 1b14351e28
Merge pull request #7084 from AriParkkila/cellular-debug
Cellular: Enable AT debug also when mbed-trace is disabled
2018-06-11 09:06:53 -05:00
Cruz Monrreal 5e8a0a853a
Merge pull request #7097 from TeemuKultala/random_port
cellular: random socket port number
2018-06-11 08:57:47 -05:00
Cruz Monrreal de99c0f3a3
Merge pull request #7160 from jarvte/ppp_lwip_disconnect_hangs
Fixed ppp_lwip_disconnect hangs when connection failure.
2018-06-11 08:50:27 -05:00
Cruz Monrreal 02e90ef469
Merge pull request #7163 from pan-/cordio-driver-hook
Cordio driver hook
2018-06-11 08:49:49 -05:00
Cruz Monrreal a78208166c
Merge pull request #7164 from davidsaada/david_fix_nvstore_readme_apis
Fix NVStore README file (changed APIs)
2018-06-11 08:47:39 -05:00
Cruz Monrreal b00a91d15b
Merge pull request #6938 from hasnainvirk/style_and_bug_fixes
LoRaWAN: Style and bug fixes
2018-06-11 08:46:52 -05:00
Cruz Monrreal 3206b81437
Merge pull request #6978 from OpenNuvoton/nuvoton_m23_tz_module
Support default tz_module in event loop thread for M23/M33
2018-06-11 08:44:21 -05:00
Cruz Monrreal 8c6a664380
Merge pull request #7086 from mikaleppanen/nxp_lpc17xx_emac
NXP lpc17xx emac driver
2018-06-11 08:43:43 -05:00
Cruz Monrreal ef86bf97b8
Merge pull request #7121 from kjbracey-arm/ns-emac-hardfault
Nanostack EMAC - avoid initialisation race
2018-06-11 08:42:03 -05:00
Cruz Monrreal 2ac81de533
Merge pull request #7141 from kjbracey-arm/kinetis-mem-conf
Kinetis EMAC: Make number of buffers configurable
2018-06-11 08:41:14 -05:00
Cruz Monrreal ddf5a1d8b8
Merge pull request #7147 from mikisch81/uvisor-fix
Upgrade uvisor to v0.31.1
2018-06-11 08:39:47 -05:00
Cruz Monrreal 084e747160
Merge pull request #7173 from kjbracey-arm/ns-init
Make Nanostack C++ constructor initialise Nanostack
2018-06-11 08:31:02 -05:00
Ari Parkkila 150a204e2b Cellular: Disable Greentea tracing to consume less memory 2018-06-11 12:57:26 +03:00
Yoshihiro TSUBOI 0751dd7c95 [Wio 3G] Changed suggested things
Removed context check from do_user_authentication.
2018-06-11 15:20:15 +09:00
Amanda Butler b983ca98cb
Copy edit README.md
Tweak bullet's phrasing to clarify meaning
2018-06-08 11:05:49 -05:00
Russ Butler 96d3667f20 Fix USB on Kinetis devices
Set correct SYSMPU register for proper USB operation.  This bug was
introduced when the SYSMPU register names and defines were updated
in the commit:
"K64F: Updated the SYSMPU SDK driver"
93f8cfed05
2018-06-08 10:56:09 -05:00
Yoshihiro TSUBOI 16e706ecd4 [Wio 3G] Changed suggested points
Changed accessibility cellular features member functions, fixed minor target issues
2018-06-08 20:13:58 +09:00
Kevin Bracey e06923c64a Make Nanostack C++ constructor initialise Nanostack
Nanostack object constructor didn't actually initialise Nanostack.
Nanostack initialisation was deferred until an interface was actually
attached to the stack, which generally happened at first interface
connect.

Not normally a problem, unless you're trying to make direct Nanostack
setup calls prior to connect - some applications do this, and were
relying on ThreadInterface::initialise to do Nanostack
initialisation.

Unfortunately in 5.9 ThreadInterface::initialise no longer does
initialise Nanostack immediately, because the mesh interfaces were
aligned and integrated with the Ethernet interfaces, which did
initialisation on connect().

Make the Nanostack object constructor initialise Nanostack (as the LWIP
constructor does for lwIP), so calling Nanostack::get_instance() is the
5.9 API for Nanostack initialisation.

For future work, APIs like ns_file_system_set_root_path should be
exposed as methods of Nanostack, so everything happens with a single
Nanostack::get_instance().file_system_set_root_path().
2018-06-08 13:00:58 +03:00
Teppo Järvelin b35dc6a582 Review fix:
- set ppp_active false if close fails in ppp disconnect.
- unset sigio in ppp disconnect
- take ownership of filehandle in CellularNetwork::disconnect even in case of failure
2018-06-08 12:29:50 +03:00
Martin Kojtal 73cfc7baea
Merge pull request #7135 from k-stachowiak/update-mbedtls-2.10.0-rc1
Update Mbed TLS to version 2.10.0
2018-06-08 10:18:06 +02:00
Cruz Monrreal fd6f3cd4a4
Merge pull request #7144 from k-stachowiak/add-cmac-to-mbedtls
Add configuration options to enable CMAC in mbedtls by default
2018-06-07 14:44:22 -05:00
paul-szczepanek-arm bd8572e20f missing return
function would potentially send a reject and accept at the same time
2018-06-07 17:18:08 +01:00
Cruz Monrreal e10a3b306d
Merge pull request #7120 from mikaleppanen/dns_fail_corr
Fixed DNS resolution in case all sendto operations fail
2018-06-07 10:13:03 -05:00
Cruz Monrreal bacf6a9dec
Merge pull request #6860 from andrewleech/nordic_ble_config
Nordic BLE: Allow configuration of softdevice parameters
2018-06-07 10:10:23 -05:00
David Saada 099b924b13 Fix NVStore README file (changed APIs) 2018-06-07 15:34:52 +03:00
Vincent Coubard 06d9aac14c Cordio BLE: Allow replacement of hci RX handler. 2018-06-07 12:30:34 +01:00
Vincent Coubard 569fd9ed30 Cordio BLE: Add hook to HCI driver and transport.
A friend class living in the namespace ble::vendor::cordio and named CordioHCITransportDriver can be added in applications requiring access to internal data of the HCI driver and HCI transport driver.

This is meant to be internal and not easily exploitable by application code.
2018-06-07 12:29:57 +01:00
Kevin Bracey 45e24d4682 Correct PPPCellularInterface::get_gateway()
Two cascading copy-paste errors stopped this working:

  * PPPCellularInterface::get_gateway() called
    nsapi_ppp_get_ip_address();
  * nsapi_ppp_get_gateway() called the interface's get_netmask().

First bug has always been there - second one was introduced in 5.9.

AT_CellularNetwork currently lacks calls to get both netmask and gateway
- this patch would be needed for that when added.
2018-06-07 14:28:19 +03:00
Teppo Järvelin dab4215a9a Fixed ppp disconnect hangs when connection failure. 2018-06-07 12:47:01 +03:00
Kevin Bracey fc5c2fa84b Add API to read Thread EUI-64
Previously get_mac_address on a ThreadInterface returned the EUI-64
reported by the radio driver. This was required for commissioning, but
was inconsistent with other interfaces, and the API concept.

5.9.0 inadvertently changed this so that get_mac_address returned the
actual MAC address used by the radio, which is a hash result of the
EUI-64 for Thread.

The original "return the EUI-64" form was somewhat faulty, as
get_mac_address would not return the EUI-64 set by set_device_eui64() or
another mechanism before connect() was called.

Rather than revert to old behaviour, add a new API to get the device
EUI-64 to ThreadInterface, alongside the existing set API.
2018-06-07 12:17:03 +03:00
Krzysztof Stachowiak 843b1a19e7 Update Mbed TLS after corrections for the import procedure 2018-06-07 10:25:21 +02:00
Krzysztof Stachowiak 7eeb694dd9 Update MbedTLS to 2.10.0 (from an RC) 2018-06-06 17:31:18 +02:00
Krzysztof Stachowiak 8c9a967ef2 Improve the documenting comment in a config adjustment script 2018-06-06 15:33:28 +02:00
Michael Schwarcz a5a1d1170e Upgrade uvisor to v0.31.1 2018-06-06 15:18:24 +03:00
Krzysztof Stachowiak 9c6a85a6e9 Add configuration options to enable CMAC in mbedtls by default 2018-06-06 13:36:28 +02:00
Mika Leppänen 97de145adf Added missing license to header of the file 2018-06-06 14:29:49 +03:00
Mika Leppänen 03541dfc2f Added UBLOX_C027/ARCH_PRO memory configurations 2018-06-06 14:29:49 +03:00
Mika Leppänen a8402256a3 Corrected TX buffer reclaim error
When all TX descriptors were reserved in a row so that TX buffer
reclaim interrupt did not happen during reservation sequence, after
the interrupt occurred, TX buffer reclaim did no longer free buffers.

This happened because when all descriptors were in use, last free
index pointed to consumed index.
2018-06-06 14:29:49 +03:00
Mika Leppänen a5a8b350ce Ported NXP LPCxx ethernet driver to unified EMAC 2018-06-06 14:29:49 +03:00
Kevin Bracey a8e8775aa9 Kinetis EMAC: Correct TX ring pointer array size
TX pointer array was using RX ring length in its declaration.
Wasted memory if RX ring > TX ring, as is the default, but would
be broken if RX ring < TX ring.
2018-06-06 13:30:01 +03:00
Kevin Bracey 30e68f3201 Kinetis EMAC: Make number of buffers configurable
16 RX buffers and 8 TX buffers is probably excessive. Nanostack
version of driver successfully used 4+4, and data pump should be
broadly equivalent.

This means that switching K64F devices from Nanostack to EMAC increases
base heap usage by 18K - observed in Nanostack border router builds.

Add a config option to make it possible to lower the number of buffers.
Defer consideration of lowering the default to later.
2018-06-06 13:30:01 +03:00
Krzysztof Stachowiak f85e3f6177 Update Mbed TLS do version 2.10.0-rc1 2018-06-06 09:13:06 +02:00
paul-szczepanek-arm 265132c5a8 check that flags have the IRK stored before retrieving it 2018-06-05 15:15:19 +01:00
Kevin Bracey 852445a364 Nanostack EMAC - avoid initialisation race
Hard fault was possible if packet reception occurred during
initialisation. Adjust start-up ordering and add NULL check to
avoid.
2018-06-05 17:02:34 +03:00
Kevin Bracey 6c6bcc3575 NSAPI: Use IPv6 conversion routines from frameworks
Share IPv6 conversion code with mbed_trace, Nanostack and
mbed client.

Output formatting is better, being conformant to RFC 5952.
2018-06-05 15:31:18 +03:00
Martin Kojtal ade3d0c77d
Merge pull request #7095 from yossi2le/device-key-fix-coverity-issues
Fixing some coverity issues.
2018-06-05 14:15:21 +02:00
Mika Leppänen 9ec1ec90d9 Fixed DNS resolution in case all sendto operations fail
DNS resolver now counts how many sendto operations are successful
during one DNS server attempt cycle (attempting to contact DNS
servers from 0 to last index, including stack specific ones). If all
socket sendto operations fail, DNS resolution is aborted.

If one or more are successful, DNS resolution is continued until
total network attempts count is reached or all sendto operations
fails during a cycle.
2018-06-05 14:29:48 +03:00
Teemu Kultala d3a46eb7cd more effective port randomisation 2018-06-05 13:25:59 +03:00
Cruz Monrreal 20a4412082
Merge pull request #7089 from paul-szczepanek-arm/fix-master
BLE fixes (SM whitelist creation, Nordic scatter file fix, missing TLS initialisation)
2018-06-04 10:44:54 -05:00
Cruz Monrreal d559ed6d0e
Merge pull request #7072 from kfnta/edit_uvisor_depr
Edit warning about FEATURE_UVISOR being deprecated
2018-06-04 10:41:29 -05:00
Cruz Monrreal 0ae41b1def
Merge pull request #7074 from RonEld/remove_redundant_libraries
Remove redundant Cryptocell libraries
2018-06-04 10:41:05 -05:00
Anna Bridge 2d0e5f04b1
Merge pull request #6022 from andrewleech/nrf_asserts_error
nrf5x: Enable asserts -> mbed_error
2018-06-04 12:24:58 +01:00
Teppo Järvelin 9a3c3b531f Cellular: fixed unit tests to compile after rebasing to latest. 2018-06-04 13:27:50 +03:00
Teppo Järvelin 3311a6e456 Cellular: added more unit tests for CellularDevice. 2018-06-04 10:25:54 +03:00
Teppo Järvelin 2aa5c32aa4 Cellular: added greentea test for cellular device. 2018-06-04 10:25:54 +03:00
ytsuboi e5b8591818 [Wio 3G] Adding platform 2018-06-04 15:55:43 +09:00
Teemu Kultala b7bad77569 random socket port number 2018-06-04 09:53:34 +03:00
Cruz Monrreal 66e3409a37
Merge pull request #7082 from anttiylitokola/master
Update mbed-coap to version 4.4.4
2018-06-03 12:46:13 -05:00
Yossi Levy 607e2ec28f Fixing some coverity issues. 2018-06-03 17:34:52 +03:00
Cruz Monrreal 0aeb15037d
Merge pull request #7075 from donatieng/fix_cordio_h4_serial
BLE: Replace Serial with RawSerial in Cordio H4 Transport Driver
2018-06-02 19:54:42 -05:00
Vincent Coubard 4d0126898c BLE Nordic: Initialize and teardown tls platform context 2018-06-01 17:12:49 +01:00
Joris Aerts 1fb57a3d38 Add non-blocking write function for USBCDC 2018-06-01 18:04:04 +02:00
paul-szczepanek-arm e534f3b997 fix erroneous assert 2018-06-01 15:57:51 +01:00
paul-szczepanek-arm ff7b13837f check for invalid param 2018-06-01 15:57:39 +01:00
paul-szczepanek-arm 3a2dc69f11 fix not updating size of array 2018-06-01 15:57:22 +01:00
Anna Bridge b5b306ed50
Merge pull request #7052 from mirelachirica/bc95_sock_id_fix
Cellular: BC95 socket creation to fail on missing socket id in the re…
2018-06-01 12:14:14 +01:00
Ari Parkkila 7482032989 Cellular: Enable AT debug also when mbed-trace is disabled 2018-06-01 14:07:27 +03:00
Kimmo Vaisanen 0f0b3be7e9 Lora: Check for valid ABP params
Check that ABP dev_addr and nwk_id is non-zero and keys are not null.
2018-06-01 12:41:16 +03:00
Hasnain Virk 493ae2bd91 dr_range bitfield should be unsigned integer
If the value is an integer, the 4th bit is used for sign, so you can store
values upto 7 only whereas the datarate values could go upto 15. That's why
we need to turn this to an unsigned integer so that the last bit can also be used.
2018-06-01 12:41:15 +03:00
Hasnain Virk 9ac7f21140 Style changes only
Travis astyle check pointed out some of the style mismatches in the code.
Not all of them are worth changing as they make the code unreadable and
some of them are semantically wrong.

So in this commit, we have attempted to pick the most important style
mismatches and rectify.
2018-06-01 12:41:09 +03:00
Hasnain Virk e438846c2d Moving missing public data structures
A few of the structures were missing from the storage space which is
visible topublic APIs. Suc structures are now being added.
2018-06-01 12:30:07 +03:00
Kimmo Vaisanen d3327c3f5a Lora: All API methods should check if stack has been initialized 2018-06-01 12:29:25 +03:00
Antti Yli-Tokola 7b1484fb11 Update mbed-coap to version 4.4.4
Fixes one error: IOTCLT-2638 Hardfault during reconnection retry with Thread
2018-06-01 10:04:10 +03:00
Andrew Leech bf313aa1db Move mbed_lib.json from targets folder to feature_ble folder
The functionality added all affects BLE features in use so this location is a better fit.
2018-06-01 13:37:16 +10:00
Andrew Leech ff5ca11253 Allow configuration (via defines) of some of the key settings for the NRF51 softdevice.
* CENTRAL_LINK_COUNT
* PERIPHERAL_LINK_COUNT
* gatts_enable_params.attr_tab_size
* gatts_enable_params.service_changed
* common_enable_params.vs_uuid_count

These settings control the range of functionality enabled in the softdevice as well as ram consumption.
In particular reducing these values is critical to enable usage of 16K nrf51 devices.
2018-06-01 13:23:01 +10:00
Donatien Garnier 5da5ef45c0 Cordio H4: Added some comments explaining the use of RawSerial as opposed to using Serial 2018-05-31 11:11:28 -05:00
Donatien Garnier 0cb86ded76 BLE: Replace Serial with RawSerial in Cordio H4 Transport Driver 2018-05-31 10:28:45 -05:00
Ron Eldor 9049860b25 Remove redundant Cryptocell libraries
Remove additional redundant libraries, that were accidently added in merges
2018-05-31 18:15:25 +03:00
Oren Cohen a4f323c4a6
Update uvisor_deprecation.h 2018-05-31 16:56:44 +03:00
Oren Cohen 2cba4cc585 Edit warning about FEATURE_UVISOR being deprecated 2018-05-31 15:37:48 +03:00
Veijo Pesonen aafeef7401 gethostbyname won't accept empty name
Considers both versions - synchronous and asynchronous. Earlier the
underlying stack was trusted to do this check.
2018-05-30 12:07:07 +03:00
Cruz Monrreal 24cebbaec3
Merge pull request #7016 from mikaleppanen/async_dns_corr
Corrected asynchronous DNS functionality
2018-05-29 10:48:17 -05:00
Cruz Monrreal 0f41831afd
Merge pull request #7033 from AriParkkila/cellular-at-fix
Cellular: Fix AT URC handler not to dismiss incoming chars
2018-05-29 10:44:00 -05:00
Cruz Monrreal 7418260b78
Merge pull request #7014 from KariHaapalehto/interface_check
Add check for _interface
2018-05-29 10:42:19 -05:00
Cruz Monrreal 206cab97ac
Merge pull request #6965 from mirelachirica/fix_unittests
Cellular: Unit tests fixes
2018-05-29 10:37:35 -05:00
Cruz Monrreal 917fe08752
Merge pull request #6928 from jarvte/fix_cellular_connect_disconnect
Cellular: Fixed con-disc sequence can now be called multiple times.
2018-05-29 10:36:11 -05:00
Mirela Chirica 5c2262219d Cellular: BC95 socket creation to fail on missing socket id in the response 2018-05-29 17:05:16 +03:00
Martin Kojtal 5d8570be39
Merge pull request #7030 from kjbracey-arm/emac_ppp_fix
Fix lwIP PPP glue
2018-05-28 15:19:12 +02:00
Martin Kojtal 501a7b6949
Merge pull request #7009 from bulislaw/merge_feature_branches_for_5.9
Bring in improved HAL APIs to master
2018-05-28 12:31:14 +02:00
Ari Parkkila c8287e5470 Cellular: Fix AT URC handler not to dismiss incoming chars 2018-05-28 10:32:14 +03:00
Kevin Bracey cedbf72a3b Fix lwIP PPP glue
EMAC changes broke PPP glue - fix it up. In particular, PPP steals
the netif->state pointer, so we can't use it as a back pointer to
our LWIP::Interface.
2018-05-28 10:30:42 +03:00
Cruz Monrreal e3aa140aaa
Merge pull request #6981 from yogpan01/master
Remove ns_event_loop_thread_start() from NDInterface and ThreadInterface connect()
2018-05-25 16:51:04 -05:00
Cruz Monrreal 5709c04cae
Merge pull request #7019 from mikaleppanen/lwip_lpc_mem_conf
Made lwip memory configuration more specific for NXP targets
2018-05-25 12:47:29 -05:00
Bartek Szatkowski a92ff94904 Fix rebase error 2018-05-25 12:20:10 -05:00
Cruz Monrreal c0895cb832
Merge pull request #6910 from hasnainvirk/metadata
LoRaWAN: Adding acquisition of metadata, backoff and a cancel_send() API
2018-05-25 11:11:50 -05:00
Martin Kojtal 7031ab1c1f
Merge pull request #7015 from SeppoTakalo/fix_odin
Fix build for MBT_ODIN_W2 and MBED_CONNECT_ODIN when using WiFi
2018-05-25 16:29:54 +02:00
Cruz Monrreal 61eb0e170d
Merge pull request #7012 from ARMmbed/AnotherButler-patch-1
Enable DeviceKey class reference for Doxygen
2018-05-25 08:25:17 -05:00
Cruz Monrreal a348b4583d
Merge pull request #7000 from kfnta/uvisor_depr
Add warning about FEATURE_UVISOR being deprecated
2018-05-25 08:24:26 -05:00
Mika Leppänen 7a1703de23 Made lwip memory configuration more specific for NXP targets
There is a configuration problem with UBLOX_C027 cellular because of missing
LWIP memory configuration for the target.

Added configuration for LPC1768, LPC4088, LPC4088_DM targets and changed
NXP to more specific LPC546XX.
2018-05-25 12:48:35 +03:00
Kari Haapalehto 8540b1ea23 Add check for _interface 2018-05-25 12:16:00 +03:00
Mika Leppänen d648bf8477 Corrected asynchronous DNS functionality
- Set network stack to store event queue so that mbed::mbed_event_queue() call
  is not needed every time call_in() is called
- Added dns state variables and enum (states are: created, initiated and cancelled)
- Corrected DNS response handling so that if DNS server returns that host name is
  unknown the DNS query is not tried again
- Reorder mutexes in nsapi_dns_query_multiple_async()
- Created nsapi_dns_query_async_initiate_next() function to initiate the next
  DNS query from the queue after delete of previous query
- Added dsn_timer_running variable to supervise DNS timer start/stop
- Changed cancel function to only mark query as deleted and moved deletion
  to timer function. This allows to run socket close on DNS thread
- Added new nsapi error NSAPI_ERROR_TIMEOUT for DNS (and other) timeouts
2018-05-25 11:21:52 +03:00
Seppo Takalo f989f6838b Fix build for MBT_ODIN_W2 and MBED_CONNECT_ODIN when using WiFi
Odin WiFi driver was only supplied for EVK board.
These all are just the same module, so using the main target name
that all inherit.
2018-05-25 10:54:09 +03:00
Cruz Monrreal 25fb8e3cf0
Picking a deprecation warning and moving forward 2018-05-24 19:49:35 -05:00
Amanda Butler 44dc8624d5
Enable DeviceKey class reference for Doxygen
Add conditional, so Doxygen renders properly.
2018-05-24 18:59:12 -05:00
Cruz Monrreal 5ce26b1306
Merge pull request #6927 from AriParkkila/cellular-debug
Cellular: AT debugging improved
2018-05-24 12:35:06 -05:00
Cruz Monrreal 527f9a12fd
Merge pull request #6983 from SenRamakri/sen_ErrorHandling_Push2
Standardized Error Handling and Error Codes
2018-05-24 10:57:00 -05:00
Cruz Monrreal 791620c428
Merge pull request #6932 from paul-szczepanek-arm/security-manager-dev
BLE privacy, signing, persistent security database
2018-05-24 10:07:06 -05:00
Cruz Monrreal 06180e89f7
Merge pull request #6642 from yossi2le/yossi-device-key-driver
Device key implementation
2018-05-24 10:06:14 -05:00
Cruz Monrreal 2f86c152f0
Merge pull request #6794 from RonEld/cc310_porting
Cryptocell 310 support
2018-05-24 10:05:46 -05:00
Kevin Bracey 13dcef63e3
Merge pull request #6847 from ARMmbed/feature-emac
Merge feature-emac branch into master
2018-05-24 16:47:04 +03:00
Hasnain Virk 9973eb3e79 Stability improvements & CRYPTO_ERROR addition
General stability improvements are performed.
A flag is added if a Class C RX2 window is open.
We shouldn't open it again if its already opened.

TX_CRYPTO_ERROR is renamed to CRYPTO_ERROR.
Keeping TX_CRYPTO_ERROR for backwards compatibility.
2018-05-24 15:59:07 +03:00
Hasnain Virk 0feb0efb89 Adding checks for stack initialization
Metadata APIs should return an error if the stack is not initialized yet.
2018-05-24 15:54:32 +03:00
Hasnain Virk 3020d658bf Travis astyle corrections
The scope of style corrections is local to this PR only.
2018-05-24 15:54:32 +03:00
Hasnain Virk 2bc8e4e847 Adding ack expiry handling for class C
In Class C, rx timeout does not take place for RX2 windows, so if we have
not received anything, we would be retrying but if the no. of retries are
maxed out, and we have not recieved anything yet, we need a mechanism to
tell the upper layer that this has happened.
2018-05-24 15:54:32 +03:00
Hasnain Virk b0ce443f5b Doing away with rx_abort()
rx_abort() was sort of dead code as it was doing essentially nothing.
It might have actually meddled with the state machine if it was hit by
invoking on_ack_timeout_timer_event().

State machine and corresponding processors now take care of the ack timeout,
retries and all other bits, so we don't need abort_rx().
2018-05-24 15:54:32 +03:00
Hasnain Virk 375e1b711d Adding useful trace and setting no. of retries
MCPS confirmation should be filled with the current number of retries
if the ack is not recieved for a CONFIRMED message.

Ack retry number needs to be incremented after the retry is made not before
that.

A few traces are added at the crucial junctions of the code just to tally with
the conceptual flow for debug purposes.
2018-05-24 15:54:32 +03:00
Hasnain Virk 26b28f78af Adding ability to cancel outgoing transmission
Application can use cancel_sending() API to stop any outstanding, outgoing
transmission (a TX which is not already queued for transmission). This can
potentially enable use cases where the application could cancel a transmission
and go to sleep if the backoff period is long enough rather than waiting for
the transmission to happen.
2018-05-24 15:54:32 +03:00
Hasnain Virk 8363311c7a Adding acquisition of backoff time value
This API enables the application to get hold of remaining time after which
the transmission will take place. User can query the backoff time whenever
there is a packet in the TX pipe. If the event for the backoff expiry is
already queued, the stack does not provide backoff metadata.
2018-05-24 15:54:32 +03:00
Hasnain Virk 387f56c738 Adding acquisition of RX meta data
User can now inquire about any RX meta data available after a
successful reception.
2018-05-24 15:54:32 +03:00
Hasnain Virk 555d945a42 Adding acquisition of TX Meta-data
An API is added to fetch any meta-data available after a succesful
transmission. The stack will make the meta data available after the
TX interrupt is processed. User can get the tx meta data after receiving
TX_DONE event.
2018-05-24 15:54:32 +03:00
Danny Shavit aa38778a58 Add warning about FEATURE_UVISOR being deprecated 2018-05-24 13:46:30 +03:00
Martin Kojtal d8cb72a0a2
Merge pull request #6273 from bulislaw/update_cmsis_5.3
Update cmsis/rtx to version 5.3
2018-05-24 09:37:40 +02:00
Cruz Monrreal 863259e48b
Merge pull request #6960 from hasnainvirk/msg_flags
LoRaWAN: Message flags correction
2018-05-23 22:22:53 -05:00
Teppo Järvelin 03f50e6d89 Cellular: review fixes. 2018-05-23 22:02:01 +03:00
Senthil Ramakrishnan 5ef6728c08 Splitting MBED_ERROR macros to support ones with/without error value argument 2018-05-23 12:21:28 -05:00
Senthil Ramakrishnan 693a6c40bb Refactor error reporting 2018-05-23 12:21:11 -05:00
Senthil Ramakrishnan d4fe75731d Adding mbed prefixes to all macros and functions to avoid namespace conflicts 2018-05-23 12:21:10 -05:00
Senthil Ramakrishnan 147d9cac4e Test application/cases optimization for some low memory targets, macro changes and test fixes 2018-05-23 12:21:10 -05:00
Senthil Ramakrishnan 2e28dd95e1 Change set_error/set_error_fatal to warning/error, add itm support and other changes 2018-05-23 12:21:08 -05:00
Senthil Ramakrishnan 9041b475c6 Error handling/logging implementation and tests 2018-05-23 12:21:07 -05:00
Donatien Garnier f08ac2e9b2
Merge pull request #52 from pan-/fix-privacy-nrf52
Fix privacy nrf52
2018-05-23 11:50:28 -05:00
Vincent Coubard db4d14c89d BLE NRF52: Fix advertising filtering when no bonds are present. 2018-05-23 17:27:18 +01:00
Vincent Coubard ef208912a6 BLE NRF52: Report correct own address type for connection
The function that gets the address doesn't work when privacy is enabled; report own address as private resolvable.
2018-05-23 17:27:18 +01:00
Vincent Coubard 30dac7cd8c BLE NRF52: Fix identity address flag in connection request. 2018-05-23 17:27:07 +01:00
Vincent Coubard 1ba5a112f4 BLE: Fix wrong macro name for IAR 2018-05-23 17:11:26 +01:00
Cruz Monrreal eb9435b52e
Merge pull request #6772 from ARMmbed/g-littlefs-eilseq
littlefs: Map LFS_ERR_CORRUPT to EILSEQ
2018-05-23 10:12:19 -05:00
paul-szczepanek-arm de41355c5c Fix not processing all advertising reports if one is filtered out
filtering out individual reports instead of all
2018-05-23 14:24:54 +01:00
Paul Szczepanek f4b7f32793
Merge pull request #49 from pan-/fix-privacy-backward-compatibility
Fix privacy backward compatibility
2018-05-23 14:20:49 +01:00
Mirela Chirica 853c4c6dd1 Cellular: Added ENOTTY define in mbed_retarget stub 2018-05-23 12:31:17 +03:00
Asif Rizwan 657ac3f643 WIFI_EMAC class renamed to OdinWiFiEMAC, Formatting
Revert "in ODIN emac initialization required before connection"
2018-05-23 12:25:21 +03:00
Kevin Bracey 7e4eb5c24b LPC546XX: Correct Ethernet length calculations
Subtract 4 from the received packet length - the buffer contains the
CRC, which we shouldn't pass up.

Ensure we allocate receive buffers of a size corresponding to the
rounded-up size we tell the hardware - the hardware was overrunning the
allocation by a couple of bytes.
2018-05-23 12:25:21 +03:00
Mahesh Mahadevan fc0ce8cb72 Add memory configuration for LPC546XX
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-05-23 12:25:20 +03:00
Mahesh Mahadevan 91ac8356ba LPC546XX: Add ENET support
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-05-23 12:25:20 +03:00
Asif Rizwan 0b14f1277e EMAC adaption added, updated ODIN drivers to v2.5.0 RC1 2018-05-23 12:25:18 +03:00
Mika Leppänen ede07217df Corrected lwip netif flags to be set before power up
This enables that link up status callback can be called inside
power up function.
2018-05-23 12:25:17 +03:00
Kevin Bracey f3ec0dacd5 Add NetworkInterface::get_default_instance()
Provide an initial framework to make it easier to find a default network
interface.
2018-05-23 12:25:17 +03:00
Mika Leppänen e481c5ef75 Added memory manager set to add_ethernet_interface() of test stack
This allows that EMAC memory manager can be used to allocate EMAC driver
memory already after the add_ethernet_interface() call.
2018-05-23 12:24:11 +03:00
Mika Leppänen 31b8f73de7 Changed mutexes, delete and DNS call in callback set
- Changed mutexes to platform mutexes
- Removed not needed null check from delete
- Changed nsapi_dns_call_in_set() to use call_in_callback_cb_t and
added prototype to header
2018-05-23 12:24:10 +03:00
Mika Leppänen c4424ff0a1 Corrected more defects
- Serialized the sending of multiple async DNS queries since limits on event
message box sizes
- Added timer function that supervises the total time used to make DNS query
and triggers socket timeouts
- Changed nsapi_error_t to new nsapi_value_or_error_t on interface headers
- Corrected wording of gethostbyname_async return values
- Clarified .json options
- Added a new data type for socket callback that can be used from interrupts
- Corrected variable limits to use INT32_MAX etc. defines
- Changed mallocs to new
- Optimized variable sizes on DNS_QUERY definition
2018-05-23 12:24:10 +03:00
Mika Leppänen 1c01f5dda4 Corrected defects
- Changed call_in/call methods of the stack to callback provided by the stack
- Specified what are limitations for operations that are made in callback
- Added pure virtual class DNS that defines DNS operations
- Added cancel operation and unique ID to DNS request used in cancel
- Added DNS configuration options to netsocket/mbed_lib.json for retries,
  response wait time and cache size
- Changed host name to use dynamic memory in DNS query list and cache,
  set maximum length for the name to 255 bytes.
- Added mutex to asynchronous DNS
- Reworked retries: there is now total retry count and a server specific count
- Ignores invalid incoming UDP socket messages (DNS header is not valid), and retries DNS query
- Reworked DNS module asynchronous operation functions
- Corrected other review issues (nothrow new, missing free, missing mutex unlock etc.)
2018-05-23 12:24:10 +03:00
Mika Leppänen b7e8400c2c Added non-blocking DNS functionality to network interface
- Added non-blocking DNS interface to network interface and
  network stack.
- Added caching of DNS replies.
- Added a network stack function to get DNS addresses from stack.
- Added call and call_in hooks to onboard network stack to
  allow calling functions from onboard stack context.
- Added support to call and call_in functions to LWIP and
  Nanostack.
- Disabled LWIP DNS translator with the exception of DNS
  address storage used in DNS address get.
2018-05-23 12:24:10 +03:00
TomoYamanaka bad530ab0d Implementation of unified EMAC driver for Renesas mbed boards
Implementation of unified EMAC driver for Renesas mbed boards

Based on the driver so far, Renesas implemented the emac driver for GR-PEACH and VK-RZ/A1H.
The mainly changes is below.
- Add the connection part with LWIP according to the unified emac specification.
- Add three new multicast functions(add, remove, set_all).

The Greentea test netsocket and emac test passed.
2018-05-23 12:24:09 +03:00
cyliangtw 7bfa362492 [M487/NUC472] Fix tx frame length and remove GPL license 2018-05-23 12:24:09 +03:00
cyliangtw 401f09c479 [M487/NUC472] Support DHCP & TCP sample, also remove legacy emac 2018-05-23 12:24:09 +03:00
cyliangtw 89209b6cd5 [M487/NUC472] Support new EMAC feature, built OK 2018-05-23 12:24:08 +03:00
Mahesh Mahadevan 82b2a27a1c Kinetis EMAC: Renamed K64F files to Kinetis
This driver is used by more SoC's than K64F

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-05-23 12:24:07 +03:00
Mahesh Mahadevan 7bc4c0ec21 K64F, K66F: Update the SYSMPU implementation
Do not disable SYSMPU, instead add access for ENET bus master

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-05-23 12:24:07 +03:00
Mika Leppänen de72090d26 Changed STM emac driver to loop RX frame reading 2018-05-23 12:24:06 +03:00
Kevin Bracey 953f1b615a Add EMAC driver README.md with porting guide 2018-05-23 12:24:06 +03:00
Kevin Bracey fbd920777b Add extra labels for Freescale & STM EMAC drivers
Just checking "does the chip have an EMAC" doesn't work - there are
targets using those chips which do not have an Ethernet connector and
don't provide the necessary surrounding infrastructure (eg DISCO_F429ZI,
not providing the board emac config call, and HEXIWEAR not providing PHY
info).

Make the targets that actually do want EMAC define their own local
Freescale_EMAC and STM_EMAC labels, and move the drivers into
the corresponding TARGET_ directories, removing the #ifdefs.
2018-05-23 12:24:06 +03:00
Kevin Bracey d83dec9ea4 Stop drivers checking DEVICE_EMAC
Checking DEVICE_EMAC is problematic - particularly for the Odin W2 where
apps have been shutting this off to disable the Wi-fi interface.

Make drivers check a locally-relevant flag instead, pending new
thoughts on how to achieve application/test-relevant flagging for
XXX:get_default_instance() being provided by a system.

However that is achieved, drivers do require a flag set purely by the
target - they mustn't be tripped up by an add-on module providing itself
as the system's default EMAC.
2018-05-23 12:24:05 +03:00
Mika Leppänen 01b4d97cb4 Corrected STM eth driver flagging, memory allocation and thread init 2018-05-23 12:24:05 +03:00
Kevin Bracey 3c83c62ff7 Nanostack EMAC implementation
Make Nanostack an OnboardNetworkInterface, implementing
add_ethernet_interface so it can use EMAC drivers.

Can now be used via EthernetInterface, and be the system's default
network stack.

Legacy support for NanostackEthernetInterface retained. Some
restructuring of mesh interface code to fit into the
OnboardNetworkStack:::Interface system.
2018-05-23 12:24:04 +03:00
Kevin Bracey a0d374ef00 Extend EMAC multicast APIs 2018-05-23 12:24:02 +03:00
Kevin Bracey 5472a9703f EMAC: check link status callback is set
Nanostack doesn't set the link status callback. Make sure the two
example drivers don't crash if it isn't set.
2018-05-23 12:24:02 +03:00
Kevin Bracey 7ce098acb4 K64F EMAC: Fix TX error path leaks 2018-05-23 12:24:02 +03:00
Mika Leppänen 5da3cd9cce Added preferred alignment to emac and copy to/from to memory manager 2018-05-23 12:24:01 +03:00
Kevin Bracey 4950a993fd Move STM EMAC driver out out lwIP 2018-05-23 12:24:01 +03:00
Mika Leppänen 4e10cc097e Updated STM ethernet driver to use emac and memory manager 2018-05-23 12:24:01 +03:00
Mika Leppänen 668e0821a1 Updated K64F ethernet driver to use memory manager 2018-05-23 12:24:00 +03:00
Mika Leppänen bc5d4d1c0d Created memory manager class to netsocket and updated lwip to use it
instead of old memory interface.
2018-05-23 12:24:00 +03:00
Kevin Bracey b222c25435 Work around Nuvoton #define EMAC 2018-05-23 12:23:58 +03:00
Kevin Bracey 958247265b Tell mbed build to ignore old lwIP+EMAC drivers 2018-05-23 12:23:58 +03:00
Kevin Bracey 0ecf4e4695 Move Freescale EMAC driver out of lwIP 2018-05-23 12:23:58 +03:00
Kevin Bracey 74dfe3423a Add downcast methods to NetworkInterface
As we've introduced virtual inheritance to support EMACInterface, we can
no longer use C-style casts or static_cast to downcast from
NetworkInterface to more specific types. RTTI is disabled in the
toolchains, so dynamic_cast is unavailables.

Add virtual downcast methods to permit conversions to the 6 derived
classes. Probably only needed for EMACInterface, WiFiInterface and
EthInterface, but handles the set.
2018-05-23 12:23:55 +03:00
Mirela Chirica 6e7d0a8847 Cellular: Added missing copyrights 2018-05-23 12:11:02 +03:00
Mirela Chirica b59ef26930 Cellular: Unit tests fixes 2018-05-23 12:11:02 +03:00
paul-szczepanek-arm 80137be991 Merge https://github.com/ARMmbed/mbed-os into security-manager-dev 2018-05-23 09:47:06 +01:00
Yossi Levy f33f4dab26 Increase tests timeout to 45 second 2018-05-23 11:29:46 +03:00
Ron Eldor 77e87d3174 Check the size_t isn't larger than 32 bit
Assure that `size_t` isn't larger than 32 bit, with preprocessor check.
Using `#if SIZE_MAX > UINT_MAX`.
2018-05-23 08:37:27 +03:00
Yossi Levy 7401aea36a Remove reset tests. Small change to cmac claculation in get_derived_key 2018-05-22 21:35:33 +03:00
Oren Cohen 076cd42b7c Update uvisor-tests.txt 2018-05-22 17:57:43 +01:00
Vincent Coubard cfe325cf0e BLE NRF51: Do not filter advertising packet in peripheral if the device as no bond. 2018-05-22 17:40:18 +01:00
Vincent Coubard ba61c09ffc BLE NRF51: Resolve private address on connection in peripheral role
Soft device inconsistency: The address is not resolved automatically if the device is a peripheral.
2018-05-22 17:39:03 +01:00
Vincent Coubard 755cf5fa5f BLE NRF51: Defer connection to a common function.
The soft device is not consistent as it is required to force the connection to a resolved resolvable address so it should be known if the  target is an identity address.
2018-05-22 17:37:57 +01:00
Vincent Coubard d427fcfb59 Nordic BLE: Remove dependency to mbedtls for CryptoToolbox::ah. 2018-05-22 17:33:49 +01:00
Yogesh Pande c520baeebf Remove ns_event_loop_thread_start() from NDInterface and ThreadInterface connect().
ns_event_loop_thread_start() is incorrectly used at connect() phase, the initial
setup is already done at init() phase and the eventloop thread is correctly initialized.

Also, the usage of ns_event_loop_thread_start() API should be behind MBED_CONF_NANOSTACK_HAL_EVENT_LOOP_DISPATCH_FROM_APPLICATION
flag as application can decide to use main thread for event loop, which will result in linker error for this API call in
case of ARMCC compiler.
2018-05-22 16:44:40 +03:00
paul-szczepanek-arm 69a0c10f00 removing erroneous (and redundant) check
this is gating on the wrong flag and the call doesn't require a check in the first place
2018-05-22 14:37:02 +01:00
paul-szczepanek-arm 08cb7aefd2 fix not writing flags in the file
flags kept with the rest of data for each entry
2018-05-22 14:08:09 +01:00
Martin Kojtal 02af950f62
Merge pull request #6336 from geky/fat-errors
fatfs: Update error code mapping
2018-05-22 14:27:01 +02:00
Martin Kojtal fc2f7fff95
Merge pull request #6757 from davidsaada/david_buffered_bd
Implement BufferedBlockDevice
2018-05-22 14:25:51 +02:00
paul-szczepanek-arm 84ff831141 measure file size with SEEK_END
I thought that's not portable but the rest of the codebase uses it so no reason not to
2018-05-22 12:25:11 +01:00
paul-szczepanek-arm 1cd0c20fd0 fix opening the file in the wrong mode 2018-05-22 12:11:07 +01:00
paul-szczepanek-arm 7d916a9997 fix not writing version number into the file 2018-05-22 11:45:38 +01:00
cyliangtw 665dc99096 Support default tz_module for event loop & lwip 2018-05-22 17:19:47 +08:00
Kevin Bracey 6dffe6e4e7 Remove CellularInterface
This has been superceded by CellularBase. Name change occurred late
in review of https://github.com/ARMmbed/mbed-os/pull/4119 and
original unused CellularInterface was left behind.
2018-05-22 11:44:46 +03:00
Kevin Bracey 1c5bbaf4d8 Insert EMACInterface class
Rather than let "EthernetInterface" be the base EMAC NetworkInterface,
insert an "EMACInterface" class.

EthernetInterface then derives from EMACInterface and EthInterface.

A Wi-Fi driver can derive from EMACInterface and WiFiInterface - this
will be more logical than deriving from EthernetInterface and
WiFiInterface.

This does mean adding a couple of virtual inheritances to avoid
duplicate NetworkInterfaces:

                   NetworkInterface
                     /           \
            virtual /             \ virtual
                   /               \
             EMACInterface     WiFiInterface
                   \               /
                    \             /
                     \           /
                  MyCustomWiFiInterface
2018-05-22 11:44:45 +03:00