Releases: h2zero/esp-nimble-cpp
Releases Β· h2zero/esp-nimble-cpp
2.3.1
What's Changed
- Allow
esp_wifi_remote
>= 0.5.3 by @johnboiles in #337 - Fix builds when excluding roles by @h2zero in #339
- Fix server client read/write not returning when encryption is used. by @h2zero in #342
- [Bugfix] NimBLEScan delete. by @h2zero in #341
New Contributors
- @johnboiles made their first contribution in #337
Full Changelog: 2.3.0...2.3.1
2.3.0
Fixed
- Incorrect
NimBLECharacteristic::onSubscribe
value when indications are set. NimBLECharacteristic::onRead
callback not called in some cases.- Clear attribute value when zero length value is written.
- Notify/Indicate incorrectly returning success with custom value.
- Corrected NimBLEClient array initialization.
- Prevent potential exception when scan is restarted.
- Attribute getValue failing with some data types
- Incorrectly passing a pointer to a function taking const reference.
Added
- Support for esp32c5
- L2CAP infrastructure.
- Scan duplicate cache reset time.
Changed
- Cleaned up examples.
- Allow PHY updates without enabling extended advertising.
2.2.1
2.2.0
2.1.1
2.1.0
Fixed
- Crash when retrieving descriptors if more than one exists.
- Incorrect TX power value being advertised.
- New user guide code for 2.x
- Potential race condition if `NimBLEScan::clearResults1 is called from multiple tasks.
Changed
- If privacy is not enabled identity keys will not be shared.
NimBLEDevice::setPower
andNimBLEDevice::getPower
now take an additional parameterNimBLETxPowerType
to set/get the power level for different operations.
Added
- Config option
CONFIG_NIMBLE_CPP_ADDR_FMT_EXCLUDE_DELIMITER
, if defined will remove the ":" delimiter from the BLE address string. - Config option
CONFIG_NIMBLE_CPP_ADDR_FMT_UPPERCASE
if defined will make the BLE address strings uppercase.
2.0.3
What's Changed
- Add missing NimBLEUtils and NimBLEConnInfo includes to NimBLEDevice.h by @h2zero in #268
- Fix crash that could occur when server receives reconnection from client by @finger563 in #271
- NimBLELog allow custom log level colors. by @thekurtovic in #267
- Fix compile error for advertiser only config. by @h2zero in #273
- NimBLEScan increment m_callbackSent before callback. by @thekurtovic in #278
- Fix build error when using platformio library by @h2zero in #276
- Add checks in case NIMBLE_CPP_DEBUG_ASSERT is not defined. by @thekurtovic in #280
Full Changelog: 2.0.0...2.0.3
2.0.2
2.0.1
2.0.0
Finally! A new release with something more than a bugfix or some minor additions!
I'm excited to present this release properly after the unfortunate Arduino Library Manager debacle π.
This was a complete overhaul of the codebase, every file as been touched up and some completely re-designed, removed, added, or changed significantly. This required A LOT of changes, many will break your current application code, but don't worry, it will be much better!
This release has so much in it!
Highlights
- Reduced the code size by over 40KB.
- Significant reduction in memory use.
- Huge performance boost.
- Asynchronous client connect, MTU exchange, and secure connection options to speed up the connecting process.
- Asynchronous passkey entry/confirmation so the client/server can have time to properly display/enter the passkey before action is performed.
- Scan restart option to clear the duplicate cache so the same devices will be found again.
- New scan callbacks class with extra functions that will get called on first discovery, before and scan response data is received.
- Ability to update advertised data while advertising.
- Improved support for dynamically changing services/characteristics/descriptors.
- Simplified code for easier maintenance and understanding for contributors.
Full Changelog
Breaking changes
- All connection oriented callbacks now receive a reference to
NimBLEConnInfo
, theble_gap_conn_desc
has also been replace withNimBLEConnInfo
in the functions that received it. - All functions that take a time input parameter now expect the value to be in milliseconds instead of seconds.
- Removed Eddystone URL as it has been shutdown by google since 2021.
- NimBLESecurity class removed.
NimBLEDevice
Ignore list functions removed.NimBLEDevice::startSecurity
now returns abool
, true on success, instead of an int to be consistent with the rest of the library.NimBLEDevice::getInitialized
renamed toNimBLEDevice::isInitialized
.NimBLEDevice::setPower
no longer takes theesp_power_level_t
andesp_ble_power_type_t
, instead only an integer value in dbm units is accepted.NimBLEDevice::setOwnAddrType
no longer takes abool nrpa
parameter.NimBLEDevice::getClientListSize
replaced withNimBLEDevice::getCreatedClientCount
.NimBLEDevice::getClientList
was removed.NimBLEServer::disconnect
now returnsbool
, true = success, instead ofint
to be consistent with the rest of the library.NimBLEServerCallbacks::onMTUChanged
renamed toNimBLEServerCallbacks::onMTUChange
to be consistent with the client callback.NimBLEServer::getPeerIDInfo
renamed toNimBLEServer::getPeerInfoByHandle
to better describe it's use.NimBLEServerCallbacks::onPassKeyRequest
has been replaced withNimBLEServer::onPassKeyDisplay
which should display the pairing pin that the client is expected to send.NimBLEServerCallbacks::onAuthenticationComplete
now takes aNimBLEConnInfo&
parameter.NimBLEClient::getServices
now returns a const reference to std::vector<NimBLERemoteService*> instead of a pointer to the internal vector.NimBLEClient::getConnId
has been renamed togetConnHandle
to be consistent with bluetooth terminology.NimBLEClient::disconnect
now returns abool
, true on success, instead of an int to be consistent with the rest of the library.NimBLEClientCallbacks::onDisconnect
now takes an additionalint reason
parameter to let the application know why the disconnect occurred.NimBLEClientCallbacks::onPassKeyRequest
has been changed toNimBLEClientCallbacks::onPassKeyEntry
which takes aNimBLEConnInfo&
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 viaNimBLEDevice::injectPassKey
.NimBLEClientCallbacks::onConfirmPIN
renamed toNimBLEClientCallbacks::onConfirmPasskey
and no longer returns a value and now takes aNimBLEConnInfo&
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 withNimBLEDevice::injectConfirmPasskey
.NimBLEAdvertising::setMinPreferred
andNimBLEAdvertising::setMaxPreferred
have been removed, useNimBLEAdvertising::setPreferredParams
instead.- Advertising the name and TX power of the device will no longer happen by default and should be set manually by the application.
NimBLEAdvertising::setAdvertisementType
has been renamed toNimBLEAdvertising::setConnectableMode
to better reflect it's function.NimBLEAdvertising::setScanResponse
has been renamed toNimBLEAdvertising::enableScanResponse
to better reflect it's function.NimBLEAdvertising
; Scan response is no longer enabled by default.NimBLEAdvertising::start
No longer takes a callback pointer parameter, instead the new methodNimBLEAdvertising::setAdvertisingCompleteCallback
should be used.NimBLEAdvertisementData::addData
now takes either astd::vector<uint8_t>
oruint8_t* + length
instead ofstd::string
orchar + length
.NimBLEAdvertisementData::getPayload
now returnsstd::vector<uint8_t>
instead ofstd::string
.- The callback parameter for
NimBLEScan::start
has been removed and the blocking overload ofNimBLEScan::start
has been replaced by an overload ofNimBLEScan::getResults
with the same parameters. NimBLEAdvertisedDeviceCallbacks
Has been replaced byNimBLEScanCallbacks
which contains the following methods:onResult
,onScanEnd
, and `onDiscovered-
NimBLEScanCallbacks::onResult
, functions the same as the oldNimBLEAdvertisedDeviceCallbacks::onResult
but now takes aaconst NimBLEAdvertisedDevice*
instead of non-const.
-
NimBLEScanCallbacks::onScanEnd
, replaces the scanEnded callback passed toNimBLEScan::start
and now takes aconst NimBLEScanResults&
andint reason
parameter.
-
NimBLEScanCallbacks::onDiscovered
, This is called immediately when a device is first scanned, before any scan response data is available and takes aconst NimBLEAdvertisedDevice*
parameter.
NimBLEScan::stop
will no longer call theonScanEnd
callback as the caller should know its been stopped when this is called.NimBLEScan::clearDuplicateCache
has been removed as it was problematic and only for the esp32. Stop and start the scanner for the same effect.NimBLEScanResults::getDevice
methods now returnconst NimBLEAdvertisedDevice*
.NimBLEScanResults
iterators are nowconst_iterator
.NimBLEAdvertisedDevice::hasRSSI
removed as redundant, RSSI is always available.NimBLEAdvertisedDevice::getPayload
now returnsconst std::vector<uint8_t>
instead of a pointer to internal memory.NimBLEAdvertisedDevice
Timestamp removed, if needed then the app should track the time from the callback.NimBLECharacteristic::notify
no longer takes abool is_notification
parameter, insteadindicate()
should be called to send indications.NimBLECharacteristicCallbacks::onNotify
removed as unnecessary, the library does not call notify without app input.NimBLECharacteristicCallbacks::onStatus
No longer takes astatus
parameter, refer to the return code for success/failure.NimBLERemoteCharacteristic::getRemoteService
now returns aconst NimBLERemoteService*
instead of non-const.NimBLERemoteCharacteristic::readUInt32
Has been removed.NimBLERemoteCharacteristic::readUInt16
Has been removed.NimBLERemoteCharacteristic::readUInt8
Has been removed.NimBLERemoteCharacteristic::readFloat
Has been removed.NimBLERemoteCharacteristic::registerForNotify
Has been removed.NimBLERemoteService::getCharacteristics
now returns aconst std::vector<NimBLERemoteCharacteristic*>&
instead of non-conststd::vector<NimBLERemoteCharacteristic*>*
.NimBLERemoteService::getValue
now returnsNimBLEAttValue
instead ofstd::string
.NimBLEService::getCharacteristics
now returns aconst std::vector<NimBLECharacteristic*>&
instead of std::vector<NimBLECharacteristic *>.NimBLEUUID::getNative
method replaced withNimBLEUUID::getBase
which returns a read-only pointer to the underlyingble_uuid_t
struct.NimBLEUUID
;msbFirst
parameter has been removed from constructor, caller should reverse the data first or call the newreverseByteOrder
method after.NimBLEAddress
constructor; default value for thetype
parameter removed, caller should know the address type and specify it.NimBLEAddress::getNative
replaced withNimBLEAddress::getBase
and now returns a pointer toconst ble_addr_t
instead of a pointer to the address value.NimBLEAddress::equals
method andNimBLEAddress::== operator
will now also test if the address types are the same.NimBLEUtils::dumpGapEvent
function removed.NimBLEUtils::buildHexData
replaced withNimBLEUtils::dataToHexString
, which returns astd::string
containing the hex string.NimBLEEddystoneTLM::setTemp
now takes anint16_t
parameter instead of float to be friendly to devices without floating point support.NimBLEEddystoneTLM::getTemp
now returnsint16_t
to work with devices that don't have floating point support.NimBLEEddystoneTLM::setData
now takes a reference to *NimBLEEddystoneTLM::BeaconData
instead ofstd::string
.NimBLEEddystoneTLM::getData
now returns a reference to *NimBLEEddystoneTLM::BeaconData
instead ofstd::string
.NimBLEBeacon::setData
now takesconst NimBLEBeacon::BeaconData&
instead ofstd::string
.NimBLEBeacon::getData
now returnsconst NimBLEBeacon::BeaconData&
instead ofstd::string
.NimBLEHIDDevice::reportMap
renamed toNimBLEHIDDevice::getReportMap
.NimBLEHIDDevice::hidControl
renamed toNimBLEHIDDevice::getHidControl
.NimBLEHIDDevice::inputReport
renamed toNimBLEHIDDevice::getInputReport
.- `NimBLEHIDDevice::out...