File tree 2 files changed +13
-0
lines changed
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -209,6 +209,17 @@ String BLEDevice::advertisedServiceUuid(int index) const
209
209
return serviceUuid;
210
210
}
211
211
212
+ int BLEDevice::advertisementData (uint8_t value[], int length)
213
+ {
214
+ if (_eirDataLength > length) return 0 ; // Check that buffer size is sufficient
215
+
216
+ if (_eirDataLength) {
217
+ memcpy (value, _eirData, _eirDataLength);
218
+ }
219
+
220
+ return _eirDataLength;
221
+ }
222
+
212
223
int BLEDevice::rssi ()
213
224
{
214
225
uint16_t handle = ATT.connectionHandle (_addressType, _address);
Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ class BLEDevice {
61
61
String advertisedServiceUuid () const ;
62
62
String advertisedServiceUuid (int index) const ;
63
63
64
+ int advertisementData (uint8_t value[], int length);
65
+
64
66
virtual int rssi ();
65
67
66
68
bool connect ();
You can’t perform that action at this time.
0 commit comments