Skip to content

Commit f040569

Browse files
committed
BLE: Resolve issue with address type in advertising report.
2 parents 8e21b53 + 928dbcf commit f040569

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

features/FEATURE_BLE/ble/Gap.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2348,7 +2348,7 @@ class Gap {
23482348
* @param[in] type Advertising type of the packet.
23492349
* @param[in] advertisingDataLen Length of the advertisement data received.
23502350
* @param[in] advertisingData Pointer to the advertisement packet's data.
2351-
* @param[in] addressType address type of the peer.
2351+
* @param[in] addressType Type of the address of the peer that has emitted the packet.
23522352
*/
23532353
void processAdvertisementReport(
23542354
const BLEProtocol::AddressBytes_t peerAddr,
@@ -2357,8 +2357,12 @@ class Gap {
23572357
GapAdvertisingParams::AdvertisingType_t type,
23582358
uint8_t advertisingDataLen,
23592359
const uint8_t *advertisingData,
2360-
BLEProtocol::AddressType_t addressType
2360+
BLEProtocol::AddressType_t addressType = BLEProtocol::AddressType::RANDOM_STATIC
23612361
) {
2362+
// FIXME: remove default parameter for addressType when ST shield is merged;
2363+
// this has been added to mitigate the lack of dependency management in
2364+
// testing jobs ....
2365+
23622366
AdvertisementCallbackParams_t params;
23632367
memcpy(params.peerAddr, peerAddr, ADDR_LEN);
23642368
params.rssi = rssi;

features/FEATURE_BLE/targets/TARGET_Maxim/MaximBLE.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ static void maximHandler(wsfEventMask_t event, wsfMsgHdr_t *pMsg)
169169
(GapAdvertisingParams::AdvertisingType_t)scanReport->eventType,
170170
scanReport->len,
171171
scanReport->pData,
172-
(BLEProtocol::AddressType_t) scan->scanReport.addrType);
172+
(BLEProtocol::AddressType_t) scanReport->addrType);
173173
}
174174
break;
175175
case DM_CONN_OPEN_IND:

0 commit comments

Comments
 (0)