* The type is available in the NimBLEAddress parameter, no longer needed separately.
Co-authored-by: wakwak-koba <wakwak-koba@users.noreply.github.com>
* Add clearAll parameter to deinit()
Adds the ability to clear all resources consumed during BLE operation when deinitializing and shutting down BLE.
Useful when BLE is used intermittently or in a task that initializes, performs operations then deinitializes.
By setting the clearAll parameter to true all created BLE objects will be deleted, freeing the memory for other tasks.
Warning: This will invalidate any pointers that may be referencing the deleted objects.
* Add bool deleteCallbacks parameter to NimBLEServer::setCallbacks, if true (default) will delete the callback class when server is destructed.
* Delete scan results when scan is destructed.
* Add support for getting multiple services data from advertisments.
* Adds new methods for getting advertised service data and UUIDS.
- getServiceData(index), gets the service data by index value.
- getServiceData(NimBLEUUID), gets the service data by UUID.
- getServiceDataCount(), gets the number of services with data advertised.
* Templates added for getServiceData(index) and getServiceData(NimBLEUUID)
to be able to specify the data type returned by these methods
Example:
getServiceData<uint32_t>(NimBLEUUID("ABCD");
* Also added:
- getServiceUUID(index), gets the advertised service UUID by index value.
- getServiceUUIDCount(), gets the number of advertised services.
Server: Add onSubscribe() callback for characteristics.
Adds a new method to NimBLECharacteristicCallbacks that gets called when a client
changes it's subscription status.
* Remove NimBLE2902 class.
As the NimBLE2902 class usefulness was only related to callback functions that were replaced
by the NimBLECharacteristicCallbacks:onSubscribe() method this removes the NimBLE2902 class and
moves all subscription handling to NimBLECharacteristic.
* Update documents and examples to reflect this change.
* Add getSubscribedCount() to get the number of subscribed clients.
Added alternative characteristic read/write callbacks that carry the connection description information.
Fixesh2zero/NimBLE-Arduino#83
Author: lknop <lknop@users.noreply.github.com>
* Get service handles on server start
* remove service + indicate service changed
* Reset gatt services when no connections active and services changed.
* NimBLEServer::createService can now be used any time and will send service changed
indication if server was already active.
* Add ability to remove advertised serviceUUIDS
* Adds addService() method to server to be allow user to re-add a service previously removed
* Add destructior to NimBLEServer, NimBLEService and NimBLECharacteristic to release allocated resources.
Also adds:
* NimBLEScan::setDuplicateFilter() to tell the controller to filter duplicates
before sending the result to the host.
* NimBLEScan::setLimitedOnly() to tell the controller only report scan results
from devices advertising in limited discovery mode, i.e. directed advertising.
* NimBLEScan::setFilterPolicy() to set the filter policy i.e whitelist only devices.
* Replace all semaphores with task notifications.
* use critical sections to prevent concurrent data access.
* Ensure scan stop has been called before connecting.
* Optimize and cleanup
* Add template casting to NimBLERemoteDescriptor::readValue()
* Removed storage of the descriptor value read as it did not serve any purpose.
* Add subscribe() and unsubscribe() methods to replace registerForNotify() in NimBLERemoteCharacteristic.
* registerForNotify() remains as a (depreciated) method.