Martin Kojtal
3e42991289
Merge pull request #13046 from hugueskamba/hk_use_chrono
...
Use std::chrono based functions
2020-06-18 22:16:00 +02:00
Hugues Kamba
a3f4cf212d
Use std::chrono based functions
...
The chrono based functions improve readability. Using them also removes
warnings related to usage of deprecated warnings.
2020-06-17 14:52:50 +01:00
Martin Kojtal
2466411b83
Merge pull request #13037 from paul-szczepanek-arm/ble-sm-fix
...
BLE: Fix privacy and signing handling in Security Manager
2020-06-10 12:09:32 +02:00
Paul Szczeanek
9d54c56562
reinitialise identity and signing when bond table reset
2020-06-03 17:36:06 +01:00
Paul Szczeanek
110b190b38
fix privacy initialisation and give access to local identity
...
Initialises identity addres when privacy is enabled. Stores the identity. Retrieves local identity if previously stored.
2020-06-03 17:35:23 +01:00
Paul Szczeanek
05f7685a79
store local csrk and identity in the security db
2020-06-03 17:27:26 +01:00
Paul Szczeanek
d6a5bd2825
make number of db entries configurable
2020-06-03 17:07:47 +01:00
Paul Szczeanek
157c54bfc7
fix inverted meaning of _user_manage_connection_parameter_requests
2020-06-02 09:39:07 +01:00
Lingkai Dong
50928fbcff
BLE whitelist can only contain public or random static addresses
2020-04-17 09:59:17 +01:00
Lingkai Dong
8de604d485
Rename ConnectionParams_t -> PreferredConnectionParams_t
...
For actual connections, full ConnectionParameters is used. But
as per BLE specification, Generic Access Service can display
preferred connection parameters which is a smaller subset and
ConnectionParams_t matches exactly. Thus we rename/repurpose
it to PreferredConnectionParams_t.
2020-04-17 09:59:14 +01:00
Lingkai Dong
76b92b82e2
BLE: correct misspelling: prefered -> preferred
2020-04-17 09:59:14 +01:00
Lingkai Dong
7c49aeb01f
Remove connection_params from internal on_connected()
...
The callback on_connected() in ConnectionEventMonitorEventHandler
contains a parameter ConnectionParams_t which is superceded by
ConnectionParameters. Since it's not used, remove it.
2020-04-17 09:59:13 +01:00
Lingkai Dong
53550bb63b
Gap: create legacy advertising set only when required
2020-04-17 09:59:11 +01:00
Lingkai Dong
9455f86954
BLE: replace legacy address types (BLEProtocol) with new ones
2020-04-17 09:59:08 +01:00
Lingkai Dong
eba5821fd8
GenericGap: ensure legacy advertising set exists when setting data
2020-04-17 09:59:06 +01:00
Lingkai Dong
2422efc9bb
GenericGap: clean up unused helper functions
2020-04-17 09:59:05 +01:00
Lingkai Dong
55ecc57ac9
BLE: use up-to-date structs for disconnections
2020-04-17 09:59:04 +01:00
Lingkai Dong
c17cf0f3f3
Add to Gap/GenericGap non-deprecated APIs originally in LegacyGap
2020-04-17 09:59:03 +01:00
Lingkai Dong
e97582bd23
Move BLE whitelist APIs from LegacyGap to ble::Gap
2020-04-17 09:56:25 +01:00
Lingkai Dong
eee3b687c4
GenericGap: prepare legacy advertising set
...
This is based on (and supercedes) PR #10772 .
As the switches between old and new APIs do not exist anymore,
we create a function for legacy advertising set creation.
2020-04-17 09:56:24 +01:00
Lingkai Dong
a2a99291d4
BLE Gap: remove version one scan API
2020-04-17 09:56:24 +01:00
Lingkai Dong
db14f196e7
GenericGap: remove legacy timeout callback signalling
2020-04-17 09:56:23 +01:00
Lingkai Dong
d35a6b88a9
GenericGap: remove legacy dis/connection callbacks signalling
2020-04-17 09:56:22 +01:00
Lingkai Dong
6f701cd6ef
Remove deprecated implementations from GenericGap & LegacyGap
2020-04-17 09:56:21 +01:00
Vincent Coubard
c66dd7fd1f
BLE: Add an HCI driver API to set the random static address.
2020-01-28 13:29:11 +00:00
paul-szczepanek-arm
e16889d694
set pointer to null on delete
2020-01-03 09:00:59 +00:00
George Beckstein
9c75207299
Added call to delete the security database object upon SM reset. This allows the file to be closed by the OS and flushed to disk.
2019-11-06 14:31:04 -05:00
desmond.chen
d9e6110577
Handle legacy process event first on connection complete
2019-10-21 15:57:09 +08:00
Anna Bridge
46be52636c
Merge pull request #10659 from LDong-Arm/replace_ArrayView
...
Replace uses of ArrayView with mbed::Span
2019-06-18 16:26:46 +01:00
Lingkai Dong
6f7f1337cd
BLE: Replace uses of ArrayView with mbed::Span
...
The platform API mbed::Span provides the same features as ArrayView.
2019-06-07 16:18:55 +01:00
Lingkai Dong
6165204b15
Workaround for legacy GAP advertising issue on Cordio LL
...
Due to some issue in Cordio link layer, advertising data does not
take effect unless we set it (or set it again) after advertising
parameters are set.
2019-06-06 10:49:35 +01:00
Lingkai Dong
f78364cb5a
Set extended advertising parameters upon first use of API v2
...
Previously, extended advertising parameters failed to be set
during BLE initialisation when the stack was not ready.
To work around this, we delay it to the first use of
useVersionTwoAPI.
2019-06-06 10:49:04 +01:00
Vincent Coubard
de482e4029
BLE: Create and handle write_command Event.
...
This event is raised when a write command has been sent to the controller. It can be used to queue a new write command.
2019-05-14 17:13:51 +01:00
Vincent Coubard
134f71e6ba
BLE: Connect generic gatt client as pal EventHandler.
2019-05-14 17:11:29 +01:00
paul-szczepanek-arm
82112b6c52
simplify call
2019-03-26 10:53:10 -05:00
paul-szczepanek-arm
de539e146b
update comments
2019-03-26 10:53:10 -05:00
paul-szczepanek-arm
dad6844167
bounce scan timeout of the queue
2019-03-26 10:53:10 -05:00
Cruz Monrreal
7cdc5b057c
Merge pull request #9919 from pan-/workaround-extended-report
...
BLE - Report extended advertising in legacy handler
2019-03-16 22:54:21 -05:00
Jan Jongboom
eed2b390d9
Dead pointer usage in GenericSecurityManager
...
`pscrk` is set to the address of `csrk`, but `csrk` is out of scope when using the resulting value. There's no guarantee that the memory is still valid.
2019-03-07 16:21:52 +01:00
Vincent Coubard
25438875c9
BLE - Report extended advertising in legacy handler if legacy API in use.
...
Workaround for the Cordio stack as extended advertising can be reported for a legacy advertising command.
2019-03-03 19:30:42 +00:00
Vincent Coubard
2f98901050
BLE - Avoid calling v2 API in GenericGap::reset_ if not required.
2019-03-01 18:31:06 +00:00
Vincent Coubard
eeca03f952
BLE - Fix exclusion of getMaxAdvertisingSetNumber and getMaxAdvertisingDataLength
2019-02-28 16:29:21 +00:00
Vincent Coubard
5ae59fc534
BLE - Improve FEATURE_PRIVACY conditions.
2019-02-28 14:47:07 +00:00
Vincent Coubard
020c5b4262
BLE - Disabling SecurityManager connection handling when security disabled.
2019-02-28 13:34:05 +00:00
Vincent Coubard
af09f7b8ab
BLE - Disable peer csrk retrieval if signing disabled.
2019-02-28 13:30:36 +00:00
Vincent Coubard
eeb14c5ce6
BLE - Conditionally include address rotation at compile time
2019-02-28 13:26:51 +00:00
Vincent Coubard
632851e5ae
BLE - Small reordering to reduce diff.
2019-02-28 12:02:23 +00:00
Vincent Coubard
831241df12
BLE - Cleanup GenericSecurityManager conditional directives
...
- Inheritance lisr
- Within constructor
- Within member declaration
- Private function declaration and definition.
2019-02-28 11:33:49 +00:00
Vincent Coubard
07f3ca2723
BLE - Cleanup GenericGap conditional directive
...
- Within constructor
- Within member declaration
- Private function declaration and definition.
2019-02-28 11:31:48 +00:00
Vincent Coubard
593cf2bd7c
BLE - Remove conditional compilation of FileSecurityDb
2019-02-28 11:30:07 +00:00