Skip to content

Commit 7b3cc93

Browse files
author
Cruz Monrreal
authored
Merge pull request #9907 from pan-/fix-cordio-conf
BLE - Fix cordio configuration
2 parents f05a343 + b21e1d2 commit 7b3cc93

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

features/FEATURE_BLE/source/generic/GenericGap.tpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,6 +1465,11 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
14651465
#if BLE_ROLE_OBSERVER
14661466
_scan_timeout.detach();
14671467
#endif
1468+
1469+
if (_deprecated_scan_api_used == true) {
1470+
return BLE_ERROR_NONE;
1471+
}
1472+
14681473
#if BLE_FEATURE_EXTENDED_ADVERTISING
14691474
if (is_extended_advertising_available()) {
14701475
/* stop all advertising sets */

features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioBLE.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,10 +394,8 @@ void BLE::stack_setup()
394394

395395
WsfTimerInit();
396396

397-
#if BLE_FEATURE_SECURITY
397+
// Note: SecInit required for RandInit.
398398
SecInit();
399-
#endif
400-
401399
SecRandInit();
402400

403401
#if BLE_FEATURE_SECURITY
@@ -519,11 +517,14 @@ void BLE::stack_setup()
519517
DmConnRegister(DM_CLIENT_ID_APP, BLE::device_manager_cb);
520518
#endif
521519

520+
#if BLE_FEATURE_GATT_SERVER
521+
AttConnRegister(BLE::connection_handler);
522+
#endif
523+
522524
#if BLE_FEATURE_ATT
523525
#if BLE_FEATURE_GATT_CLIENT
524526
AttRegister((attCback_t) ble::pal::vendor::cordio::CordioAttClient::att_client_handler);
525527
#else
526-
AttConnRegister(BLE::connection_handler);
527528
AttRegister((attCback_t) ble::vendor::cordio::GattServer::att_cb);
528529
#endif // BLE_FEATURE_GATT_CLIENT
529530
#endif

0 commit comments

Comments
 (0)