All notable changes to this project will be documented in this file.
## Unreleased changes.
### Fixed
- Initialize advertising complete callback in NimBLEAdvertising constructor.
- Clear client disconnect timer in constructor before initializing.
- Fix missing data when reading large values.
- Fix missing data in notifications when using a large MTU size and more than 270 bytes of data are sent.
- Workaround fix added for cases when the task notification value is not cleared, causing various functions that should block not to block.
### Added
-`NimBLEClient::getLastError` : Gets the error code of the last function call that produces a return code from the stack.
-`NimBLECharacteristic::notify` : Overload method to send notifications/indications with custom values.
- Added conditional checks for ESP32 specific functions/values to support use of the library on non-esp32 devices.
- Added an alias to use the callback name from the original library `onMtuChanged`.
### Changed
- Critical section calls now use the NimBLE API instead of FreeRTOS directly. This removes the need for a `portMUX_TYPE` variable in the class definitions.
- Removed unnecessary variables in `NimBLEService` and changed the constructor no no longer accept `numHandles` and `inst_id` parameters.
-`NimBLECharacteristic::removeDescriptor`: Dynamically remove a descriptor from a characterisic. Takes effect after all connections are closed and sends a service changed indication.
-`NimBLEService::removeCharacteristic`: Dynamically remove a characteristic from a service. Takes effect after all connections are closed and sends a service changed indication
-`NimBLEServerCallbacks::onMTUChange`: This is callback is called when the MTU is updated after connection with a client.
-`NimBLEAdvertisementData::addTxPower`: Adds transmission power to the advertisement.
-`NimBLEAdvertisementData::setPreferredParams`: Adds connection parameters to the advertisement.
-`NimBLEAdvertisementData::setURI`: Adds URI data to the advertisement.
-`NimBLEAdvertising` New methods:
-`NimBLEAdvertising::setName`: Set the name advertised.
-`NimBLEAdvertising::setManufacturerData`: Adds manufacturer data to the advertisement.
-`NimBLEAdvertising::setURI`: Adds URI data to the advertisement.
-`NimBLEAdvertising::setServiceData`: Adds service data to the advertisement.
-`NimBLEAdvertising::addTxPower`: Adds transmission power to the advertisement.
-`NimBLEAdvertising::reset`: Stops the current advertising and resets the advertising data to the default values.
-`NimBLEDevice::setScanFilterMode`: Set the controller duplicate filter mode for filtering scanned devices.
-`NimBLEDevice::setScanDuplicateCacheSize`: Sets the number of advertisements filtered before the cache is reset.
-`NimBLEScan::setMaxResults`: This allows for setting a maximum number of advertised devices stored in the results vector.
-`NimBLEAdvertisedDevice` New data retrieval methods added:
-`haveAdvInterval/getAdvInterval`: checks if the interval is advertised / gets the advertisement interval value.
-`haveConnParams/getMinInterval/getMaxInterval`: checks if the parameters are advertised / get min value / get max value.
-`haveURI/getURI`: checks if a URI is advertised / gets the URI data.
-`haveTargetAddress/getTargetAddressCount/getTargetAddress(index)`: checks if a target address is present / gets a count of the addresses targeted / gets the address of the target at index.
-`NimBLEAdvertising` Transmission power is no longer advertised by default and can be added to the advertisement by calling `NimBLEAdvertising::addTxPower`
-`NimBLEAdvertising` Custom scan response data can now be used without custom advertisment.