Commit Graph

476 Commits (a8d1d26fa76a27263cc9a69f65df45e3458517a5)

Author SHA1 Message Date
paul-szczepanek-arm fa930586a7 error when there is no handler 2019-01-25 14:29:59 +00:00
paul-szczepanek-arm 5077d6faaf add missing null checks 2019-01-25 14:29:59 +00:00
Nic Costa c5edbe05b0 Fix race condition when generating OOB data
The GenericSecurityManager tracks the most recent OOB data generated
by the PAL and the PAL function to generate OOB data is expected to
be asynchronous such that the OOB data is returned via a callback.

There was a race condition on the security manager's oob data variable
because it was cleared (set to all zeros) after calling PAL generate.
The expectation was that the clear operation would occur before the
callback executed, but this is proving to not be the case.  Instead,
the callback is being executed as if it were syncronous with PAL
generate, then PAL generate returns and the oob data is cleared,
thereby losing the generated oob data that was set in the callback.

To fix the issue, clear the oob data variables before calling into
the PAL.
2019-01-25 14:29:59 +00:00
paul-szczepanek-arm 89e35bf16e call advertising end even if stopped by us 2019-01-14 13:06:14 +00:00
paul-szczepanek-arm 9b6c139678 suppress scan timeout if we disabled scanning 2019-01-14 13:06:14 +00:00
Naveen Kaje c1ef30e851 BLE: Update toolchain.h with mbed_toolchain.h
Fixes the following warning

[Warning] toolchain.h@24,0: #1215-D: #warning directive:
toolchain.h has been replaced by mbed_toolchain.h,
please update to mbed_toolchain.h [since mbed-os-5.3]
2018-12-27 22:25:59 -06:00
paul-szczepanek-arm 52b0f21720 remove noreturn error function to avoid compilation issues 2018-12-11 16:14:49 -06:00
Vincent Coubard 991c723f93 BLE: Fix address type allowed to create a periodic sync. 2018-12-11 16:14:47 -06:00
Vincent Coubard 49717e4afa BLE: Allow null value for periodic interval in advertising report event. 2018-12-11 16:14:47 -06:00
Vincent Coubard 4bb0964712 BLE: Set advertising random address when appropriate. 2018-12-11 16:14:47 -06:00
Vincent Coubard c8c355467e BLE: rename ConnectionParameters::getFilterPolicy into getFilter for consistency. 2018-12-05 11:09:50 +00:00
Vincent Coubard 7e180c7467 BLE: Change parameter order of ble::Gap::startScan 2018-12-05 11:09:50 +00:00
Vincent Coubard 3f56b2247e BLE: Fix name of DisconnectionEvent into DisconnectionCompleteEvent for consistency. 2018-12-05 11:09:50 +00:00
Vincent Coubard df00415236 BLE: Fix ble::Gap::getMaxAdvertisingDataLength return type. 2018-12-05 11:09:50 +00:00
Vincent Coubard 0d382461ec BLE: Ensure scan process is stopped before connecting. 2018-12-05 11:09:50 +00:00
Vincent Coubard 6330878c14 BLE: Use RANDOM address per default for Advertising, Scan and Connection parameter.
Unlike the public address, the RANDOM address is guaranteed to exist.
If privacy is enabled, it means the controller will generates random resolvable addresses or non resolvable addresses depending on the config.
If privacy is not enabled then the device will use the device's random static address that doesn't change between radio processes.
2018-12-05 11:09:50 +00:00
Vincent Coubard 07e7fa3b0d BLE: protect event signaling flag from concurent accesses. 2018-12-05 11:09:50 +00:00
paul-szczepanek-arm a48c6d4f40 consistent errors 2018-12-05 11:09:50 +00:00
Vincent Coubard 910c09e160 BLE: Fix set check in GenerigGap::stopAdvertising. 2018-12-05 11:09:50 +00:00
Vincent Coubard 6677fab856 BLE: Move source/Gap.cpp -> source/LegacyGap.cpp 2018-11-27 09:12:28 +00:00
Vincent Coubard a65296e9ee BLE: removed resolved TODO. 2018-11-26 23:44:23 +00:00
Vincent Coubard 66a9e635bd BLE: report correct event type for legacy advertising report. 2018-11-26 23:28:30 +00:00
Vincent Coubard 0c9ce24638 BLE: remove unwanted trace. 2018-11-26 23:16:31 +00:00
Vincent Coubard ef1552a8f5 BLE: report legacy connection event in new event handler. 2018-11-26 23:03:21 +00:00
paul-szczepanek-arm a14f143c85 set active set to false when stoping advertising 2018-11-26 23:00:29 +00:00
paul-szczepanek-arm 4d986bf376 fix is feature enabled condition and made in consistent 2018-11-26 21:11:34 +00:00
Vincent Coubard 56185582aa BLE: Report legacy advertising with new API. 2018-11-26 21:01:14 +00:00
Vincent Coubard 0ef7a40475 BLE: Fix set advertising paylaod dispatch. 2018-11-26 21:00:46 +00:00
Vincent Coubard daf0f429c8 BLE: Fix advertising set issues on legacy controllers. 2018-11-26 19:14:48 +00:00
paul-szczepanek-arm 3ae38ac1e8 always set existing set for legacy handle 2018-11-26 18:53:49 +00:00
paul-szczepanek-arm bf535af159 check feature support before calling extended functnions 2018-11-26 16:57:07 +00:00
paul-szczepanek-arm bed7677c81 stop advertising before reseting 2018-11-26 16:51:28 +00:00
paul-szczepanek-arm 6f3a9ca107 legacy handle starts off present in _existing_sets 2018-11-26 16:29:33 +00:00
paul-szczepanek-arm f4a560dace reset advertising sets on reset 2018-11-26 16:25:33 +00:00
paul-szczepanek-arm e54e3eaee0 cast no longer needed 2018-11-26 15:42:12 +00:00
Vincent Coubard f71e08ccf1 BLE: tag API uses in GenericGap. 2018-11-26 15:26:24 +00:00
Vincent Coubard 2d63714f2e BLE: Implement connection parameter management in GAP. 2018-11-26 15:25:46 +00:00
Vincent Coubard 89355b9fb0 BLE: Check supervision timeout value in connect. 2018-11-26 15:24:42 +00:00
Vincent Coubard d1b5c8cbb5 BLE: Mark LEGACY_ADVERTISING_HANDLE as active in initialization. 2018-11-26 15:23:53 +00:00
Vincent Coubard 93b6ecfa7e BLE: initialize properly deprecated and non deprecated flags. 2018-11-26 15:23:24 +00:00
Vincent Coubard a915748cbe BLE: Fallback to legacy connect when required. 2018-11-26 14:13:07 +00:00
Vincent Coubard 190b9bc125 BLE: Fix address type in ::ble::Gap::connect 2018-11-26 14:13:07 +00:00
paul-szczepanek-arm 528deb168f fix wrong variable being swapped 2018-11-26 11:16:23 +00:00
paul-szczepanek-arm 208b1bd3e9 fix size calculation for UUID data payload 2018-11-26 11:10:39 +00:00
Vincent Coubard 0407ee8c81 BLE: move privacy configuration type in ble namespace. 2018-11-26 10:24:35 +00:00
Vincent Coubard 78d4a9b6c8 BLE: Cleanup enum duplicates in gap/Types.h 2018-11-26 10:24:35 +00:00
Vincent Coubard e130bec6a0 BLE: rework ScanParameters::phy_configuration_t 2018-11-26 10:24:35 +00:00
Vincent Coubard 4db8ddfb90 BLE: fix name of functions in ble::ScanParameters. 2018-11-26 10:24:35 +00:00
Vincent Coubard 6b8b1d0b7a BLE: remove minimize fragmentation parameter in Gap. 2018-11-26 10:24:35 +00:00
Vincent Coubard 4058f0908a BLE: Extract computation of minimumSupervisionTimeout. 2018-11-26 10:24:35 +00:00