ArduinoBLE
ArduinoBLE copied to clipboard
Exposed GAP.setAdvertisedServiceData to BLELocalDevice
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.