Skip to content

Releases: h2zero/NimBLE-Arduino

2.3.0

20 May 13:40
Compare
Choose a tag to compare

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 esp32c2, esp32c5, esp32c6, esp32h2
  • L2CAP infrastructure.
  • Scan duplicate cache reset time.

Changed

  • Cleaned up examples.
  • Update nimble core to esp-nimble @70439dd.
  • Disable flow control for all targets except original esp32.
  • Allow PHY updates without enabling extended advertising.
  • Reduced iram usage

2.2.3

28 Feb 17:00
Compare
Choose a tag to compare

Fixed

  • Added back NimBLEClient::connect overload with NimBLEAdvertisedDevice parameter to resolve connection error due to NULL address.
  • Crash caused by returning invalid vector entry when retrieving remote descriptors.

2.2.2

25 Feb 20:42
Compare
Choose a tag to compare

Fixed

  • Crash when calling NimBLEClient::DiscoverAttributes.

Added

  • NimBLEDeviceCallbacks class with a callback for handling bond storage.

2.2.1

27 Jan 01:46
Compare
Choose a tag to compare

Fixed

  • remote descriptor discovery error when no descriptors exist.
  • scan filter settings not enabled for esp32s3/c3.
  • remote descriptor discovery returning more than the desired descriptor.

2.2.0

13 Jan 01:08
Compare
Choose a tag to compare

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 and NimBLEDevice::getPower now take an additional parameter NimBLETxPowerType to set/get the power level for different operations.
  • ESP32 devices now use esp_timer instead of freeRTOS timers for BLE operations by default.

Added

  • Config option to use mbedtls instead of tinycrypt for crypto operations, this will save approximately 8k of flash if already using mbedtls for other applications (https, mqtts, etc..).
  • 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.

New Contributors

2.1.3

05 Jan 22:25
Compare
Choose a tag to compare

What's Changed

  • Fix compiling errors on nRF devices by @mr258876 in #801
  • Fix NimBLEHIDDevice output report returning incorrect characteristic. by @h2zero in #805
  • Add missing NimBLEUtils and NimBLEConnInfo includes to NimBLEDevice.h by @h2zero in #806
  • Fix getOutputReport, getInputReport and getFeatureReport: not being able to create more than one report + temporal coupling by @afpineda in #812
  • avoid unused-variable warning by @mazgch in #834
  • Fix advertising data not set if scan response enabled later. by @h2zero in #838
  • Fix characteristic value unable to be updated in callback by @h2zero in #840
  • NimBLEAdvertisementData emit error on failure, remove magic numbers. by @thekurtovic in #841

New Contributors

Full Changelog: 2.1.0...2.1.3

2.1.2

22 Dec 00:18
Compare
Choose a tag to compare

Fixed

  • Compile error when only advertising role is enabled.
  • Possible crash if bonded client reconnects.

Changed

  • NimBLEHIDDevice can now create more than one in/out/feature report map.

2.1.1

17 Dec 02:07
Compare
Choose a tag to compare

Fixed

  • NimBLEHIDDevice::getOutputReport will now return the correct characteristic.
  • Compile error when central is disabled, class NimBLEServer has no member named m_pClient.
  • Compile error with nRF devices, unresolved symbol nimble_port_stop.

Changed

  • Added missing includes for NimBLEConnInfo and NimBLEUtils to NimBLEDevice.h.

2.1.0

15 Dec 00:08
Compare
Choose a tag to compare

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

  • NimBLESecurity class removed.
  • 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.
  • All functions that take a time input parameter now expect the value to be in milliseconds instead of seconds.
  • NimBLEDevice Ignore list functions removed.
  • NimBLEDevice::startSecurity now returns a bool, true on success, instead of an int to be consistent with the rest of the library.
  • NimBLEDevice::getInitialized renamed to NimBLEDevice::isInitialized.
  • NimBLEDevice::setPower no longer takes the esp_power_level_t and esp_ble_power_type_t, instead only an integer value in dbm units is accepted.
  • NimBLEDevice::setOwnAddrType no longer takes a bool nrpa parameter.
  • NimBLEDevice::getClientListSize replaced with NimBLEDevice::getCreatedClientCount.
  • NimBLEDevice::getClientList was removed.
  • NimBLEServer::disconnect now returns bool, true = success, instead of int to be consistent with the rest of the library.
  • NimBLEServer::getPeerIDInfo renamed to NimBLEServer::getPeerInfoByHandle to better describe it's use.
  • NimBLEServerCallbacks::onMTUChanged renamed to NimBLEServerCallbacks::onMTUChange to be consistent with the client callback.
  • NimBLEServerCallbacks::onPassKeyRequest has been replaced with NimBLEServer::onPassKeyDisplay which should display the pairing pin that the client is expected to send.
  • NimBLEServerCallbacks::onAuthenticationComplete now takes a NimBLEConnInfo& 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 to getConnHandle to be consistent with bluetooth terminology.
  • NimBLEClient::disconnect now returns a bool, true on success, instead of an int to be consistent with the rest of the library.
  • NimBLEClientCallbacks::onDisconnect now takes an additional int reason parameter to let the application know why the disconnect occurred.
  • NimBLEClientCallbacks::onPassKeyRequest has been changed to NimBLEClientCallbacks::onPassKeyEntry which takes a 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 renamed to NimBLEClientCallbacks::onConfirmPasskey and no longer returns a value and now takes a 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::injectConfirmPasskey.
  • NimBLEAdvertising::setMinPreferred and NimBLEAdvertising::setMaxPreferred have been removed, use NimBLEAdvertising::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 to NimBLEAdvertising::setConnectableMode to better reflect it's function.
  • NimBLEAdvertising::setScanResponse has been renamed to NimBLEAdvertising::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 method NimBLEAdvertising::setAdvertisingCompleteCallback should be used.
  • NimBLEAdvertisementData::addData now takes either a std::vector<uint8_t> or uint8_t* + length instead of std::string or char + length.
  • NimBLEAdvertisementData::getPayload now returns std::vector<uint8_t> instead of std::string.
  • 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.
  • 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 but now takes aa const NimBLEAdvertisedDevice* instead of non-const.
    • NimBLEScanCallbacks::onScanEnd, replaces the scanEnded callback passed to NimBLEScan::start and now takes a const NimBLEScanResults& and int reason parameter.
    • NimBLEScanCallbacks::onDiscovered, This is called immediately when a device is first scanned, before any scan response data is available and takes a const NimBLEAdvertisedDevice* parameter.
  • NimBLEScan::stop will no longer call the onScanEnd 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 return const NimBLEAdvertisedDevice*.
  • NimBLEScanResults iterators are now const_iterator.
  • NimBLEService::getCharacteristics now returns a const std::vector<NimBLECharacteristic*>& instead of std::vector<NimBLECharacteristic *>.
  • NimBLECharacteristic::notify no longer takes a bool is_notification parameter, instead indicate() 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 a status parameter, refer to the return code for success/failure.
  • NimBLERemoteService::getCharacteristics now returns a const std::vector<NimBLERemoteCharacteristic*>& instead of non-const std::vector<NimBLERemoteCharacteristic*>*.
  • NimBLERemoteService::getValue now returns NimBLEAttValue instead of std::string.
  • NimBLERemoteCharacteristic::getRemoteService now returns a const 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.
  • NimBLEAdvertisedDevice::hasRSSI removed as redundant, RSSI is always available.
  • NimBLEAdvertisedDevice::getPayload now returns const 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.
  • NimBLEAddress constructor; default value for the type parameter removed, caller should know the address type and specify it.
  • NimBLEAddress::getNative replaced with NimBLEAddress::getBase and now returns a pointer to const ble_addr_t instead of a pointer to the address value.
  • NimBLEAddress::equals method and NimBLEAddress::== operator will now also test if the address types are the same.
  • NimBLEUUID::getNative method replaced with NimBLEUUID::getBase which returns a read-only pointer to the underlying ble_uuid_t struct.
  • NimBLEUUID; msbFirst parameter has been removed from constructor, caller should reverse the data first or call the new reverseByteOrder method after.
  • NimBLEUtils::dumpGapEvent function removed.
  • NimBLEUtils::buildHexData replaced with NimBLEUtils::dataToHexString, which returns a std::string containing the hex string.
  • Removed Eddystone URL as it has been shutdown by google since 2021.
  • NimBLEEddystoneTLM::setTemp now takes an int16_t parameter instead of float to be friendly to devices without floating point support.
  • NimBLEEddystoneTLM::getTemp now returns int16_t to work with devices that don't have floating point support.
  • NimBLEEddystoneTLM::setData now takes a reference to * NimBLEEddystoneTLM::BeaconData instead of std::string.
  • NimBLEEddystoneTLM::getData now returns a reference to * NimBLEEddystoneTLM::BeaconData instead of std::string.
  • NimBLEBeacon::setData now takes const NimBLEBeacon::BeaconData& instead of std::string.
  • NimBLEBeacon::getData now returns const NimBLEBeacon::BeaconData& instead of std::string.
  • NimBLEHIDDevice::reportMap renamed to NimBLEHIDDevice::getReportMap.
  • NimBLEHIDDevice::hidControl renamed to NimBLEHIDDevice::getHidControl.
  • NimBLEHIDDevice::inputReportrenamed to NimBLEHIDDevice::getInputReport.
  • `NimBLEHIDDevice::o...
Read more

1.4.3

28 Nov 08:57
Compare
Choose a tag to compare

Fixed

  • BT5 examples for non-esp devices.
  • Build errors when configured as a non-connecting device

Added

  • Coded PHY support for nRF52833 and nRF52820