ArduinoBLE icon indicating copy to clipboard operation
ArduinoBLE copied to clipboard

Exposed GAP.setAdvertisedServiceData to BLELocalDevice

Open cotdp opened this issue 4 years ago • 1 comments

This change is intended to allow Service Data to be set from be BLELocalDevice. The methods required already existed but were protected. I have moved these into the public scope and added a method on BLELocalDevice to use them.

Also included is a short example which emulates a Xiami Mijia climate sensor. This product encodes the temperature and humidity measurements into the service data, allowing BLE devices to see the current measurements without the need to connect and interrogate it.

Running the sample code on an Arduino Nano 33 BLE Sense with the HTS sensor allows you to plug in real measurements.

cotdp avatar Sep 02 '20 00:09 cotdp

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 09 '21 14:04 CLAassistant