- All functions that take a time input parameter now expect the value to be in milliseconds instead of seconds.
-`NimBLEClientCallbacks::onDisconnect` now takes an additional `int reason` parameter to let the application know why the disconnect occurred.
-`NimBLERemoteCharacteristic::registerForNotify` Has been removed.
-`NimBLERemoteCharacteristic::readUInt16` Has been removed.
-`NimBLERemoteCharacteristic::readUInt32` Has been removed.
-`NimBLERemoteCharacteristic::readUInt8` Has been removed.
-`NimBLERemoteCharacteristic::readFloat` Has been removed.
-`NimBLECharacteristicCallbacks::onStatus` No longer takes a `status` parameter, refer to the return code for success/failure.
- All connection oriented callbacks now receive a reference to `NimBLEConnInfo`, the `ble_gap_conn_desc` has also been replace with `NimBLEConnInfo` in the functions that received it.
-`NimBLEAdvertisedDeviceCallbacks` Has been replaced by `NimBLEScanCallbacks` which contains the following methods: `onResult`, `onScanEnd`, and `onDiscovered`
- - `NimBLEScanCallbacks::onResult`, functions the same as the old `NimBLEAdvertisedDeviceCallbacks::onResult`
- - `NimBLEScanCallbacks::onScanEnd`, replaces the scanEnded callback passed to `NimBLEScan::start`
- - `NimBLEScanCallbacks::onDiscovered`, This is called immediately when a device is first scanned, before any scan response data is available.
- The callback parameter for `NimBLEScan::start` has been removed and the blocking overload of `NimBLEScan::start` has been replaced by an overload of `NimBLEScan::getResults` with the same parameters.
- Added optional `conn_handle` parameter to `NimBLECharacteristic::notify` to allow for sending notifications to specific clients.
- Added optional `NimBLEAddress` parameter to `NimBLEAdvertising::start` to allow for directed advertising to a peer.
-`NimBLEAdvertisedDevice::getManufacturerData` now takes an optional index parameter for use in the case of multiple manufacturer data fields.
-`NimBLEAdvertising::start` advertising complete callback is now defined as std::function to allow for using std::bind for callback functions.
-`NimBLEDevice::deleteAllBonds` now returns true on success, otherwise false.
-`NimBLEClientCallbacks::onPassKeyRequest` has been changed to `NimBLEClientCallbacks::onPassKeyEntry` which takes a `const NimBLEConnInfo` parameter and does not return a value. Instead or returning a value this callback should prompt a user to enter a pin number which is sent later via `NimBLEDevice::injectPassKey`.
-`NimBLEClientCallbacks::onConfirmPin` no longer returns a value and now takes a `const NimBLEConnInfo` parameter. This should be used to prompt a user to confirm the pin on the display (YES/NO) after which the response should be sent with `NimBLEDevice::injectConfirmPIN`.
-`NimBLEServer::onPassKeyRequest` has been replaced with `NimBLEServer::onPassKeyDisplay` which should display the pairing pin that the client is expected to send.
-`NimBLEServer::onAuthenticationComplete` now takes a `const NimBLEConnInfo` parameter.
- Fixed missing data from long notification values.
- Fixed NimbleCharacteristicCallbacks::onRead not being called when a non-long read command is received.
- Prevent a potential crash when retrieving characteristics from a service if the result was successful but no characteristics found.
- logs/typos.
### Changed
- AD flags are no longer set in the advertisements of non-connectable beacons, freeing up 3 bytes of advertisement room.
- Save resources when retrieving descriptors if the characteristic handle is the same as the end handle (no descriptors).
- Subscribing to characteristic notifications/indications will now always use write with response, as per BLE specifications.
-`NimBLEClient::discoverAttributes` now returns a bool value to indicate success/failure.
- Scan result callbacks are no longer called when the scan response data is updated in order to reduce duplicates.
### Added
- Preliminary support for non-esp devices, NRF51 and NRF52 devices supported with [n-able arduino core](https://github.com/h2zero/n-able-Arduino)
- Alias added for `NimBLEServerCallbacks::onMTUChange` to `onMtuChanged` in order to support porting code from original library.
-`NimBLEAttValue` Class added to reduce and control RAM footprint of characteristic/descriptor values and support conversions from Arduino Strings and many other data types.
- Bluetooth 5 extended advertising support for capable devices. CODED Phy, 2M Phy, extended advertising data, and multi-advertising are supported, periodic advertising will be implemented in the future.
- 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.