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 @@ -209,6 +209,17 @@ String BLEDevice::advertisedServiceUuid(int index) const
209209 return serviceUuid;
210210}
211211
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+
212223int BLEDevice::rssi ()
213224{
214225 uint16_t handle = ATT.connectionHandle (_addressType, _address);
Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ class BLEDevice {
6161 String advertisedServiceUuid () const ;
6262 String advertisedServiceUuid (int index) const ;
6363
64+ int advertisementData (uint8_t value[], int length);
65+
6466 virtual int rssi ();
6567
6668 bool connect ();
You can’t perform that action at this time.
0 commit comments