File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,17 @@ String BLEDevice::advertisedServiceUuid(int index) const
184
184
return serviceUuid;
185
185
}
186
186
187
+ int BLEDevice::advertisementData (uint8_t value[], int length)
188
+ {
189
+ if (_eirDataLength > length) return 0 ; // Check that buffer size is sufficient
190
+
191
+ if (_eirDataLength) {
192
+ memcpy (value, _eirData, _eirDataLength);
193
+ }
194
+
195
+ return _eirDataLength;
196
+ }
197
+
187
198
int BLEDevice::rssi ()
188
199
{
189
200
uint16_t handle = ATT.connectionHandle (_addressType, _address);
Original file line number Diff line number Diff line change @@ -59,6 +59,8 @@ class BLEDevice {
59
59
String advertisedServiceUuid () const ;
60
60
String advertisedServiceUuid (int index) const ;
61
61
62
+ int advertisementData (uint8_t value[], int length);
63
+
62
64
virtual int rssi ();
63
65
64
66
bool connect ();
You can’t perform that action at this time.
0 commit comments