From 5efac211beb558776ba154f7ba490b9c62896c7b Mon Sep 17 00:00:00 2001 From: paul-szczepanek-arm <33840200+paul-szczepanek-arm@users.noreply.github.com> Date: Wed, 7 Nov 2018 16:19:45 +0000 Subject: [PATCH] sid --- features/FEATURE_BLE/source/generic/GenericGap.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/features/FEATURE_BLE/source/generic/GenericGap.cpp b/features/FEATURE_BLE/source/generic/GenericGap.cpp index 8ff6deb1ea..a19545ae14 100644 --- a/features/FEATURE_BLE/source/generic/GenericGap.cpp +++ b/features/FEATURE_BLE/source/generic/GenericGap.cpp @@ -1614,6 +1614,11 @@ ble_error_t GenericGap::setAdvertisingParams(AdvHandle_t handle, const GapAdvert return BLE_ERROR_INVALID_PARAM; } + if (_pal_gap.is_feature_supported(pal::Gap::ControllerSupportedFeatures_t::LE_EXTENDED_ADVERTISING)) { + // do legacy stuff + return BLE_ERROR_OPERATION_NOT_PERMITTED; + } + pal::advertising_event_properties_t event_properties;//TODO ble::advertising_type_t adv_type = params->getAdvertisingType(); @@ -1643,7 +1648,7 @@ ble_error_t GenericGap::setAdvertisingParams(AdvHandle_t handle, const GapAdvert params->getPrimaryPhy(), params->getSecondaryMaxSkip(), params->getSecondaryPhy(), - 0, + 0xFF, params->getScanRequestNotification() ); } @@ -1654,7 +1659,6 @@ ble_error_t GenericGap::setAdvertisingParams(AdvHandle_t handle, const GapExtend } pal::advertising_channel_map_t channel_map; /*TODO translate*/ - uint8_t sid;//TODO pal::advertising_event_properties_t event_properties;//TODO //params->getAdvertisingType() @@ -1672,7 +1676,7 @@ ble_error_t GenericGap::setAdvertisingParams(AdvHandle_t handle, const GapExtend params->getPrimaryPhy(), params->getSecondaryMaxSkip(), params->getSecondaryPhy(), - sid, + (handle % 0x10), params->getScanRequestNotification() ); }