@@ -183,6 +183,16 @@ class BLEDevice
183
183
*/
184
184
ble_error_t accumulateAdvertisingPayload (GapAdvertisingData::DataType type, const uint8_t *data, uint8_t len);
185
185
186
+ /* *
187
+ * Accumulate a variable length byte-stream as an AD structure in the
188
+ * scanResponse payload.
189
+ *
190
+ * @param type The type which describes the variable length data.
191
+ * @param data data bytes.
192
+ * @param len length of data.
193
+ */
194
+ ble_error_t accumulateScanResponse (GapAdvertisingData::DataType type, const uint8_t *data, uint8_t len);
195
+
186
196
/* *
187
197
* Start advertising (GAP Discoverable, Connectable modes, Broadcast
188
198
* Procedure).
@@ -356,12 +366,19 @@ BLEDevice::accumulateAdvertisingPayloadTxPower(int8_t txPower)
356
366
}
357
367
358
368
inline ble_error_t
359
- BLEDevice::accumulateAdvertisingPayload (GapAdvertisingData::DataType type, const uint8_t *data, uint8_t len)
369
+ BLEDevice::accumulateAdvertisingPayload (GapAdvertisingData::DataType type, const uint8_t *data, uint8_t len)
360
370
{
361
371
needToSetAdvPayload = true ;
362
372
return advPayload.addData (type, data, len);
363
373
}
364
374
375
+ inline ble_error_t
376
+ BLEDevice::accumulateScanResponse (GapAdvertisingData::DataType type, const uint8_t *data, uint8_t len)
377
+ {
378
+ needToSetAdvPayload = true ;
379
+ return scanResponse.addData (type, data, len);
380
+ }
381
+
365
382
inline ble_error_t
366
383
BLEDevice::setAdvertisingPayload (void ) {
367
384
needToSetAdvPayload = false ;
0 commit comments