Skip to content

Added Peer Address Type to Advertisement Report #182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ble/Gap.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ class Gap {
*/
struct AdvertisementCallbackParams_t {
BLEProtocol::AddressBytes_t peerAddr; /**< The peer's BLE address. */
BLEProtocol::AddressType_t peerAddrType; /**< The peer's BLE address type. */
int8_t rssi; /**< The advertisement packet RSSI value. */
bool isScanResponse; /**< Whether this packet is the response to a scan request. */
GapAdvertisingParams::AdvertisingType_t type; /**< The type of advertisement. */
Expand Down Expand Up @@ -1800,6 +1801,8 @@ class Gap {
*
* @param[in] peerAddr
* The peer's BLE address.
* @param[in] peerAddrType
* The peer's BLE address type.
* @param[in] rssi
* The advertisement packet RSSI value.
* @param[in] isScanReponse
Expand All @@ -1812,13 +1815,15 @@ class Gap {
* Pointer to the advertisement packet's data.
*/
void processAdvertisementReport(const BLEProtocol::AddressBytes_t peerAddr,
BLEProtocol::AddressType_t peerAddrType,
int8_t rssi,
bool isScanResponse,
GapAdvertisingParams::AdvertisingType_t type,
uint8_t advertisingDataLen,
const uint8_t *advertisingData) {
AdvertisementCallbackParams_t params;
memcpy(params.peerAddr, peerAddr, ADDR_LEN);
params.peerAddrType = peerAddrType;
params.rssi = rssi;
params.isScanResponse = isScanResponse;
params.type = type;
Expand Down