Commit Graph

70 Commits (latest)

Author SHA1 Message Date
Paul Szczepanek ede39c4608 put statements inside the correct feature guard blocks 2021-06-17 16:51:28 +01:00
Paul Szczepanek 6b930d6449 translate adv set error codes and only act on successful stop 2021-06-09 18:50:17 +01:00
Paul Szczepanek 4fae828987 Fix process enable queue guard not being reset on failed runs 2021-06-09 18:50:17 +01:00
Paul Szczepanek 2d9a781dd8 fix typos and traces 2021-06-08 09:48:45 +01:00
Paul Szczepanek c51dc2f6cc set to pending only after issuing command 2021-06-02 12:06:43 +01:00
Paul Szczepanek 8ec7cfd820 start and stop adv sets in batches 2021-06-01 22:38:39 +01:00
Paul Szczepanek e99741dd3d change function names 2021-06-01 15:45:08 +01:00
Paul Szczepanek 4767b7e1ac fix missing observer ifdefs 2021-05-18 20:58:26 +01:00
Paul Szczepanek 910b7a6438 clear the pal gap queue on reset 2021-05-18 10:39:20 +01:00
Paul Szczepanek 30cd6071cf remove stopping sets since controller resets them 2021-05-18 10:24:16 +01:00
Paul Szczepanek ab123d3e22 advertising start queued up waiting for completion 2021-05-17 19:37:26 +01:00
Paul Szczepanek 172e9697da avoid init in header for compatibility 2021-04-28 16:29:26 +01:00
Paul Szczepanek f34d31f350 remember if BLE scan paremeters are set 2021-04-07 16:40:46 +01:00
Paul Szczepanek dc6e9db067 add tracing to scan state (#14225) 2021-03-15 15:35:52 +00:00
Vincent Coubard 6adaefd9f3 BLE: Fix traces parameter warnings 2021-03-15 15:35:52 +00:00
Abbas Bracken Ziad f4febdcb9d Add tracing to BLE GAP (#14117)
* Add traces to GapImpl.cpp

* Add helpers and param logs

* Update GapImpl.cpp

* Move helpers to ble_trace_helpers.h

* Add traces to whitelist setter & getter functions

* Prepend parent dir. to ble_trace_helpers.h include line

* Resolve portability issue by using PRI* macro in place of %lu

* Add traces to PalGapImpl.cpp

* Complete PAL GAP traces

* Remove stray include

* Make 'echo' traces in PAL configurable

Some of the tr_info traces at the beginning of PAL functions  are duplicates ('echoes') of those in GAP functions. This commit enables including/excluding of these traces in mbed_app.json by writing 1/0, respectively to the MBED_CONF_CORDIO_TRACE_PAL_ECHOES config macro. The default is to exclude 'echo' traces.

* Add missing spaces in tr_info traces

* Clean-up param log for set_extended_advertising_parameters

* Remove "Failed: " from every tr_error trace

* Apply changes from PalGapImpl.cpp review

* Apply changes from GapImpl.cpp review

* Use binary for channel map trace

B0: ADVERTISING_CHANNEL_37
B1: ADVERTISING_CHANNEL_38
B2: ADVERTISING_CHANNEL_39

We're assuming that the user understands the above. This could be documented somewhere.

* Replace more %lu w/PRIu32

* Add tr_info to terminateSync for user call

* Make trace group for PAL traces BLDM

* Remove [PAL] prefix from every PAL trace

* Add trace to setPeripheralPrivacyConfiguration

* Make set scan params tr_info dependent on selected PHY

* Add trace to GAP events

* Other GAP events required traces
2021-03-15 15:35:52 +00:00
Paul Szczepanek bd5f437896 return OK when stopping advertising that is not active 2021-01-27 16:32:57 +00:00
Martin Kojtal c29a2e2338
Merge pull request #13811 from pan-/ble-conditional-compilation
Ble conditional compilation
2020-11-06 16:11:10 +00:00
Paul Szczeanek 34c75ffb45 fix wrong advertising set handle being passed to handler 2020-10-28 08:42:58 +00:00
Paul Szczeanek 9e509f435b fix incorrect parameter check in periodic advertising 2020-10-27 15:09:30 +00:00
Vincent Coubard 87ea47f211 BLE: Refactor Gap::reset to make it more readable 2020-10-27 14:22:54 +00:00
Vincent Coubard 2e859cdab4 BLE: Conditionally compile PAL depending on the feature selected.
Previously (most) of the code was not pulled in because the pal interface was not virtual.
2020-10-23 12:17:31 +01:00
Paul Szczeanek 934e111107 fix advertising report not terminating early for unwanted reports 2020-10-19 15:47:40 +01:00
Paul Szczeanek 2c906110fc missing host resolution for rpa when extended advertising is available 2020-10-19 15:47:39 +01:00
Paul Szczeanek 0931709516 replace current bool state combination for keeping track of ble scanning with an enum that covers all states 2020-10-19 15:47:39 +01:00
Paul Szczeanek 9f09bb4956 rename private address controller to match security manager 2020-10-13 17:40:37 +01:00
Paul Szczeanek 3f9798b52d Fix conditional compilation based on config 2020-10-13 17:32:49 +01:00
Vincent Coubard f32141a051 BLE: Notify application when advertising start or stop
Applicable for legacy and extended advertising.
2020-10-05 11:54:05 +01:00
Paul Szczeanek 6ee5740941 use _initiating to block scan manipulation 2020-10-05 11:54:05 +01:00
Paul Szczeanek f0bbc4c7ae use enum for state 2020-10-05 11:54:05 +01:00
Paul Szczeanek b0086919ed scan forever and allow cancellation 2020-10-05 11:54:05 +01:00
Paul Szczeanek 18c218b027 allow host resolved address to be used for connection 2020-10-05 11:54:04 +01:00
Vincent Coubard bb35cba134 BLE: Add function to signal privacy initialization. 2020-10-05 11:54:04 +01:00
Paul Szczeanek 5216a9aa8c only apply policy if privacy enabled 2020-10-05 11:54:04 +01:00
Paul Szczeanek d4360383e1 do not reject conn if no bond 2020-10-05 11:54:04 +01:00
Paul Szczeanek b67230cbdb apply peripheral policy on ll privacy 2020-10-05 11:54:04 +01:00
Paul Szczeanek ec2808be31 filter based on resolving list size 2020-10-05 11:54:04 +01:00
Paul Szczeanek 03cc0f9940 host privacy config option to enable it 2020-10-05 11:54:04 +01:00
Vincent Coubard 76f89f6f89 BLE: Factorize peripheral privacy applied when connected 2020-10-05 11:54:04 +01:00
Vincent Coubard e4b317c1b1 BLE: Add workaround for cordio use of global random address
In Cordio, the global random address is used when the local device is connected instead of the advertising set one.
This can cause pairing to fail if the advertising set address and the global random address are different.
This workaround forces the global random address to be set when advertising is started and extended advertising is present.
2020-10-05 11:54:04 +01:00
Vincent Coubard 8fe2d7ebbe BLE: Report connection internally when address resolution has completed. 2020-10-05 11:54:03 +01:00
Vincent Coubard dee20fe5a7 BLE: Check if extended advertising is available to clear advertising set upon connection 2020-10-05 11:54:03 +01:00
Paul Szczeanek f126793f20 Add host reolustion for advertising and connections 2020-10-05 11:53:59 +01:00
Paul Szczeanek df17942c2c remove unused enhanced conn complete 2020-10-05 11:53:23 +01:00
Paul Szczeanek 0a3cd69fc6 event handler should not affect internal state 2020-10-05 11:53:22 +01:00
Vincent Coubard 5cb05958a9 BLE: Add function to get the device random static address. 2020-10-05 11:53:22 +01:00
Vincent Coubard 9eac36879a BLE: improve scan state bookkeeping 2020-10-05 11:53:22 +01:00
Vincent Coubard 48f4cfbe04 BLE: return stack busy instead of invalid state when applicable
enabling/disabling scanning and advertising operations can be prevented if the previous operations hasn't completed.
Return that the stack is busy and cannot fulfill the request at the moment rather than the state is invalid.
2020-10-05 11:53:22 +01:00
Vincent Coubard 3c22f8ae1d BLE: privacy tracing cleanup 2020-10-05 11:53:22 +01:00
Vincent Coubard 19d89366d7 BLE: Private address when initiating connection 2020-10-05 11:53:22 +01:00