Commit Graph

956 Commits (dda1dcf2292c92b24f807054e27fd34f87b4f8d1)

Author SHA1 Message Date
Martin Kojtal 2ebf2cf4c4
Merge pull request #13038 from paul-szczepanek-arm/kvstoredb
BLE: Add KVStore Security DB
2020-07-08 09:33:00 +02:00
Paul Szczeanek d080c7e85a add SPDX identifier 2020-07-06 15:06:04 +01:00
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
Paul Szczeanek 559d6afc43 Allow for security db type selection
The selection is now based on the lib json (which allows you to disable filesystem db or kvstore db) and the call to SecurityManager::init. It will always fall back on memory db if no other db is available.
2020-06-10 16:04:57 +01:00
Paul Szczeanek beb56320eb Add a new implementation of security db for KVStore
This works similar to filesystem db but uses the KVStore which it assumes is initialised. This is checked by open_db. On initialisation it either reads the present db or writes a new db into all entries thus guaranteeing that after the initialisation we will not run out of space for the keys and no extra error handling is needed.
2020-06-10 16:03:16 +01:00
Paul Szczeanek f661ce0c81 Relax the integrity requirement to allow private functions to call themselves 2020-06-10 16:03:16 +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 73b4bebee0 add connection addresses to whitelist 2020-06-03 17:30:21 +01:00
Paul Szczeanek bfdbcc7b4a add accessor for local irk 2020-06-03 17:29:51 +01:00
Paul Szczeanek fff0247ae5 fix infinite recursive call 2020-06-03 17:29:20 +01:00
Paul Szczeanek 05f7685a79 store local csrk and identity in the security db 2020-06-03 17:27:26 +01:00
Paul Szczeanek 94a6cac838 expose identity address used by controller 2020-06-03 17:24:11 +01:00
Paul Szczeanek d6a5bd2825 make number of db entries configurable 2020-06-03 17:07:47 +01:00
Lingkai Dong a6810ddc37 Remove a few leftovers in BLE namespace 2020-04-17 09:59:16 +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 0341d5c898 disconnection_reason_t from raw uint8_t should be explicited an undocumented 2020-04-17 09:59:11 +01:00
Lingkai Dong 0b163ffbe1 Add default initialisation of own_address_type_t 2020-04-17 09:59:10 +01:00
Lingkai Dong 25608eede1 Remove BLEProtocol.h 2020-04-17 09:59:09 +01:00
Lingkai Dong 9455f86954 BLE: replace legacy address types (BLEProtocol) with new ones 2020-04-17 09:59:08 +01:00
Lingkai Dong ae86c119d2 Add whitelist_t::entry_t which will replace Address_t to store addr type and value 2020-04-17 09:59:08 +01:00
Lingkai Dong 7fed75b356 BLE: remove ResolutionStrategy type 2020-04-17 09:59:07 +01:00
Lingkai Dong 7ce73d414e BLE LinkLossService: use new EventHandler API to handle disconnection 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 09a81a9972 GenericAccessService: remove unused device name/appearance functions due to API changes 2020-04-17 09:59:04 +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 2989466b01 BLE: construct disconnection_reason_t from uint8_t (received from HCI) 2020-04-17 09:59:02 +01:00
Lingkai Dong d2d09b2bce BLE: Remove LegacyGap and related types 2020-04-17 09:59:02 +01:00
Lingkai Dong be3858cec2 BLE: update to use whitelist_t from ble namespace 2020-04-17 09:58:58 +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 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
Lingkai Dong 55edb6131d ble/Gap.h: remove deprecated APIs 2020-04-17 09:56:21 +01:00
Lingkai Dong 07c25bba16 GattCharacteristic: remove deprecated APIs and helper function SecurityModeToAttSecurity 2020-04-07 10:27:16 +01:00
Lingkai Dong 70a564e7de GattClient: remove deprecated onDataWrite 2020-04-07 10:27:16 +01:00
Lingkai Dong 1a89b7718c BLE SecurityManager: remove legacy event callbacks and deprecated API 2020-04-07 10:27:16 +01:00
Lingkai Dong de89b9a572 BLE DeviceInformationService: fix deprecated addService usage 2020-03-23 16:37:21 +00:00
Lingkai Dong 682927d0a7 Remove deprecated BLE:: API
Note: The BLE() constructor is now private.
2020-03-23 16:14:20 +00:00
Lingkai Dong 266de6a69a Remove BLE services that are not maintained anymore 2020-03-23 16:14:19 +00:00
Martin Kojtal cc799a83fc
Merge pull request #12661 from kbarm/feature-fix-documentation-ascii-art
Adjusted SecurityManager Doxygen ASCII art
2020-03-23 10:18:54 +01:00
Krzysztof Borowczyk a624acd45c Adjusted SecurityManager Doxygen ASCII art to make it display correctly on mbed.com 2020-03-20 10:20:58 +01:00
Krzysztof Borowczyk 4465295332 Remove ARMC5 reference from Mbed OS platform (removed all references to __CC_ARM) 2020-03-19 16:00:45 +01:00
Rajkumar Kanagaraj 6e969ec5ab Remove the deprecated CallChain class and its APIs. 2020-02-28 07:41:44 -08:00
Vincent Coubard cb340f8f55
BLE: Fix documentation of set_random_static_address
Co-Authored-By: Lingkai Dong <lingkai.dong@arm.com>
2020-01-29 09:53:12 +00:00
Vincent Coubard c66dd7fd1f BLE: Add an HCI driver API to set the random static address. 2020-01-28 13:29:11 +00:00