Skip to content

Commit 3612e08

Browse files
sgbihuSidLeung
authored andcommitted
Jira 836, Enumerate non connectable Peripherals in Central scan …
Added feature: - In Central mode, the BLE library should enumerate Peripheral that are non-connectable (eg beacon). Code Mods: 1. BLEDevice.cpp: - Add the call to get Manufacturer Data info from a Peripheral. Non-connectable device may only broadcast this info. 2. BLEDevice.h: - Prototyping. 3. BLEDeviceManager.cpp: - Delete the filter about non-connectable advertisement. - Added APIs, hasManufacturerData(), setManufacturerData(), hasManufacturerData(), to gain access to adv info of non-connectable Peripherals.
1 parent 59d03ae commit 3612e08

File tree

4 files changed

+566
-224
lines changed

4 files changed

+566
-224
lines changed

libraries/CurieBLE/src/BLEDevice.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,17 @@ void BLEDevice::setManufacturerData(const unsigned char manufacturerData[],
133133
BLEDeviceManager::instance()->setManufacturerData(manufacturerData, manufacturerDataLength);
134134
}
135135

136+
bool BLEDevice::getManufacturerData (unsigned char* manu_data,
137+
unsigned char& manu_data_len) const
138+
{
139+
return BLEDeviceManager::instance()->getManufacturerData(this, manu_data, manu_data_len);
140+
}
141+
142+
bool BLEDevice::hasManufacturerData() const
143+
{
144+
return BLEDeviceManager::instance()->hasManufacturerData(this);
145+
}
146+
136147
void BLEDevice::setLocalName(const char *localName)
137148
{
138149
BLEDeviceManager::instance()->setLocalName(localName);

libraries/CurieBLE/src/BLEDevice.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ class BLEDevice
191191
void setManufacturerData(const unsigned char manufacturerData[],
192192
unsigned char manufacturerDataLength);
193193

194+
bool getManufacturerData (unsigned char* manu_data,
195+
unsigned char& manu_data_len) const;
196+
197+
bool hasManufacturerData() const;
198+
194199
/**
195200
* Set the local name that the BLE Peripheral Device advertises
196201
*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy