File tree Expand file tree Collapse file tree 1 file changed +10
-16
lines changed
features/FEATURE_BLE/source/generic Expand file tree Collapse file tree 1 file changed +10
-16
lines changed Original file line number Diff line number Diff line change @@ -2141,7 +2141,7 @@ ble_error_t GenericGap::setExtendedAdvertisingParameters(
2141
2141
params.getChannel39 ()
2142
2142
);
2143
2143
2144
- return _pal_gap.set_extended_advertising_parameters (
2144
+ ble_error_t err = _pal_gap.set_extended_advertising_parameters (
2145
2145
handle,
2146
2146
event_properties,
2147
2147
params.getMinPrimaryInterval ().value (),
@@ -2158,6 +2158,15 @@ ble_error_t GenericGap::setExtendedAdvertisingParameters(
2158
2158
/* SID */ (handle % 0x10 ),
2159
2159
params.getScanRequestNotification ()
2160
2160
);
2161
+
2162
+ if (err) {
2163
+ return err;
2164
+ }
2165
+
2166
+ return _pal_gap.set_advertising_set_random_address (
2167
+ handle,
2168
+ _random_static_identity_address
2169
+ );
2161
2170
}
2162
2171
2163
2172
ble_error_t GenericGap::setAdvertisingPayload (
@@ -2305,21 +2314,6 @@ ble_error_t GenericGap::startAdvertising(
2305
2314
}
2306
2315
2307
2316
if (is_extended_advertising_available ()) {
2308
- ble::address_t random_address;
2309
-
2310
- if (!getUnresolvableRandomAddress (random_address)) {
2311
- return BLE_ERROR_INTERNAL_STACK_FAILURE;
2312
- }
2313
-
2314
- error = _pal_gap.set_advertising_set_random_address (
2315
- handle,
2316
- random_address
2317
- );
2318
-
2319
- if (error) {
2320
- return error;
2321
- }
2322
-
2323
2317
error = _pal_gap.extended_advertising_enable (
2324
2318
/* enable */ true ,
2325
2319
/* number of advertising sets */ 1 ,
You can’t perform that action at this time.
0 commit comments