Cruz Monrreal
2e233a96d3
Merge pull request #7210 from pan-/fix-nordic-security-cancellation
...
Fix nordic security cancellation
2018-06-25 10:12:23 -05:00
Vincent Coubard
4b8fb0be78
Nordic BLE: Fix return value verification
2018-06-22 09:36:06 +01:00
Vincent Coubard
b68e18cdb4
Nordi BLE: Fix formatting
2018-06-22 09:35:34 +01:00
Vincent Coubard
92fa40b1c7
Nordic BLE: Accept connection parameter update
...
A peer device that sends a connection parameter update may get block if it doesn't receive a response.
This patch accept the peer request unconditionnally. At some point this event will be managed by the application.
2018-06-13 15:54:51 +01:00
Vincent Coubard
5237c3ec40
Nordic BLE:
...
Cancel pairing if the device fail to allocate the resources necessary for the pairing operation.
2018-06-13 15:11:13 +01:00
Vincent Coubard
f0c3f14887
Nordic BLE: Fix pairing cancellation.
...
Depending on the role and the current state of the local device; pairing cancelation should be made with a call to a specific function. Normally the Nordic stack would reject invalid calls if the device is not in the correct state; therefore it was assumed that it was possible to detect the state from sd errors. Unfortunatelly this is not true with the latest softdevices as some calls succeed even if the device is not in the right state.
To solve that issue cancelation looks at the current state of the device first to select the right function that will trigger the pairing cancellation.
Note: the call to sd_ble_gap_authenticate was missing in the previous algorithm
2018-06-13 15:10:10 +01:00
Vincent Coubard
301e527af7
Nordic BLE: Store locally role for a given connection.
2018-06-13 15:03:43 +01:00
Vincent Coubard
5c7b8c8ea4
Nordic BLE: Add default parameter to get the local instance of nrF5xn
2018-06-13 15:02:45 +01:00
Vincent Coubard
8e7936d327
Nordic BLE: Improve return of nRF5xn::getGap.
...
Return the derived type instead of the abstract one. This is legal as C++ supports covariant returns.
2018-06-13 15:02:07 +01: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
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
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
Vincent Coubard
4d0126898c
BLE Nordic: Initialize and teardown tls platform context
2018-06-01 17:12:49 +01:00
paul-szczepanek-arm
e534f3b997
fix erroneous assert
2018-06-01 15:57:51 +01: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
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
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
Andrew Leech
67140a2706
Redirect NRF asserts to mbed error() in TARGET_NRF5x and SDK 14.2
...
Add related details to TARGET_NRF5x Readme's
2018-05-22 11:36:31 +10:00
Andrew Leech
cfd248ee05
Enable ASSERTS's in nrf sdk to catch coding errors.
...
These will now flow through to mbed standard error handling.
2018-05-22 11:36:30 +10:00
Vincent Coubard
57ffa14b4b
Nordic BLE: Backport privacy backward compatibility to NRF51
2018-05-21 13:21:46 +01:00
Vincent Coubard
14a1095c31
Nordic BLE: Disable secure connection support on NRF51.
2018-05-21 10:34:09 +01:00
Vincent Coubard
4c1a309117
Nordic BLE: Set own resolvable address to NULL.
...
This address is not accessible to the application.
2018-05-21 10:22:01 +01:00
Vincent Coubard
d962fc0174
BLE: factor code in GAP.
2018-05-21 10:20:43 +01:00
Vincent Coubard
28766bd873
BLE: Do not pass peer resolvable address in connection event handler
2018-05-21 10:17:44 +01:00
Vincent Coubard
c3bcd10cfd
BLE NRF52: Implement features related to peer_address_t
...
The overload of Gap::connect that accept peer_address_t has been added and gap connection and advertising report process have been updated to exploit peer_address_t in a backward compatible fashion.
2018-05-18 10:09:07 +01:00
paul-szczepanek-arm
57a02d6329
fixed signature
2018-05-16 16:54:47 +01:00
Vincent Coubard
37c036ca6b
Nordic: Port privacy to softdevice v4.
...
Many things have changed; the identity list isn't shared anymore with the whitelist and resolution is handled by the stack itself.
2018-05-16 16:16:06 +01:00
Vincent Coubard
6c44a78166
Merge branch 'master' of https://github.com/ARMmbed/mbed-os into security-manager-dev
2018-05-16 15:55:15 +01:00
Vincent Coubard
afcbdfc7dc
Merge branch 'security-manager-dev' of https://github.com/paul-szczepanek-arm/mbed-os into filedb
2018-05-16 08:43:52 +01:00
Vincent Coubard
2cb6e659a9
Nordic BLE: Backport security fixes from nRF5 to nRF5x
2018-05-15 15:11:33 +01:00
Vincent Coubard
ca5a9f359a
Nordic BLE: remove unecessary nordic ble libraries.
2018-05-15 14:51:19 +01:00
Vincent Coubard
a22b4e5d5e
Nordic BLE: Remove nordic gap init.
...
This initialization is already done in GattServer.
2018-05-15 14:51:18 +01:00
Vincent Coubard
dd6a5350e2
Nordic BLE: Remove peer manager handling.
2018-05-15 14:51:18 +01:00
Vincent Coubard
6f24078507
Nordic BLE: route event handling correctly.
2018-05-15 14:51:18 +01:00
Vincent Coubard
167a660ac1
Nordic BLE: use pal security manager.
2018-05-15 14:51:18 +01:00
Vincent Coubard
31f8cd18f7
Nordic BLE: Backport Gap from nRF5
2018-05-15 14:51:18 +01:00
Vincent Coubard
39396955a2
Nordic BLE: simplify whitelist management.
2018-05-15 14:51:17 +01:00
Vincent Coubard
6810c02606
Nordic BLE: Fix processing of events.
...
If new events are signaled during processing then they should be processed when processEvent is called again. The goal is to let other processing happen and not process sollely ble events.
2018-05-15 14:51:17 +01:00
Vincent Coubard
8fbecf2e0d
Nordic BLE: Fix incorrect assignement
2018-05-15 14:51:17 +01:00
Vincent Coubard
68b3288ba8
Nordic BLE: Fix signature of nRF5xGattServer::hwCallback
2018-05-15 14:51:17 +01:00
Vincent Coubard
4a7c9a9a55
Nordic BLE: expose publically btle_handler
2018-05-15 14:51:17 +01:00
Vincent Coubard
2af5508c4c
Nordic BLE: Do not conditionnaly assign sm key pointers.
...
This change has been forced by a change in latest softdevice that requires all key pointers to not be NULL unlike what is indicated in the documentation.
2018-05-15 14:51:17 +01:00
Vincent Coubard
dc54da0a2d
Nordic BLE: Force signing and link requirements to false.
2018-05-15 14:51:16 +01:00
Vincent Coubard
02e3c13d25
Nordic BLE: Protect event signaled flag.
2018-05-15 14:51:16 +01:00