Commit Graph

18 Commits (7b08388be6433c619ab3d20318f199162051c724)

Author SHA1 Message Date
Paul Szczepanek 7b08388be6 Add traces to HCI, BLE instance, Security DB and WSF cordio traces (#14138)
* ble HCI tracing

* fix typo in SM trace

* add BLE instance tracing

* route wsf traces to mbed tr_debug

* Update connectivity/FEATURE_BLE/source/cordio/source/BLEInstanceBaseImpl.cpp

Co-authored-by: Vincent Coubard <vincent.coubard@arm.com>

* print hci on cordio side

* trace controller supported features

* log reset sequence

* include config for printing enums

* remove duplicate trace

* add tracing to security db

* workaround for macro error on use outside trace

Co-authored-by: Vincent Coubard <vincent.coubard@arm.com>
2021-03-15 15:35:52 +00:00
Vincent Coubard 5aa76e566a BLE: Add privacy trace (#14127)
Add traces to the Bluetooth Security Manager and Privacy controller.
The traces are made to be comprehensive to improve the ux when users submit bugs.
A centralized set of helpers has been created to convert BLE types to string.

* BLE: Add SM traces

* BLE: Add traces to Security Manager PAL

* BLE: Make SM traces consistent.
- Prefix with Connection <id> - when appropriate.
- Display parameters after `:`.
- If multiple parameters should be displayed name then and print the value after =. They are separated by a `,`.

* BLE: Fix SM random number generation.

Only the first 8 bytes were generated from the stack.

* BLE: Regenerate CSRK if it is all zeroes.

* BLE: Add trace into privacy modules

Address resolution is set at the debug level as it is a very common operation and may clutter the output.

* Address trace review for SM:

- Put privacy traces in BLPR
- Add missing traces in PALSecurityManagerImpl.cpp
- Add missing EventHandler null pointer check
- Typo and parameters order fix.
2021-03-15 15:34:34 +00:00
Vincent Coubard 4cfcadd9e9 BLE: Fix SM random number generation.
Ensure the more than 8 random bytes are fetched from the stack.
2021-01-07 12:38:47 +00:00
Vincent Coubard b28e11574a BLE: Regenerate CSRK if it is all zeroes. 2021-01-07 12:35:24 +00:00
Vincent Coubard 557eac0617 BLE: Conditional compilation of the security manager
Depends on the role (central or peripheral), signing enabled and secure connection enabled.
2020-10-23 16:19:38 +01:00
Paul Szczeanek 3f9798b52d Fix conditional compilation based on config 2020-10-13 17:32:49 +01:00
Vincent Coubard 8716298ea2 BLE: Update DB entry if current entry doesn't match requested EDIV and RAND 2020-10-05 11:54:03 +01:00
Vincent Coubard 4c1afe8e83 BLE: Update identity address when retrieved from the DB 2020-10-05 11:54:03 +01:00
Vincent Coubard 7c8a754667 BLE: Remove set advertising timeout from SM pal 2020-10-05 11:54:03 +01:00
Vincent Coubard 4859dbe426 BLE: Set identity address to random static.
This also ensure the random static address used by gap is the correct one.
2020-10-05 11:53:22 +01:00
Vincent Coubard 237278be24 BLE: Update security manager to use the PrivateAddressController
Resolution list has been removed from the pal as this is handled by the PrivateAddressController.
2020-10-05 11:50:33 +01:00
phst c0021e2147 Add missing defines to activate/deactivate BLE features 2020-09-17 11:02:25 +02:00
Vincent Coubard 702c1b9756 BLE: Fixed used of parent pointer in implementation classes. 2020-09-04 13:25:32 +01:00
Vincent Coubard bc259c561d BLE: cleanup generic sources 2020-08-25 11:32:37 +01:00
Vincent Coubard 27cb03824e BLE: Move common publi headers into ble/common 2020-08-25 11:26:26 +01:00
Vincent Coubard e11bfb6514 BLE: move PAL headers into source/pal 2020-08-25 11:26:26 +01:00
Vincent Coubard c2a09abee8 BLE: Move SecurityDB related files into generic sources 2020-08-25 11:26:26 +01:00
Vincent Coubard 381700a250 BLE: Move generic implementation and headers into source/generic 2020-08-25 11:26:26 +01:00